Group conditions error?

Hello,

I have a problem with the “group conditions” command.

  • I have extracted (Import in database) epochs from continuous data (Elekta MEG), and now I would like to group different conditions together.

  • I have selected a number of conditions, right-clicked, and selected the “Group conditions” options.

  • A window has popped up for specifying the name of the new condition, which I did.

  • Then the original conditions disappeared, replaced by the new condition, which however contains no data: I cannot open it and if dragged to the “Files to Process” it indicates 0 trials.

  • during this operation, the following alert appeared on the matlab command window:
    “BST> Group conditions: Applying process_megreg to the data before proceeding, this will most likely alter the recordings.”

Thanks for your help,

Marco

Hi Marco,

I fixed this bug.
I’m sorry for the two conditions you lost on the way…

Francois

Thanks it works now!

Marco

Hi Francois,

unfortunately I met another subtle error when using the ‘group conditions’ command.

  • I have concatenated different steps of preprocessing (epoch from raw data, time offset correction, baseline correction), with the option ‘Create one condition for each event type’ and ‘Overwrite input files’.
  • When I group those conditions, the first trial of each condition is lost.
  • This problem does not occur if I do not tick the ‘Overwrite input files’ option.

Thanks,

Marco

Hi Marco,

Can you describe a bit more what you are doing? Are you running scripts or using the interface? What does your database look like before you group the conditions?
Can you tell me step by step what to do on my side to reproduce this error? A few screen captures of your database and the scripts you’re using would help.

A quick optimization note: if you place the baseline correction right after the import, the two are going to be grouped as one operation, just like when you use the regular interface to epoch the recordings.

Cheers,
Francois

Sure.

I am using the interface.

I process 2 raw data files (Elekta MEG) (corresponding to two runs of my experiment) by dragging them into the Process1 window and adding together three processes selected with the RUN button (Import MEG/EEG: Events, Add time offset, Remove baseline) with the option ‘Overwrite input files’. See Figure Preprocess for a snapshot of the process selection and of the folders obtained after running it for each condition (11,12,13,31,32,33), containing 6 trials per condition.

Now I select (Ctrl+Left Click) the folders of the six conditions simultaneously and select the ‘Group Conditions’ option with the right click. I obtain a new folder (which I called ‘Grouped conditions’) that contain 5 (and not 6) trials for each condition (see Figure GroupedConditions). The first trial of each condition is lost.

Note that this only happens if I process two different runs together, and only in this case I get the alert
BST> Group conditions: Applying process_megreg to the data before proceeding, this will most likely alter the recordings.

Maybe megreg is the problem? Note that I did not apply Brainstorm’s coregistration between different runs, because I use Elekta’s co-registration algorithm when running Maxfilter at a previous stage.

I can get around this bug, but I think it’s better if you are aware of it.

Please let me know if there is something unclear left.

Best,

Marco

[QUOTE=Francois;5295]Hi Marco,

Can you describe a bit more what you are doing? Are you running scripts or using the interface? What does your database look like before you group the conditions?
Can you tell me step by step what to do on my side to reproduce this error? A few screen captures of your database and the scripts you’re using would help.

A quick optimization note: if you place the baseline correction right after the import, the two are going to be grouped as one operation, just like when you use the regular interface to epoch the recordings.

Cheers,
Francois[/QUOTE]

Hi Marco,

I changed a few things in the way the conditions are grouped, I think it should solve this bug.
Let me know if it working any better.

A few notes:

  • If you run the process “Remove DC offset” right after the process “Import MEG/EEG”, the two would be grouped together at the execution time, and the baseline correction would be performed directly on the fly, rather than saving+reading+processing+saving again.
  • If all your runs have been co-register together, you can your life much easier by selecting the option “Yes, use one channel file per subject” in the subject’s options (double-click on the subject).
  • If they haven’t been co-registered before, you should not import your runs this way if the same event/condition is present in the two runs. The import of the first run would create a condition A, save a channel file for it and import the recordings. The import of the second run would overwrite the channel file in condition A, resulting in the loss of the position information in the first run. To work around this: UNcheck the option “Create one condition for each event type” in the import process. It would create one folder for each run in input, and save all the epochs in it.

Cheers,
Francois