Skip to content

hmrR_BlockAvg

jayd1860 edited this page Apr 11, 2023 · 1 revision

UI Name :
Block_Average

Syntax :
[data_avg, data_std, nTrials, data_sum2, yTrials] = hmrR_BlockAvg( data, stim, trange )

Description :
Calculate the block average given the stimulation conditions in s over the time range trange. The baseline of the average is set to zero by subtracting the mean of the average for t<0. If a stimulus occurs too close to the start or end of the data such that trange extends outside of the data range, then the trial is excluded from the average.

Input :

  • data: SNIRF.data container with the delta OD or delat concentration data.
  • stim: SNIRF.stim container with the stimulus condition data.
  • trange: defines the range for the block average [tPre tPost].

Output :

  • data_avg: SNIRF.data container with the averaged results
  • data_std: SNIRF.data container with the standard deviation across trials
  • nTrials: the number of trials averaged for each condition
  • data_sum2: SNIRF.data container
  • yTrials: a structure containing the individual trial responses

Usage Options :

  • Block_Average_on_Concentration_Data: [dcAvg, dcAvgStd, nTrials, dcSum2] = hmrR_BlockAvg( dc, stim, range )
  • Block_Average_on_Delta_OD_Data: [dodAvg, dodAvgStd, nTrials, dodSum2] = hmrR_BlockAvg( dod, stim, range )

Default Parameters :

  • trange: [-2.0, 20.0]

Prerequisites :

  • For the Block_Average_on_Concentration_Data Usage Option
    • Delta_OD_to_Conc: dc = hmrR_OD2Conc( dod, probe, ppf )
  • For the Block_Average_on_Delta_OD_Data Usage Option
    • Intensity_to_Delta_OD: dod = hmrR_Intensity2OD( intensity )
Clone this wiki locally