PreProcessing - Meg Wiki
location: PreProcessing

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, 0.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

% you can pre-specify a list of files here
fiff_files = {'/fullpath/file4subj1.fif', ...
         '/fullpath/file4subj2.fif', ...
         '/fullpath/file4subj3.fif'};

out_ext = '_f';   % suffix for filtered output files

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

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 --projoff --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)