synchronizing stimulus with data

Forum for software developers to discuss BCI2000 software development
Locked
rebekahw
Posts: 12
Joined: 08 Jun 2009, 14:28

synchronizing stimulus with data

Post by rebekahw » 11 Aug 2009, 15:28

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

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

stimulus

Post by gschalk » 12 Aug 2009, 08:45

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

rebekahw
Posts: 12
Joined: 08 Jun 2009, 14:28

Post by rebekahw » 13 Aug 2009, 15:40

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

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

stimulus ...

Post by gschalk » 13 Aug 2009, 20:53

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

rebekahw
Posts: 12
Joined: 08 Jun 2009, 14:28

Post by rebekahw » 18 Aug 2009, 14:02

Gerv,

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

Rebekah

Locked

Who is online

Users browsing this forum: No registered users and 0 guests