Automatize DICS analysis

Hi, guys!

I have a task to compute source reconstruction:

create a sequence of DICS
for 4 frequencies: 5, 10, 15, 20 Hz ( we can change this according to the next report) for several overlapping temporal intervals: 600:1600 with width 400 ms , i.e. ( we can change this according to the next report) the first one will from 600 to 1000 ms, the second from 800 to 1200 ms etc
1000 to 1400
1200 to 1600
total, 4 x 6 = 24 T-Maps
In this way we are able to produce a sort of "movie" in the evolution of T-values maps across time for each frequency selected.
Each of these maps should be plotted in a separate figure and all figures should be ordered on the screen as 4 rows (frequency) and 6 columns (time) to visualize the temporal dynamics in frequency and time (each "pixel" of this TF map is an T-values map displayed on the average anatomy).

To do all of it manually in BS takes a lot of time and it's easy to confuse stuff. Is there a way (script) to automatize the process with the opportunity to go through all frequencies and all time windows for each subject individually and group analysis after that? I want to save each file with a corresponding names for each of the outputs in the BS database (because now I also have to give names manually each time) and also matfiles in the data folder to be saved with the same names as we see it in BS interface. Is it possible to do so?

The tutorial Scripting explains how to deal with Brainstorm data structures, basic database and display operations. Most of what you need is documented there. If you still have issues after reading it, please get back to us with more specific questions.
https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting

One step further, this other tutorial teaches how to create your own processes:
https://neuroimage.usc.edu/brainstorm/Tutorials/TutUserProcess

1 Like