Retrieve projectors programatically

Hi!

I am programming an automated preprocessing protocol and I would like to do it fully-automatic.

Based on its "targetting %" I would like to flag the components to be removed, or to be kept.
Thus, I would like to know if there is any way to select the active projectors programatically (in a script) viewing its "targeting %".

Furthermore, I am obtaining the following error when removing cardiac artifacts vía SSP.


I don't fully understand what is the problem, it detects only 3 events, although I have 18?

Finally, I have a last question. Supose that I detect cardiac artifacts and they are automatically split in three categories (cardiac, cardiac2, cardiac3). When removing cardiac artifacts with SSP, selecting "cardiac" as event name... It will take the evects in all the categories (cardiac, cardiac2 and cardiac3) because they have the same origin, or only "cardiac"?

Thank you very much in advance.
Victor

1 Like

See the documentation of the SSP data structures in the tutorials - SingVal contains the percentage value you need:
https://neuroimage.usc.edu/brainstorm/Tutorials/ArtifactsSsp#On_the_hard_drive

I don't fully understand what is the problem, it detects only 3 events, although I have 18?

This I don't know, you might want to check what is happening with the Matlab debugger.
(search the Brainstorm code for a part of the error message, eg. "Not enough time samples" with the "Search files" window - CTRL+SHIFT+F, put a breakpoint, and explore the variables when it stops, or start debugging at the top of the function)

When removing cardiac artifacts with SSP, selecting "cardiac" as event name... It will take the evects in all the categories (cardiac, cardiac2 and cardiac3) because they have the same origin, or only "cardiac"?

No, selecting the event "cardiac" would not return anything.
You have an option in the SSP computation to disable this classification, but you may run into problems if you group events that contain different sources of noise, or different cardiac components.

Automating this in a reliable way is complicated with the current workflow and methods... this is why it is still semi-manual in Brainstorm.

Understood! Thank you for your time. I see that it's pretty difficult to automate this step, maybe I should try other approaches...

Thank you again Francois!