[FieldTrip] Time stamp per sample

"Jörn M. Horschig" jm.horschig at donders.ru.nl
Wed Mar 28 09:41:29 CEST 2012


Hi Anton,

This depends on the decimation rate that you specify, see here:
http://fieldtrip.fcdonders.nl/development/realtime/ctf?s[]=acq2ftx#downsampling_channel_selection_applying_gains

You can use ft_read_header(buffer) to read out the sampling frequency 
and then call ft_read_data to read the data. Here, you can specify a 
begin and an endsample, which define the length of the data the function 
returns. Prior, you can call ft_read_event to get the time stamp of the 
trigger value of interest. If you are interested in continuously reading 
data in without relying on certain events, you can don't need to call 
ft_read_event.

In FieldTrip, there are some example functions that you can look at, 
/e.g. //ft_realtime_asynchronous/ or/ft_realtime_synchronous/, see also 
here:
http://fieldtrip.fcdonders.nl/tutorial/realtime

 From what you wrote I get that the asynchronous type is what you aim for.

Best,
Jörn



On 3/27/2012 7:13 PM, Anton Andreev wrote:
> Hi,
>
> I have a question about the fieldtrip buffer.
> Does the protocol provides information about the time every sample has 
> been taken?
>
> I would like to produce a chunk of data for 300ms or 1 second for 
> example.
> I can build such chunk if I simply sort out samples that are in the 
> time range of 1 second starting with the time stamp of the first one. 
> Then again for 1 second and ....
>
> Thanks,
> Anton
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip


-- 
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
Neuronal Oscillations Group

P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands

Contact:
E-Mail: jm.horschig at donders.ru.nl
Tel:    +31-(0)24-36-68493
Web: http://www.ru.nl/donders

Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120328/110d49a4/attachment.html>


More information about the fieldtrip mailing list