The Apps created as part of the MEEG Brainlife project are supposed to be run one after another. Thus the output of an App will be the input of another.
To test how it works, I decided to apply app-bad-channels
and then app-maxfilter
First attempt
app-bad-channels:
no optional files present in file mappingapp-maxfilter
: no optional files listes in file mapping
Result: it works fine
Second attempt
app-bad-channels
: optional files present in file mappingapp-maxfilter
: optional files present in file mapping
Result: app-bad-channels
works but app-maxfilter
failed:
OSError: trans file "../60618e5b750389e448ebecd7/out_dir_bad_channels/destination.fif" not found
The optional file is indeed not in out_dir_bad_channels
.
Indeed, the app-maxfilter
takes in input the files corresponding to the datatype meg/fif
present in out_dir_bad_channels
, but here only meg.fif
is in this folder.
How to address this issue
The only way to solve this issue is to save in the output directory the files you want to use as optional inputs of the next App. So here, the destination file must be saved in out_dir_bad_channels
.
To do so, we add the following line to the main function for each optional file:
shutil.copy2(calibration_file, 'out_dir_bad_channels/calibration_meg.dat')
Add Comment