[FieldTrip] ft_redefinetrial and response correctness

Raquel Bibi bibi.raquel at gmail.com
Sat Oct 31 01:16:58 CET 2015


Hi Grazia,
In the past I ran into difficulty with my trial function when my triggers were strings. can you remove the ’S’ and change your triggers to numeric values? If not, perhaps I can try if you give me a snippet of data (although I am unfamiliar with .vmk), my old trial functions did what you need.  Alternatively, break down this process by using ft_read_event ( http://www.fieldtriptoolbox.org/reference/ft_read_event <http://www.fieldtriptoolbox.org/reference/ft_read_event>) and ft_read_header (http://www.fieldtriptoolbox.org/reference/ft_read_header <http://www.fieldtriptoolbox.org/reference/ft_read_header>).

Best,

Raquel
> On Oct 30, 2015, at 1:49 PM, Grazia Di Pisa <g.dipisa at gmail.com> wrote:
> 
> Hi all,
> 
> I have a question about ft_redefinetrial. So, I have two conditions S 11 and S 31, respectively ‘in-synch’ and ’not-in-synch’ and participants were instructed to press 1 or 2 in the keyboard to report their answer, S 1 for ‘not-in-synch’ and S 2 for ‘in-synch’.
> 
> What I need to do is TFR analysis only for the trials where participants answered correctly, that is S 11 & S 2 and S 31 & S 1 (below an extract from a .vmrk file showing a correct match).
> 
> Mk3=Stimulus,S 11,33182,1,0
> Mk4=Stimulus,S 12,33782,1,0
> Mk5=Stimulus,S 13,33902,1,0
> Mk6=Stimulus,S 14,34582,1,0
> Mk7=Stimulus,S  2,37915,1,0
> 
> Mk8=Stimulus,S 31,40352,1,0
> Mk9=Stimulus,S 63,40952,1,0
> Mk10=Stimulus,S 32,40953,1,0
> Mk11=Stimulus,S 33,41112,1,0
> Mk12=Stimulus,S 35,41792,1,0
> Mk13=Stimulus,S 34,41793,1,0
> Mk14=Stimulus,S 35,44634,1,0
> Mk15=Stimulus,S  1,44635,1,0
> 
> From the tutorials, I’ve understood that I should have done this in my trialfun when I defined my trials during the pre-processing step, but today we realised that some subjects perceived as out-of-synch the condition in-synch and viceversa.
> 
> So, I was wondering how could I do this now - could I do this using the ft_redefinetrial or worst-case-scenario should I do the pre-processing all over again?
> 
> I wrote the code below before starting the TRF analysis but it’s not correct since it’s not working:
> 
> %Redefine trials
>     cfg = [];
>     cfg.trials = 'all';
>     cfg.trialdef.eventtype  = 'Stimulus';                     % we are interested in Stimulus markers
>     cfg.trialdef.eventvalue = { 'S 11' 'S 31' };
>     cfg.trialdef.eventcorrect = [ 'S 2' 'S 1' ]; 		% correct response Stimulus S 2 for S 11 and S 1 for S 31
>     cfg.toilim = [-1.8 2.0];                       
>     
>     data = ft_redefinetrial(cfg, data);
> 
> 
> Any suggestions/help is more than welcome!
> 
> thanks in advance,
> ~ grazia
> 
> 
> 
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

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


More information about the fieldtrip mailing list