[FieldTrip] reading in and segmenting Netstation data
Lozano Soldevilla, D. (Diego)
d.lozanosoldevilla at fcdonders.ru.nl
Thu Aug 8 08:12:42 CEST 2013
Hi Anne, What do you mean by "shifted"? Time samples mismatch might be? I don't see what's going wrong with the code you pasted but it'd be nice if you could file a bug (I'll assign to me) with a piece of preprocessed data with fieldtrip and a plot about how data looks like with Netstation to have a bit more info. best, Diego ps : do you have a non-integer eeg sampling rate, like 511.3Hz? ----- Original Message -----
> From: "van Hoogmoed , Anne H - ( annevanhoogmoed )" < annevanhoogmoed
> @email. arizona . edu >
> To: fieldtrip @science. ru . nl
> Sent: Thursday, 8 August, 2013 5:51:47 AM
> Subject: [ FieldTrip ] reading in and segmenting Netstation data
> Dear all,
> I'm using Fieldtrip to analyze my Netstation data. The problem is that
> the segmented data (incl triggers) are shifted in Fieldtrip as
> compared to the Netstation analysis.
> I've checked several things:
> - The events are the same in Netstation and Fieldtrip
> - The raw data look the same in both programs
> - Fieldtrip produces the right trl based on the triggers.
> The script I'm using is this:
> cfg = [];
> cfg . dataset = 'c007_ raw' ;
> cfg .continuous = 'yes' ;
> data_ eeg = ft_ preprocessing ( cfg );
> hdr = ft_read_header( 'c007_ raw' );
> event = ft_read_event( 'c007_ raw' );
> cfg = [];
> cfg . trialfun = 'trialfun _first_ enc' ;
> cfg _trials = ft_ definetrial ( cfg );
> data_trials = ft_ redefinetrial ( cfg _trials, data_ eeg );
> The trialfun I'm using is this:
> function [ trl , event] = trialfun _first( cfg )
> load event ;
> load hdr ;
> value = [event.value];
> sample = [event.sample];
> % determine the number of samples before and after the trigger
> pretrig = -100; % = 200 ms
> posttrig = 400; % = 800 ms
> % for each trigger
> trl = [];
> for j = 1:length(event)
> if ( strcmp (event(1,j).value, '+ Lrt' ) || strcmp (event(1,j).value,
> '+ OOt' )) || strcmp (event(1,j).value, '+ SOt' )
> trlbegin = event(1,j).sample + pretrig ;
> trlend = event(1,j).sample + posttrig ;
> offset = pretrig ;
> newtrl = [ trlbegin trlend offset];
> trl = [ trl ; newtrl ];
> end
> j = j + 1;
> end
> Does anyone know what I'm doing wrong here?
> Thank you very much for your help!
> Kind regards,
> Anne
> Anne van Hoogmoed
> Down Syndrome Research Group
> Department of Psychology, University of Arizona
> _______________________________________________
> fieldtrip mailing list
> fieldtrip @ donders . ru . nl
> http ://mailman.science. ru . nl /mailman/ listinfo / fieldtrip
-- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http :// www . ru . nl /people/ donders /lozano-soldevilla-d/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130808/8e124d13/attachment-0002.html>
More information about the fieldtrip
mailing list