Diff for "maxpreproc" - Meg Wiki
location: Diff for "maxpreproc"
Differences between revisions 8 and 9
Revision 8 as of 2008-11-11 13:52:56
Size: 1616
Editor: MarieSmith
Comment:
Revision 9 as of 2008-11-11 14:01:27
Size: 2431
Editor: MarieSmith
Comment:
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
Each step is detailed below along with code that you can use. NB you need to input your file names in the appropriate places. 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.
Line 15: Line 15:
In this second call to maxfilter there are a number of different things that you can do together. The most simple would be to run only SSS correction with your list of bad channels as: In this second call to maxfilter there are a number of different things that you can do together in one call to max filter.
Line 17: Line 17:
 * 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> The most simple 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 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.

 * 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>
 *

A practical guide to using maxfilter for meg data pre-processing. Typically pre-processing requires three steps:

  1. finding bad channels,
  2. applying sss to remove noise,
  3. 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 together in one call to max filter.

The most simple 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 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.

  • 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>

NB. Due to a bug in maxfilter you must not run autobad and anything else together!

CbuMeg: maxpreproc (last edited 2024-02-22 12:12:36 by RikHenson)