|
Size: 3393
Comment:
|
Size: 4349
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 17: | Line 17: |
| The most simple call would be to run '''''only spatial SSS''''' correction with your specified list of bad channels as: | The most simple call would be to run only spatial SSS correction with your specified list of bad channels as: |
| Line 19: | Line 19: |
| * maxfilter -f <rawdata_file> -o <output_file> -ctc /neuro/databases/ctc/ct_sparse.fif -cal /neuro/databases/sss/sss_cal.dat -autobad off -bad <list of bad channels> -v | tee <log_file> Sometimes there are artifacts left in the data after running SSS, e.g. sensor jumps, which can be dealt with by using the '''''temporal extension''''' (-st) to maxfilter. To use this option you are required to specify a temporal buffer over which it will work. The default buffer is 4 seconds which corresponds to a high pass filter of 0.25Hz. If you are keen to keep lower frequencies then you can set the buffer time to be longer (e.g 10secs - 0.1Hz), at the cost of processing time. |
* '''[SSS]''' maxfilter -f <rawdata_file> -o <output_file> -ctc /neuro/databases/ctc/ct_sparse.fif -cal /neuro/databases/sss/sss_cal.dat -autobad off -bad <list of bad channels> -v | tee <log_file> Sometimes there are artifacts left in the data after running SSS, e.g. sensor jumps, which can be dealt with by using the temporal extension (-st) to maxfilter. To use this option you are required to specify a temporal buffer over which it will work. The default buffer is 4 seconds which corresponds to a high pass filter of 0.25Hz. If you are keen to keep lower frequencies then you can set the buffer time to be longer (e.g 10secs - 0.1Hz), at the cost of processing time. |
| Line 22: | Line 22: |
| * maxfilter -f <rawdata_file> -o <output_file> -ctc /neuro/databases/ctc/ct_sparse.fif -cal /neuro/databases/sss/sss_cal.dat -autobad off -bad <list of bad channels> -st 10 -v | tee <log_file> The reason for using cHPI (continuous head position tracking) during recordings is so that we can monitor / correct for movements of the head of our participants within a recording session. To monitor headmovements and output them to a file we use the -headpos option. To correct for movements we use the -movecomp option. With both options we specify the log file which will store the head position parameters (to be visually inspected later) and set the estimation interval (normally 200ms but 500 and 1000ms also available). |
* '''[SSS, -ST]''' maxfilter -f <rawdata_file> -o <output_file> -ctc /neuro/databases/ctc/ct_sparse.fif -cal /neuro/databases/sss/sss_cal.dat -autobad off -bad <list of bad channels> -st 10 -v | tee <log_file> The reason for using cHPI (continuous head position tracking) during recordings is so that we can monitor / correct for movements of the head of our participants within a recording session. To monitor headmovements and output them to a file we use the -headpos option. To correct for movements we use the -movecomp option. With both options we specify the log file which will store the head position parameters (to be visually inspected later) and set the estimation interval (normally 200ms but 500 and 1000ms also available). You can also choose to have maxfilter subtract out the cHPI signals (very high frequencies) from your data by using the -hpisubt option (either amp or off). |
| Line 25: | Line 25: |
| * maxfilter -f <rawdata_file> -o <output_file> -ctc /neuro/databases/ctc/ct_sparse.fif -cal /neuro/databases/sss/sss_cal.dat -autobad off -bad <list of bad channels> -st 10 -movecomp -hpistep 200 -hp <head_pos_log_file> -v | tee <log_file> | * '''[SSS, -ST, -movecomp]''' maxfilter -f <rawdata_file> -o <output_file> -ctc /neuro/databases/ctc/ct_sparse.fif -cal /neuro/databases/sss/sss_cal.dat -autobad off -bad <list of bad channels> -st 10 -movecomp -hpistep 200 -hp <head_pos_log_file> -hpisubt amp -v | tee <log_file> During head movemement compensation or estimation, maxfilter continually acceses the cHPI data. If HPI failed at some point during your run, head movement compensation/estimation will fail and the resulting data block will be set to zero. To force maxfilter to use the last known HPI position you can use the -movecomp inter option. But be careful if this happens early on in your file as you will not really be performing movement correction anymore. * '''[SSS, -ST, -movecomp inter]''' maxfilter -f <rawdata_file> -o <output_file> -ctc /neuro/databases/ctc/ct_sparse.fif -cal /neuro/databases/sss/sss_cal.dat -autobad off -bad <list of bad channels> -st 10 -movecomp inter -hpistep 200 -hp <head_pos_log_file> -hpisubt amp -v | tee <log_file> |
A practical guide to using maxfilter for meg data pre-processing. Typically pre-processing requires three steps:
- finding bad channels,
- applying sss to remove noise,
- transforming the data to a different co-ordinate frame.
Each step is detailed below along with code that you can use. NB you need to input your file names in the appropriate places. For full details of maxfilter and the options used below please see the Maxfilter manual.
Step 1. Identifying Bad Channels with Maxfilter
In the first step, we call maxfilter to establish which channels in the data set are bad by using the -autobad option. Maxfilter scans the first 20 seconds of your recording (or however long you waited before turing on cHPI) and returns the output to a log file. To save time we tell maxfilter to skip the remainder of the file. The -ctc and -cal options refer to the fine calibration and cross talk correction data specific to our MEG system. Inputting them to maxfilter will produce a better result.
maxfilter -f <rawdata_file> -o <output_file> -ctc /neuro/databases/ctc/ct_sparse.fif -cal /neuro/databases/sss/sss_cal.dat -autobad 20 -skip 21 999999 -v | tee <log_file>
Step 2. Applying Signal Space Separation
In this second call to maxfilter there are a number of different things that you can do. Just pick and choose from the following commands to do what you want with your data. All of the following options can be put in one call to maxfilter, and it doesn't matter which order you type them in.
The most simple call would be to run only spatial SSS correction with your specified list of bad channels as:
[SSS] maxfilter -f <rawdata_file> -o <output_file> -ctc /neuro/databases/ctc/ct_sparse.fif -cal /neuro/databases/sss/sss_cal.dat -autobad off -bad <list of bad channels> -v | tee <log_file>
Sometimes there are artifacts left in the data after running SSS, e.g. sensor jumps, which can be dealt with by using the temporal extension (-st) to maxfilter. To use this option you are required to specify a temporal buffer over which it will work. The default buffer is 4 seconds which corresponds to a high pass filter of 0.25Hz. If you are keen to keep lower frequencies then you can set the buffer time to be longer (e.g 10secs - 0.1Hz), at the cost of processing time.
[SSS, -ST] maxfilter -f <rawdata_file> -o <output_file> -ctc /neuro/databases/ctc/ct_sparse.fif -cal /neuro/databases/sss/sss_cal.dat -autobad off -bad <list of bad channels> -st 10 -v | tee <log_file>
The reason for using cHPI (continuous head position tracking) during recordings is so that we can monitor / correct for movements of the head of our participants within a recording session. To monitor headmovements and output them to a file we use the -headpos option. To correct for movements we use the -movecomp option. With both options we specify the log file which will store the head position parameters (to be visually inspected later) and set the estimation interval (normally 200ms but 500 and 1000ms also available). You can also choose to have maxfilter subtract out the cHPI signals (very high frequencies) from your data by using the -hpisubt option (either amp or off).
[SSS, -ST, -movecomp] maxfilter -f <rawdata_file> -o <output_file> -ctc /neuro/databases/ctc/ct_sparse.fif -cal /neuro/databases/sss/sss_cal.dat -autobad off -bad <list of bad channels> -st 10 -movecomp -hpistep 200 -hp <head_pos_log_file> -hpisubt amp -v | tee <log_file>
During head movemement compensation or estimation, maxfilter continually acceses the cHPI data. If HPI failed at some point during your run, head movement compensation/estimation will fail and the resulting data block will be set to zero. To force maxfilter to use the last known HPI position you can use the -movecomp inter option. But be careful if this happens early on in your file as you will not really be performing movement correction anymore.
[SSS, -ST, -movecomp inter] maxfilter -f <rawdata_file> -o <output_file> -ctc /neuro/databases/ctc/ct_sparse.fif -cal /neuro/databases/sss/sss_cal.dat -autobad off -bad <list of bad channels> -st 10 -movecomp inter -hpistep 200 -hp <head_pos_log_file> -hpisubt amp -v | tee <log_file>
NB. Due to a bug in maxfilter you must not run autobad and anything else together!
