genAmplitudeMaps

genAmplitudeMaps


Calculate one response-minus-baseline image for each event condition.

Description


For every condition, the function aggregates baseline samples and response samples, subtracts the baseline map from the response map, and aggregates repetitions. The file is streamed in X slabs and only the baseline and response frames of each trial are read, so the data are never loaded whole (Low-RAM mode is always on).

Input


An event-split .dat file with axes Y-X-T-E, for example the output of split_data_by_event. Continuous Y-X-T data must be split first. Arrays, UMT structures and .umt files are not supported.

The E axis of the file is matched to the events.mat in SaveFolder:

  • one slice per event instance: the instances of each condition are pooled into one map (ignored instances are excluded);
  • one slice per condition (an aggregated file): one map per slice.

An E axis that cannot be matched to events.mat is rejected. Without an events.mat, every slice is treated as a repetition of one condition, with a default baseline of 7 frames.

Output


A .dat file, amplitudeMap.dat, written in SaveFolder with axes Y-X-E: one amplitude map per event condition, ordered by first appearance. The file stores no labels; its E axis is matched to events.mat (one slice per condition).

Ignored instances are excluded, and a condition whose instances are all ignored gives a NaN map. BaselineMeasure and ResponseMeasure are applied jointly across frames and trials within each condition, not per trial and then averaged across trials. With the default ResponseMeasure = max, the response is the single largest response-window value across all trials of a condition, not the mean of each trial's own peak.

Parameters


The result becomes the baseline map for each event condition.

The response map is calculated across the selected response frames and repetitions before baseline subtraction.

all uses every frame after the baseline. A numeric non-negative interval is measured in seconds after the baseline and must fit inside each trial.

Frame rate (in Hz) of the input data. It is provided automatically by the pipeline or by the .dat header. AcqInfos.mat is not used.


Back to top

Copyright © LabeoTech 2023. This work is licensed under the GNU General Public License, Version 3.0.