stimuli.trigger.LSLTrigger🔗

class stimuli.trigger.LSLTrigger(name)[source]🔗

Trigger sending values on an LSL outlet.

Make sure you are recording the stream created by the LSLTrigger alongside your data. e.g. if you use LabRecorder, update the stream list after creating the LSLTrigger.

Warning

Make sure to close the StreamOutlet by calling the close() method or by deleting the trigger after use.

Parameters:
namestr

Name of the trigger displayed on the LSL network.

Attributes

name

Name of the trigger displayed on the LSL network.

outlet

Trigger outlet.

sinfo

Description of the trigger outlet.

Methods

close()

Close the LSL outlet.

signal(value)

Send a trigger value.

Notes

The StreamOutlet created has the following properties:

  • Name: f"{name}"

  • Type: "Markers"

  • Number of channels: 1

  • Sampling rate: Irregular

  • Data type: np.int8

  • Source ID: f"HNP-{name}"

The values sent must be in the range of strictly positive integers defined by np.int8, 1 to 127 included.

close()[source]🔗

Close the LSL outlet.

signal(value)[source]🔗

Send a trigger value.

Parameters:
valueint

Value of the trigger, between 1 and 255.

property name🔗

Name of the trigger displayed on the LSL network.

Type:

str

property outlet🔗

Trigger outlet.

Type:

StreamOutlet

property sinfo🔗

Description of the trigger outlet.

Type:

StreamInfo