Process_select_files not working for link to raw files?

Hi BST community,
I am trying to use process_select_files_timefreq to select a couple of PSD files (shown below) under the link to raw file and realised that this process doesn't work for link to raw files. I was hoping to use the script below to select (via for loop) over subjects and conditions (which in this case was the folder to the link to raw file) hundreds of PSD files for further processing.

Is it possible for the select files process to be changed so that it can work with link to raw files?
What other options do I have to achieve this?

image

% Subject names
SubjectNames = {'Test_PSD'};

% Participant Names
Conditions = {...
    '5AD13_s3_sleep_epochs'};

% Event names
Events       = {'PSD'};

for iSubject = 1 : length(SubjectNames)
    subjectName = SubjectNames{iSubject};

    for iCondition = 1 : length(Conditions)
        conditionName = Conditions{iCondition};

        for iEvents = 1 : length(Events)
            eventName = Events{iEvents};
        
        % Process: Select timefreq files
        sFiles = bst_process('CallProcess', 'process_select_files_timefreq', sFiles, [], ...
            'subjectname',   subjectName, ...
            'condition',     conditionName , ...
            'tag',           eventName, ...
            'includebad',    0, ...
            'includeintra',  0, ...
            'includecommon', 0);

It does work with raw conditions. Their names must start with @raw.

You can find the name of the conditions with this:

sSubject = bst_get('Subject', subjectName);
sStudies = bst_get('StudyWithSubject', sSubject.FileName);
1 Like

@Raymundo.Cassani my apologies - thank you for letting me know :slight_smile:
Things are now working nicely.