calculateResponseFeatures
Calculates the amplitude and latencies from ROI event-triggered data.
Description
This function calculates the following features from the responses to events:
- Peak amplitude
- Peak latency
- Onset amplitude
- Onset latency
- Area under the curve (AUC) amplitude
The response peak is the maximum - or minimum if the response polarity is negative - in the time window post-event set in the parameters. The onset value is the point where the signal crosses the threshold, set in the parameters as a multiple of the standard deviation of the signal in the pre-event time.
The peak and onset amplitudes are calculated as their values minus the average of the pre-event period. The latencies are calculated as the time delay of the Peak response from the event onset time in seconds.
The AUC amplitude is calculated as the AUC in the post-event time window minus the AUC in the pre-event period.
Response features
Input
This function accepts data from a .mat file created using the function getDataFromROI with the temporal signal split by event (with dimensions 'O', 'E', 'T').
Output
The output of this function is a .mat file containing the response features stated in the description.
For additional details on the data structure of the output file, please click here.
Parameters
Multiplication factor for the standard deviation of the pre-event period. This value is used as a threshold to calculate the response onset parameter. If the responses do not cross this threshold, the onset data will return as NaN.
Polarity of the response. It is worth noting that bipolar responses (with positive and negative elements) are not covered by this function.
Time window in which the response features (peak, onset and AUC) will be calculated. If set to "all" (default), all period post-event onset will be used. Otherwise, provide a pair of values separated by a semicolon representing the start and end of the time period from the event onset. For instance, if you want to calculate the response in a time window of 2 seconds but ignore the first 0.5 seconds of the response, the TimeWindow_sec value is set as 0.5;2.5.