trying to use LSL to record stimulus markers
hello! I've been trying to use LSL to record the onset of stimuli in my EEG recordings (with the ultracortex mark iv cap / cyton+daisy boards). however, I'm having trouble understanding how to use LSL. I have looked on the forum and have not found any clear guidance as to how to go about using LSL once it has been downloaded. I plan to use LSL with Python or Matlab. some questions:
- how to create and view an LSL stream on the GUI?
- what form that data stream will take?
- how to create the timestamped stimulus marker?
Comments
https://docs.openbci.com/docs/06Software/01-OpenBCISoftware/GUIWidgets#lsl
If you are doing P300 / ERP, "timestamped stimulus markers" will not be sufficient accuracy. Instead the recommendation is to use what is called an external trigger signal, recorded simultaneously with the EEG channels. Cyton places these Auxiliary channels (3 of them), in the same stream with the EEG samples.
https://docs.openbci.com/docs/02Cyton/CytonExternal
I recommend using external trigger with the OptoIsolator solution. https://docs.openbci.com/docs/02Cyton/CytonExternal#optoisolation
Can you mention the source of your "stimulus marker"? Is it an external device that can output a digital / binary leading edge at the mark? That is the case where you would use the optoisolator Richard mentioned above. It's also possible to present a timing mark on a display screen, as a small box at the corner of the screen that lights up at trigger time. Which is then picked up by a photo-sensor connected to the Cyton. See,
http://openbci.com/forum/index.php?p=/discussion/1928/timestamps-to-sync-stimulus-and-eeg-vs-external-hardware-trigger/p1
Regards, William
Thanks for all your comments! However, we're trying to avoid hardware solutions.
I would like to set up a somewhat basic experiment, wherein I would use PsychToolbox or PsychoPy to present some on-screen stimulus, and then have PsychoPy issue a command to LSL to sync the onset of that stimulus with the recorded EEG data. I'm aware that this is going to be less temporally precise than a hardware method, but we would like to avoid connecting any external wires to the cap to maintain a completely wireless setup.
We would like to set up something similar to the proposed design in this forum post, using the Cyton+Daisy boards:
http://openbci.com/forum/index.php?p=/discussion/1928/timestamps-to-sync-stimulus-and-eeg-vs-external-hardware-trigger/p1
"...but we would like to avoid connecting any external wires to the cap to maintain a completely wireless setup..."
The optical sensor mentioned on this comment below, does NOT require any external wires to your computer. Only wires connected from the optical sensor on the display to the Cyton board itself. Thus the Cyton remains essentially 'wireless'. With only a short cable (say 4 feet) to the sensor taped to the display. This cable would be attached with three Dupont connectors, thus easily removed from the Cyton. An additional set of connectors could be installed at the display, allowing two disconnect points.
http://openbci.com/forum/index.php?p=/discussion/comment/10131/#Comment_10131 [links to 3 wire sensor]
re: the comment you quoted above by 'qoz' regarding using LSL timing marks, please read his followup comment.
http://openbci.com/forum/index.php?p=/discussion/comment/10043/#Comment_10043
Where he admits LSL timing marks are not as 'easy' or precise as his first quote implies. Requires calibration to determine delay factors in the RFduino dongle radio line, serial port, CPU scheduling delays, etc. Depending on the CPU load on your computer, these delays can be variable, thus distorting your P300 precision.