This page will help you set up your own automatic MaxFilter pipeline
There are two main reasons why you would want an automatic procedure
You can do it yourself by using the template that NatMEG offers
When you have run through the setup steps below, you will be able to maxfilter all your files with a single command, which you will be find at the end of this tutorial
Follow these simple steps: (be sure to run the commands exactly as entered)
cd data_scripts/personal_maxfilter_scripts
touch your_name.sh
cat ../maxfilter_master.sh | tee ./your_name.sh
gedit your_name.sh ## 5a
vim your_name.sh ## 5b
Edit your file
Here the relevant lines (10-18) are shown:
Change only what is on the right hand side of the equal sign (=)
Default settings are set (except for project of course), but they may be changed according to researcher wishes
NB! MAKE SURE THAT THERE IS A SPACE BETWEEN VARIABLES AND COMMENT SIGNS (#), E.G. correlation=0.98 ## some comment NOT E.G. correlation=0.98#some comment
project=your_project_name_here ## the name of your project in /neuro/data/sinuhe
correlation=0.98
autobad=on # on/off
tsss_default=on # on/off (if off does Signal Space Separation, if on does temporal Signal Space Separation)
cal=/neuro/databases/sss/sss_cal.dat
ctc=/neuro/databases/ctc/ct_sparse.fif
movecomp_default=on # on/off
trans=off # on/off
transformation_to=default ## default is "default", but you can supply your own file
empty_room_files=( 'empty_room.fif' 'also_empty_room.fif' 'etc.' ) ## put the names of your empty room files (consistent naming makes it a lot easier) (files in this array won't have "movecomp" applied) (no commas between files and leave spaces between first and last brackets)
headpos=off # on/off ## if "on", no movement compensation (movecomp is automatically turned off, even if specified "on")
force=off # on/off, "forces" the command to ignore warnings and errors and OVERWRITES if a file already exists with that name
downsampling=off # on/off, downsamples the data with the factor below
downsampling_factor=4 # must be an INTEGER greater than 1, if "downsampling = on". If "downsampling = off", this argument is ignored
sss_files=( 'only_apply_sss_to_this_file.fif' 'resting_state.fif' ) ## put the names of files you only want SSS on (can be used if want SSS on a subset of files, but tSSS on the rest)
apply_linefreq=off ## on/off
linefreq_Hz=50 ## set your own line freq filtering (ignored if above is off)
chmod u+x your_name.sh
./your_name.sh
./data_scripts/personal_maxfilter_scripts/your_name.sh