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

Silvia Formica Silvia.Formica at UGent.be
Thu Nov 8 11:40:06 CET 2018


Dear Cecilia and Tom,


I am in a similar situation to the one described by Cecilia, so I thought of asking you for a suggestion.


I have a dataset locked to the onset of the cue, and I would like to use the same baseline I used in this dataset to baseline-correct also the same dataset locked to the onset of the target.


I tried the solution Tom suggested, but it is not working for me. The reason is that I preprocessed the cue-locked and target-locked datasets separately, therefore they end up having a slightly different number of trials. Do you have any idea of how this could be solved? Would it make sense to baseline-correct at the grandaverage level?


Another option I have been thinking about is to use ft_redefinetrial. In this case I have other problems, though. If I try to use the ft_redefinetrial function after preprocessing and cleaning my cue-locked dataset, it will output all the trials in the raw data (therefore not accounting for the trial rejection I performed on the cue-locked dataset). Is this the right way to use this function or am I missing something?


Thanks in advance for any input and sorry if my question is not very clear (still a newbie!)


Best,

Silvia

________________________________
From: fieldtrip <fieldtrip-bounces at science.ru.nl> on behalf of Tom Marshall <tom.marshall at psy.ox.ac.uk>
Sent: 02 November 2018 23:29
To: FieldTrip discussion list
Subject: Re: [FieldTrip] baseline correcting data with baseline coming from a different grandaverage


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/20181108/dc8e6ad1/attachment-0002.html>


More information about the fieldtrip mailing list