DataHub: Difference between revisions
Wiki-admin (talk | contribs) |
Wiki-admin (talk | contribs) |
||
| Line 53: | Line 53: | ||
==Usage== | ==Usage== | ||
== Python == | |||
<syntaxhighlight lang="python" line> | |||
#!/usr/bin/env python | |||
= | # import the rusocsci.buttonbox module | ||
from rusocsci import buttonbox | |||
# make a buttonbox | |||
bb = buttonbox.Buttonbox() | |||
# wait for a single button press | |||
bb.sendMarker(100) #This is your marker code, range code 1-255 | |||
core.wait(0.002) #2ms delay for the code to be recorded by brainvision; 2ms->500hz sampling rate | |||
bb.sendMarker(0) #Back to 0; now ready to send a new code | |||
</syntaxhighlight> | |||
==References== | ==References== | ||
Revision as of 09:01, 1 February 2022
| Developer(s) | Christian Kothe; Chadwick Boulay. | ||||
|---|---|---|---|---|---|
| Development status | -in development- | ||||
| Written in | C, C++, Python, Java, C#, MATLAB | ||||
| Operating system | Windows, Linux, MacOS, Android, iOS | ||||
| Type | Data collection | ||||
| License | Open source | ||||
| Website | LSL webpage | ||||
| |||||
The DataHub Makes use of the lab streaming layer. The lab streaming layer (LSL) is a system for the unified collection of measurement time series in research experiments that handles both the networking, time-synchronization, (near-) real-time access as well as optionally the centralized collection, viewing and disk recording of the data.
Installation
Our support for LSL is mainly done in python. Download python here: Please choose a 64 bit version.. Run the installer and make sure to add Python to the file path (it's an option in the installer).
Open a command prompt, start with upgrading the pip installer by typing:
c:>python -m pip install --upgrade pip
Then:
c:>pip install pylsl
more info: cross platform pylsl
Versions
The TSG uses the version 1.15.0. Open a command and type the following to find the version used:
c:>python
>>> import pylsl
>>> print(pylsl.__version__)
Usage
Python
#!/usr/bin/env python
# import the rusocsci.buttonbox module
from rusocsci import buttonbox
# make a buttonbox
bb = buttonbox.Buttonbox()
# wait for a single button press
bb.sendMarker(100) #This is your marker code, range code 1-255
core.wait(0.002) #2ms delay for the code to be recorded by brainvision; 2ms->500hz sampling rate
bb.sendMarker(0) #Back to 0; now ready to send a new code
References