methlabUZH / automagic

Automagic
GNU General Public License v3.0
94 stars 32 forks source link

Using EEGLab epoched data has input #38

Closed pauldhami closed 3 years ago

pauldhami commented 3 years ago

Greetings!

Apologizes for what may be a trivial question, but can epoched resting state EEG data be used as the initial EEG.set input into automagic?

I have used a continuous file, and things seemed to work well now.

However, I tried using a file that was first epoched, and run into the following error:

Warning: [MATLAB:subsassigndimmismatch]
Unable to perform assignment because the size of the left side is 58-by-245760 and the size of
the right side is 58-by-1024-by-240.

Error in removeTrend (line 67)
    EEG.data(detrendOut.detrendChannels, :) = EEG1.data;

Error in prepPipeline (line 114)
    [EEGNew, detrend] = removeTrend(EEG, params);

Error in performPrep (line 105)
[new_EEG, ~, ~] = prepPipeline(new_EEG, prepParams);

Error in preprocess (line 199)
[EEG, EOG] = performPrep(EEG, EOG, PrepParams, EEGSystem.refChan);

Error in Block/preprocess (line 517)
            [EEG, fig1, fig2, fig3] = preprocess(data, self.params);

Error in Project/preprocessAll (line 501)
                [EEG, automagic] = block.preprocess();

Error in LiveEditorEvaluationHelperESectionEval8af18c26 (line 58)
project.preprocessAll();

Error in matlab.internal.editor.evaluateCode 
Perform Filtering...
Perform EOG Regression...
Error using  ' 
Transpose on ND array is not defined. Use PERMUTE instead.

Error in performEOGRegression (line 31)
eeg = EEG.data';

Error in preprocess (line 278)
EEG = performEOGRegression(EEG, EOG, EOGRegressionParams);

Error in Block/preprocess (line 517)
            [EEG, fig1, fig2, fig3] = preprocess(data, self.params);

Error in Project/preprocessAll (line 501)
                [EEG, automagic] = block.preprocess();

Error in automagic_test (line 58)
project.preprocessAll();

Or should epoching be saved until after the preprocessing is completed by automagic on a continuous dataset?

Sorry for what may be trivial questions.

Best, Paul

ksgfan commented 3 years ago

Hi Paul

automagic (and some Eeeglab functions used in automagic-here prepPipeline) work only on continuous data.

Best, Dawid