Scripting in common files

Hi everyone,

I want to use scripting to batch the steps of adding EEG positions file (in common files for a subject), then computing head model with OpenMEEG (also in common files), then computing sources (kernel).

Even after looking at the Scripting tutorial, I can’t seem to figure out how to use Process 1 and scripting to do the above steps in the common files for a subject (because there is no specific starting file to drag-drop into Process 1). Any assistance would be greatly appreciated.

Best,
Jayson

PS there seems to be a issue that causes the program to crash with red error message when I click ‘source estimation options’ in ‘Compute sources (2018 or 2016)’ opened up in Process 1 / Run.

Even after looking at the Scripting tutorial, I can’t seem to figure out how to use Process 1 and scripting to do the above steps in the common files for a subject (because there is no specific starting file to drag-drop into Process 1)

The processes to manipulate the channel files and compute forward/inverse models take in input recordings (=data files), not the channel file itself. You need to have some EEG recordings available in the database to be able to run these processes from a script.

Your script can be started explicitly by selecting the files in the Process1 tab (drag and drop from the database) or by selecting the files with a selection process (File > Select files: *).
https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting#Starting_a_new_script

PS there seems to be a issue that causes the program to crash with red error message when I click ‘source estimation options’ in ‘Compute sources (2018 or 2016)’ opened up in Process 1 / Run.

Please report the full error message and the context in which in occurs (in a different thread of this forum).