Triggers#

The psychos.triggers module provides classes and functions for sending triggers and signals to external devices. It’s designed to simplify interactions with external hardware by providing a unified API and encapsulating repetitive logic, making it easier to synchronize behavioral experiments with external equipment.

Ports#

Classes for sending signals to different communication ports, providing a unified and easy-to-use API for port communication and management.

psychos.triggers.get_port(name)

Get a port implementation by name (e.g. serial, parallel, dummy).

psychos.triggers.DummyPort([log])

Dummy port implementation for testing and debugging.

psychos.triggers.SerialPort(address[, ...])

Serial port implementation using pyserial.

psychos.triggers.ParallelPort(address[, ...])

Parallel port implementation using pyparallel.

psychos.triggers.BasePort(address[, log])

Base class for a port.

Triggers#

Classes designed to send triggers through communication ports, encapsulating repetitive logic and providing utility methods to handle timing and trigger patterns conveniently.

psychos.triggers.StepTrigger(port[, mapping])

Trigger that sends a value without resetting the port.

psychos.triggers.DelayTrigger(port[, ...])

Trigger that sends a value, waits for a specified delay, then resets the port.

psychos.triggers.BaseTrigger(port[, mapping])

Abstract base class for trigger implementations.