Selecting files in the database

When you have lots of files in a folder, like multiple source reconstructions of time-frequency files for each trial, it is difficult to grab just the ones you are interested in. Two mechanisms can help you: the Filter box and the process "File > Select files with tag".

Filter text box

You want to select only the averages in the data files in the protocol TutorialRaw. Drag and drop all your files there, then use the Filter search box at the bottom-right of the Brainstorm window. Type the string "Avg" to keep only the files that contain this string.

allFiles.gif

Problem: You just want to select for instance the constrained and z-scored files "MN: MEG(Constr) | abs | zscored". With the tags checkboxes, you can manage to select either all the zscored or non-zscored files, but you cannot separate from the constrained and unconstrained files.

Solution: Use the process "File > Select files with tag" to select files with text searches in the file names (what appears on the hard drive, with the ".mat" at the end) or comments (what is displayed in the Brainstorm database explorer). This selects a subset of the files and passes it to the next process in the pipeline.

selectFiles.gif

Note that the search is not sensitive to case. If you try to select the constrined sources using the string "Constr" in the comments, it would return all the files, because this matches at the same time "Constr" and "Unconstr". But you can do the opposite instead: exclude the files that contain "Unconstr".

Results: To see the list of files that was selected by the process, you can open the report viewer (File > Report viewer). This lists the input files (all the files) and the final files (the selected files), with a summary of how many files where selected on the top.

selectReport.gif

After: This process is useless if it is not followed immediately by another process that would do something with the selected files. An application can be the deletion of some files, by adding the process "File > Delete files".

How to control the output file names: If you are running two processes with different parameters but that produce exactly the same file names and file comments, you wouldn't be able to select them with this process. But immediately after calling any process, you can add the process "File > Add tag" to tag one specific set of files, so that you can re-select them easily later.

Example: you run twice the time-frequency decomposition with different options on the same files, tag the files after calculating them with different tags.

addTag.gif

SelectFiles (last edited 2014-02-07 23:14:04 by agrippa)