I am trying to perform "dipole scanning". Right now I have about 200 individual dipoles generated for each of the epileptic-spike-epochs. Currently the procedure I follow is to carefully open the parent folders for each of the dipoles and select each of these dipoles (200 dipoles!) and finally right click and merge them.
I am looking for a more efficient way of selecting these dipoles. I tried to use the "search database" tool, but although the result shows the dipoles I desire, it also contains the parent folders. So again, I need to open the parent directories and meticulously select all the 200 dipoles.
P.S.: I tried to drag and drop the dipoles into the process tab, however, it seems that the process tab cannot read them.
Indeed, there is solution for selecting dipoles files...
@MartinC Would there be an easy way with the search panel functions to get a cell array of the file paths that are selected with a search, so that it could be used in a script?
I don't want to hijack the thread, but I ran into a similar problem with folders. The search allows returning folders, but there is no way to select them all across subjects, nor a way to apply a process to folders I believe. (I wanted to delete them.)
Thank you, Marc and Francois, for the quick responses.
@Francois you mentioned that there might be another solution. Could you give me an idea or give me a hint on where to begin? I thought maybe I could generate a script for selecting these dipoles; however, I am somehow a beginner.
Thank you for your feedback on the search feature. Once a search is active, you can click on the search icon again and generate the process call to use it in a script (I just fixed a minor bug about this feature). For a search on dipoles, it gives us the following:
sFiles = bst_process('CallProcess', 'process_select_search', , , ...
'search', '([type EQUALS "Dipoles"])');
Running this in a script will populate the sFiles with a Brainstorm file structure of every dipole files in your protocol.
This will only work for functional files, not for folders like Marc mentioned. Probably the best solution would be to add an option to the search dialog to hide the parent folders/subjects so that people can easily select all files/folders with SHIFT + Click to do operations on multiple files at once such as merging dipoles or deleting folders. I will look at this in the coming days, along with your other suggestions Marc.
Thank you all!
Thanks @MartinC. I really look forward to that feature of "being able to hide parent folders of files". In the meanwhile I will try using the script feature and the piece of code you suggested.
All the best,
@Marc.Lalancette You can select the recordings in these folders, then use the process File > Delete files > Delete folders.