Page 1 of 1

Another question regarding time

Posted: Wed Oct 03, 2012 9:02 pm
by atom2004
Hi,

Although I've read all time related posters, I still got confused about how time is handled in openvibe. Here are some questions:

1. What exactly is ChunkStartTime and ChunkEndTime? How they are measured and how they are related to time in the signal

2. When the following codes are executed in the process function of a box plugin. What exactly is the time we are getting here. Is it relative to the time when you click the play button in the Designer, or the first signal sample acquired. If it is the former case, how can I get the stimulus time relative to the first signal sample acquired so I can find the location of the event in the signal.

IStimulationSet* l_pStimulations = m_oAlgo0_StimulationDecoder.getOutputStimulationSet();
uint64 l_ui64StimulationDate = l_pStimulations->getStimulationDate(j);

Thanks a lot!

Yichuan

Re: Another question regarding time

Posted: Mon Oct 08, 2012 10:02 am
by jlegeny
Hello Yichuan,

ChunkStartTime is created by the acquisition server upon receiving data, in the designer this time is always relative to the starting of the scenario, as all the data received by the acquisition server while there is no connection is discarded.
ChunkEndTime is calculated from the StartTime, Sampling Frequency and number of samples in the chunk.

As for the stimulus relative to the beginning, I would suggest sending a stimulation from your application which would mark the beginning of the experiment, while the acquisition is already running.

Cheers
Jozef