aligning events to continous data (OE format using load_open_ephys_data_faster.m)

209 views
Skip to first unread message

Edgar Bermudez

unread,
Jun 24, 2016, 5:42:18 PM6/24/16
to Open Ephys
Hi all,

Due to my previous failed attempts to align events to continuous data using the kwik format due to some bug (see this thread in you have similar problems), I decided to record and test the OE format. According to the documentation,
when use load_open_ephys_data_faster.m (from the analysis-tools), the time stamps of the events should align to the time stamps of the .continous data. However, when I do:

% load continuous
[data, ts, info] = load_open_ephys_data_faster('109_CH9.continuous');
% load events
[data_e, ts_e, info_e] = load_open_ephys_data_faster('all_channels.events');
% plot
figure(); hold on;
plot(ts, data);
plot(ts_e, data_e, '.');

Things don't match. Any ideas what is wrong? Are ts actually records instead of timestamps like in ts_e?

Many thanks again,
Edgar





2016-06-23.png

Josh Siegle

unread,
Jun 24, 2016, 5:44:16 PM6/24/16
to Edgar Bermudez, Open Ephys
In what way don’t the timestamps match? Does dividing ts by the sample rate solve the problem?

Josh

--
You received this message because you are subscribed to the Google Groups "Open Ephys" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-ephys+...@googlegroups.com.
To post to this group, send email to open-...@googlegroups.com.
Visit this group at https://groups.google.com/group/open-ephys.
To view this discussion on the web visit https://groups.google.com/d/msgid/open-ephys/ad70498e-fc54-4cd9-851a-46e493d43491%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<2016-06-23.png>

Edgar Bermudez

unread,
Jun 24, 2016, 5:54:08 PM6/24/16
to Open Ephys, edgar.b...@gmail.com
Yes, I am sorry for making such a stupid question....

For reference:


[data, ts, info] = load_open_ephys_data_faster('109_CH9.continuous');
ts = ts/info.header.sampleRate;

Josh Siegle

unread,
Jun 24, 2016, 5:55:43 PM6/24/16
to Edgar Bermudez, Open Ephys
It’s not stupid. We should really decide on a standard for loading timestamp values (always in sample number, or always in seconds) so it doesn’t lead to confusion.

Nivaldo Vasconcelos

unread,
Dec 16, 2016, 11:49:21 AM12/16/16
to Open Ephys, edgar.b...@gmail.com
Hi,

I've had confuse trying to align the event times with a dat file, read by using the neuroscope, in which the event's times must be informed by the number of milliseconds since the first sample.
How can I convert the timestamps to seconds ? Or are they already in seconds (since the beginning of the recording) ?

Thanks in advance,
Nivaldo
Reply all
Reply to author
Forward
0 new messages