Diff for "PreProcessing" - Meg Wiki
location: Diff for "PreProcessing"
Differences between revisions 1 and 2
Revision 1 as of 2009-03-19 14:32:00
Size: 1655
Editor: YaaraErez
Comment:
Revision 2 as of 2009-03-19 14:32:41
Size: 1653
Editor: YaaraErez
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
{{{ {{
Line 35: Line 35:
}}} }}

Before averaging or regression analysis, I recommend to apply reasonable high/low-pass filters to your raw data, which may significantly reduce the noise level of your results. For "normal" evoked responses, 1-40Hz would be a good choice. Here's one way of doing it, using the MNE utility mne_process_raw:

{{ % This script uses mne_process_raw in order to high/low-pass filter MEG data % cell array "fiff_files{}" specifies a list of files to be filtered % "filters.high"/"filters.low" specify cut-off frequencies for high/low-pass filters, respectively % "out_ext" specifies the suffix that will be attached to the input files after filtering ('_t' is default) % OH, March 2009

if exist('fiff_files')~=1, % you can pre-specify a list of files here

  • fiff_files = {'/fullpath/file4subj1.fif', ...
    • '/fullpath/file4subj2.fif', ... '/fullpath/file4subj3.fif'};

end;

if exist('out_ext')~=1, % suffix for filtered output files

  • out_ext = '_f';

end;

if exist('filters')~=1, % default cut-off frequencies for high/low-pass filters

  • filters.high = 1; % default 1Hz for high-pass filters.low = 40; % default 40Hz for low-pass

end;

nr_files = length(fiff_files);

for ff = 1:nr_files,

  • [thispath, thisfile,thisext,thisversn] = fileparts(fiff_files{ff}); fiff_outfile = fullfile(thispath, [thisfile out_ext '.fif']); % Run filter using mne_process_raw eval( sprintf('!/imaging/local/linux/mne_lws/bin/mne/mne_process_raw --digtrig STI101 --raw %s --highpass %f --lowpass %f --save %s', fiff_files{ff}, filters.high, filters.low, fiff_outfile) );

end; }}

CbuMeg: PreProcessing (last edited 2013-03-08 10:02:43 by localhost)