Using Script to Import EEGLAB files - How to import with Condition folders

Dear Brainstorm community,

So far, I've been manually using the GUI to import individual EEGLAB files which are already preprocessed and epoched. The data is an ERP study, with 4 conditions of interest, with the event values of interest under EEG.event.type being 'Go_Happy', 'Go_Angry', 'NoGo_Happy', and 'NoGo_Angry'.

When using the GUI to import, I can select these 4 conditions, and Brainstorm imports the epochs into their own unique event-named folders like this:

Screen Shot 2020-03-27 at 5.30.40 PM

I would like to however script this process using 'process_import_data_epoch'. I have tried many combinations of filling in the 'eventtypes' field, but I keep ending up with a generic folder with all the epochs under it like this:

Screen Shot 2020-03-27 at 5.33.06 PM

This is my Conditions selection screen when using the GUI:

Screen Shot 2020-03-27 at 5.33.55 PM

and the Import EEG-EEGLAB file screen:

Screen Shot 2020-03-27 at 5.34.30 PM

Any help as to what I can do to get the epochs into their individual condition folders while using the script would be greatly appreciated.

Thank you,

You need to enter only "type" as the option "Event types", together with the option "Create one condition for each event type".

Example for a file where I want to use the parameter "cell" to classify my epochs:

image image

From the pipeline editor, it looks like this:

The output structure in the database explorer:

(watch out for the additional input parameters: the DC offset correction must be added as a separate process - in my example, the GUI version is corrected but not the script version)