[Eeglablist] Precomputing / calculating ERSPs and study design for STUDYs with timewarped and non-timewarped trials

Hauge,Theresa C theresa.hauge at ufl.edu
Sat Dec 7 11:55:47 PST 2024


Hello,

I am attempting to precompute my ERSPs at the component level for a STUDY in which each subject has a single dataset that contains 1) epochs for the baseline trial (epoched around a sync pulse) and 2) timewarped epochs from the game play trials (epoched around a sequence of contacts with a ball). Currently, I am able to create a STUDY and precompute the ERPs and power spectra; however, I receive an error message when the ERSP calculations begin:

{
Index in position 2 exceeds array bounds. Index must not exceed 71.

Error in timefreq (line 500)
        outOfTimeRangeTimeWarpMarkers = find(timemarks(:,t) < min(g.indexout) | timemarks(:,t) >
        max(g.indexout));

Error in newtimef (line 1181)
    [alltfX freqs timesout R] = timefreq(data, g.srate, tmioutopt{:}, ...

Error in std_ersp (line 341)
            newtimef( timefdata, length(pointrange), g.timelimits, EEG(1).srate, tmpparams{2:end}); %
            original code

Error in std_precomp (line 425)
                std_ersp(ALLEEG(inds), 'components', chanlist{inds(1)}, addopts{:});
}

So far I have attempted the following:

  1.  Making two separate studies, one with the Baseline trials and another with the game trials. This does work, but requires twice the preparation before plotting ERSPs. I also do not know where to go from here with regards to the statistics for the ERSPs.
  2.  Creating a STUDY with a baseline dataset and trial dataset loaded for each subject. When I precompute I only choose the game datasets or the baseline datasets for the std_precomp function, and this also works.

What is the most efficient way to manage this issue? Would any approach be easier to evaluate statistically when ERSPs are plotted? I am pretty sure that the error comes from the mismatch of trials/epochs in the dataset (including game and baseline epochs) vs the timewarp structure (game play epochs), but I don't know if there is a way to have the baseline/non-timewarped trials to be ignored or handled separately within the same dataset?


Sincerely,
            Theresa Hauge




Theresa C. Hauge, M.A.
She/Her/Hers
PhD Candidate, Applied Physiology & Kinesiology
Neuromotor Behavior Laboratory
University of Florida
theresa.hauge at ufl.edu<mailto:theresa.hauge at ufl.edu>
@TheresaCHauge



More information about the eeglablist mailing list