expyriment.io.MarkerOutput
- class expyriment.io.MarkerOutput(interface, default_code=None, default_duration=None)
A class implementing a marker output.
- __init__(interface, default_code=None, default_duration=None)
Create a marker output.
If a default code is specified, it will automatically be applied when send() is called without a code. If a default duration is specified, a 0 is sent automatically after the specified duration when send() is called without a duration.
- Parameters:
- interface
expyriment.io.SerialPort
orexpyriment.io.ParallelPort
the interface to use
- default_codeint, optional
default code
- default_durationint, optional
default duration (in ms) for sending 0 after a code
- interface
Notes
EEG/MEG systems: if the system is receiving the markers on a parallel port, the duration between sending a code an the subsequent 0 should be at least 1000/samplerate!
- property default_code
Getter for default_code
- property default_duration
Getter for default_duration
- property interface
Getter for interface
- property logging
Getter for logging.
- send(code=None, duration=None)
Send a marker.
This sends a marker via the specified interface. If a duration is given, a 0 will be sent automatically after each code.
- Parameters:
- codeint, optional
a specific code
- durationint, optional
duration (in ms) for sending a 0 after a code
Notes
For EEG/MEG systems: if the system is receiving the markers on a parallel port, the duration between sending a code an the subsequent 0 should be at least 1000/samplerate!
- set_logging(onoff)
Set logging of this object on or off
- Parameters:
- onoffbool
set logging on (True) or off (False)