2 simple questions

Robert Oostenveld r.oostenveld at FCDONDERS.RU.NL
Mon Jul 23 16:26:25 CEST 2007


Dear Andres,

On 17 Jul 2007, at 16:21, Andres Posada wrote:
> I am doing the tutorial but I am blocked in two different places:
> First, how I can prepocess (filter, baseline, etc) already saved
> data? I use
> manual artifact rejection and I save the data ('save
> PreprocDataClean dataFIC').

Normally you would filter and baseline correct only once, and that is
at the time of preprocessing. You cannot call the preprocessing
function multiple times.

> Now when I want to filter and baseline this data, I cannot access them
> (variable in matlab or a matlab file) with the commands:
>
> cfg = [];
> cfg.datafile    = 'PreprocDataClean.mat'; (?)

If you decide afterwards that you want to change your filter
settings, you either should call preprocessing once more (with
cfg.dataset=original_file). You can reuse  the cleaned trial
definition that results from rejectvisual as explained on
http://www2.ru.nl/fcdonders/fieldtrip/doku.php?
id=fieldtrip:documentation:tutorial:rejectvisual
and
http://www2.ru.nl/fcdonders/fieldtrip/doku.php?
id=fieldtrip:documentation:tutorial:eventrelatedaveraging#preprocessing_
the_data

A smart trich that you can use is that teh output data of each
fieldtrip function will contain the "cfg" field. I.e. the
rejectvisual function returns cleandata, with cleandata.cfg.trl
representing the trials that are actually clean. So you can easily
preprocess the clean segments of the data with other filter settings.

Alternatively, you can apply filters and baselinecorrection once more
when you call timelockanalysis. That function replicates most of the
filtering options of preprocessing, except that you cannot use filter
padding.

In your case, you could do

load PreprocDataClean
cfg            = [];
cfg.blc        = 'yes';                        % apply baseline
correction
cfg.blcwindow  = [-0.2 0];                     % baseline: -0.2 sec to 0
cfg.lpfilter   = 'yes';                        % apply lowpass filter
cfg.lpfreq     = 35;                           % lowpass at 35 Hz.
avgFIC         = preprocessing(dataFIC);

> The other problem, when I try to do the tutorial of beamforming,
> with the
> mri data of the subject01 (available online) there is a SPM bug! My
> version
> of Matlab is 7.0.1.24704 (R14) Service Pack 1 and I use SMP2 (last
> update).
>
> The commands:
>
> mri = read_fcdc_mri('Subject01.mri');
> cfg                 = [];
> cfg.name            = 'segment';
> cfg.write           = 'yes';
> cfg.coordinates     = 'ctf';
> [segmentedmri]      = volumesegment(cfg, mri);
>
> and the bug is:
> ...

> ??? Error using ==> spm_vol>subfunc1
> Can't get volume information for '/home/common/matlab/spm2/
> templates/T1.mnc'

You have to specify the exact path of the template file, which in
your case will not be on /home/common (as that is a network disk
within the FCDC).

best regards,
Robert

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip.



More information about the fieldtrip mailing list