aggregate function

apply_aggregate_function


Applies an aggregate function ('mean', 'max', 'min', 'median', 'mode', 'sum', 'std') to one of the dimensions of the data.

Description


This function applies one of the following aggregate functions to a selected dimension of the imaging data:

  • mean (average)
  • median
  • max
  • min
  • mode
  • sum
  • std (standard deviation)

Generally, this function is used as an intermediate step of the data processing in order to reduce the data's dimension (i.e. aggregation). For instance, you can use the apply_aggregate_function to apply the "mean" to the Events dimension of a data containing the response amplitude maps to a stimulus which creates the average event-triggered cortical maps.

Input


This function accepts all .dat files containing imaging data except correlation maps (with dimensions Y,X,S).

The algorithm


When applying an aggregation function over the dimensions Y,X or T, the resulting data will lack this dimension. This occurs because the aggregation of the data creates a singleton dimension which is automatically eliminated. For instance, if you apply the "mean" across the Time dimension of an image series (Y,X,T) the resulting dataset will have dimensions Y and X.

The only exception is when the function is applied to the Events dimension. In this case, the aggregation function will be applied across the repetitions of each event. Thus, the dimensions of the output data will remain the same.

Output


This function creates the aggregated data and a meta data structure containing the information about the data (e.g. new dimensions and sizes).

Parameters


The parameters of this function are the following:

Select the aggregation function to be applied over a dimension of the input data.

This parameter sets the dimension to perform the aggregation function (aggregateFcn) on. In case of the dimension E, the aggregation function will be applied over the repetitions of each event.


Back to top

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