RoundTrip Data

Post Reply
ebjorklund
Posts: 8
Joined: 20 Jun 2019, 13:57

RoundTrip Data

Post by ebjorklund » 17 Jan 2020, 17:16

Hello,

Is there a way to extract RoundTrip data from existing data? Or is this only possible through running BCI2000 with SignalGenerator and FilePlayback?

Thank you.

mellinger
Posts: 1210
Joined: 12 Feb 2003, 11:06

Re: RoundTrip Data

Post by mellinger » 20 Jan 2020, 10:09

Hi,

details of timing information are explained here:
https://www.bci2000.org/mediawiki/index ... nce:Timing

Timing information is based on a number of time stamps that are contained in data files in form of BCI2000 states.
Most importantly, the SourceTime time stamp is set when acquiring a block of data, and the StimulusTime time stamp is set when data have been processed by BCI2000, and screen content has been updated. There is little difference between the StimulusTime stamp, and the time when BCI2000 begins waiting for the next data block. Thus, the difference between SourceTime stamp and StimulusTime stamp is close to the Roundtrip time that you desire. The time stamp for roundtrip time is taken when BCI2000 begins waiting for the next block, but is not saved in the data file.

You could slightly modify the DataIOFilter in the source module in order to save this time stamp. Let me know if you need assistance for how to do this.

Note that any timing information you obtain from running the FilePlayback module refers to the playback session, not the original recording session. Therefore, using FilePlayback is not a way to read out information about original roundtrip data.

HTH,
Jürgen

ebjorklund
Posts: 8
Joined: 20 Jun 2019, 13:57

Re: RoundTrip Data

Post by ebjorklund » 20 Jan 2020, 13:51

Hi Jürgen,

I would greatly appreciate assistance on how to set that up. Sounds relatively straightforward but I have limited experience in C++ help would be welcome so that I don't spin my wheels unnecessarily.

Thank you,
Erik

mellinger
Posts: 1210
Joined: 12 Feb 2003, 11:06

Re: RoundTrip Data

Post by mellinger » 21 Jan 2020, 10:37

Hi Erik,

you need to perform the following changes to src/shared/modules/signalsource/DataIOFilter.cpp.
Line numbers are for the original file, they will change as you perform the changes.
Line 236: Insert a line

Code: Select all

"Roundtrip 16 0 0 0",
Line 721: Insert a line

Code: Select all

State("Roundtrip") = functionEntry;
In the recorded file, roundtrip time should then be the difference between the Roundtrip state, and the previous block's SourceTime stamp.

Let me know if it works for you.

-Jürgen

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests