How to select statistic files by scripting

Hey,
I have several statistic files computed by ft_freqstatistics, by subject. I would like to select them by scripting. How to do it, please? I tried with process_select_files_timesfreq or process_select_tag but it didn’t work.

Hello
The selection processes (process_*) are not meant to select statistics results.
In general, there are no processes that take in input multiple stat files, therefore this possibility has not been implemented.

Either you select all your files form the interface, select any process, generate the corresponding script and you’d get the list of files in your script.
Otherwise, you can grab all the stat files for one subject with lower-level calls. For instance:

[sSubject,iSubject]=bst_get('Subject', 'Group_analysis')
sStudies = bst_get('StudyWithSubject', sSubject.FileName, 'intra_subject')
sStat = [sStudies.Stat]
sFiles = {sStat.FileName}
1 Like