Page 1 of 1

synchronizing stimulus with data

Posted: 11 Aug 2009, 15:28
by rebekahw
I am trying to synchronize a stimulus with data as it is recorded from the DAQ. We want to ensemble average our data by aligning it with the synchronized stimulus.

Thanks in advance,

Rebekah

stimulus

Posted: 12 Aug 2009, 08:45
by gschalk
Rebekah,

What is providing the stimulus? BCI2000? In this case, simply use a state variable to encode the time of stimulus presentation. If an external device provides the stimulus, you could simply record it together with the analog channels on the DAQ.

If you provide more details on what you are trying to do, we could potentially help you better.

Gerv

Posted: 13 Aug 2009, 15:40
by rebekahw
I have the stimulus programmed into BCI2000 in the StimulusPresentation executable. The problem is that I don't know how to record the state variable elsewhere. We were thinking of trying to output a square wave on the display but I don't know where to call to. What would be the easiest way to record and output this data? How do I access the value? Right now I have it declared in StimulusTask in OnStimulusBegin.

I hope that this clarifies things a little bit more.

Rebekah

stimulus ...

Posted: 13 Aug 2009, 20:53
by gschalk
Rebekah,

Is all you are trying to do to know when a particular stimulus appeared? From what you describe, you seem to be using the off-the-shelf BCI2000 StimulusPresentation module. This sets the state StimulusCode automatically. You do not need to change the code.

I suggest you read through the introductory BCI2000 Tour, in particular the sections on viewing event markers (i.e., states) and StimulusPresentation:

http://www.bci2000.org/wiki/index.php/U ... I2000_Tour

If this is not what you are trying to do, I still do not understand what you want to do.

Gerv

Posted: 18 Aug 2009, 14:02
by rebekahw
Gerv,

I really don't know how I missed that. That is exactly what we needed to see. Thank you.

Rebekah