|
Size: 2431
Comment:
|
Size: 3393
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 15: | Line 15: |
| In this second call to maxfilter there are a number of different things that you can do together in one call to max filter. | 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. |
| Line 17: | Line 17: |
| The most simple 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 20: | Line 20: |
| Sometimes there are artifacts left in the data after running SSS, e.g. sensor jumps, which can be dealt with by using the temporal expansion (-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 secs which corresponds to a high pass filter of 0.25Hz. If you are keen to keep lower frequencies you can set the buffer time to be longer (e.g 10secs 0.1Hz), at the cost of processing time. | 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 23: | Line 23: |
| * | 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). |
| 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> |
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:
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.
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).
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>
NB. Due to a bug in maxfilter you must not run autobad and anything else together!
