[FieldTrip] baseline correcting data with baseline coming from a different grandaverage

Tom Marshall tom.marshall at psy.ox.ac.uk
Fri Nov 2 23:29:10 CET 2018


Hey Cecilia,


I guess you could do that with a combination of 'ft_selectdata', and 'ft_math'.


Let's say you have datasets called 'stimlocked' and 'cuelocked'


You'd do something like:


% cut out baseline from cuelocked

cfg = [];

cfg.latency = [-0.5 0]; % or whatever your baseline window is

baseline = ft_selectdata(cfg, cuelocked);


% subtract baseline from stimlocked

cfg = [];

cfg.operation = 'subtract';

baseline_corrected_stimlocked = ft_math(cfg, stimlocked, baseline);


I think that ft_math allows you to input algebraic expressions too. So if you wanted to do, for example, a 'relchange' baseline correction you should substitute (something like)


cfg.operation = '(x1-x2)/x2';


Best,

Tom

________________________________
From: fieldtrip <fieldtrip-bounces at science.ru.nl> on behalf of Mazzetti, C. (Cecilia) <C.Mazzetti at donders.ru.nl>
Sent: 01 November 2018 11:04:23
To: fieldtrip at science.ru.nl
Subject: [FieldTrip] baseline correcting data with baseline coming from a different grandaverage


Dear everyone,

I have some stimulus locked data which I have to baseline with respect to the same data but cue locked.

I was wondering whether there is a setting in fieldtrip which allows to do that (i.e. set the baseline timw window according to a different dataset, the cue-locked data) and applying it to the stimulus locked data.

Thanks in advance!


Best,
Cecilia


Cecilia Mazzetti - Ph.D. Candidate
Donders Centre for Cognitive Neuroimaging, room 0.068
Kapittelweg 29 | 6525 EN Nijmegen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20181102/191301c2/attachment-0002.html>


More information about the fieldtrip mailing list