Skip to content

Conversation

@JohnGriffiths
Copy link
Collaborator

This PR creates another minimal device type, exactly the same concept and general structure as the serial device type. That is, its only purpose is to push triggers, and does not (unlike e.g. the brainflow devices) also have the more important task of controlling a streamed data recording.

This code was written and added out of necessity, as the pyxid2 library appears to be the only way to send triggers to the NIRX nirsport2 via a USB cable. The serial device type does not work for this.

Example usage:

from eegnb.devices.eeg import EEG  as eegexpy_device
thisdev = eegexpy_device(device="nirsport2", xid_num=1)  
thisdev.push_sample(marker=2, timestamp=0) # note that timestamp is not currently used
                                                                           # in this context
# for the nirx nirsport2 the above can be viewed and checked at the bottom of the aurora 
# recording software

# ( in full context: )
from eegnb.experiments.visual_n170.n170 import VisualN170  
thisdev = eegexpy_device(device="nirsport2", xid_num=1)  
thisexp = VisualN170(eeg=thisdev, duration=300, use_fullscr=False, screen_num=1)  
thisexp.run()  

@JohnGriffiths JohnGriffiths marked this pull request as ready for review December 8, 2025 15:30
@JohnGriffiths JohnGriffiths merged commit 83071b3 into NeuroTechX:master Dec 8, 2025
1 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant