expyriment.io.MarkerOutput¶
-
class
expyriment.io.
MarkerOutput
(interface, default_code=None, default_duration=None)[source]¶ A class implementing a marker output.
Methods
-
__init__
(interface, default_code=None, default_duration=None)[source]¶ 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 specifed duration when send() is called without a duration.
Parameters: interface : io.SerialPort or io.ParallelPort
interface to use
default_code : int, optional
default code
default_duration : int, optional
default duration (in ms) for sending 0 after a code
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!
-
default_code
¶ Getter for default_code
-
default_duration
¶ Getter for default_duration
-
interface
¶ Getter for interface
-
logging
¶ Getter for logging.
-
send
(code=None, duration=None)[source]¶ 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.
Note 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!
Parameters: code : int, optional
a specific code
duration : int, optional
duration (in ms) for sending a 0 after a code
-
set_logging
(onoff)¶ Set logging of this object on or off
Parameters: onoff : bool
set logging on (True) or off (False)
Notes
See also design.experiment.set_log_level fur further information about event logging.
-