openephys module

class opeth.openephys.OpenEphysEvent(_d, _data=None)

Bases: object

Open Ephys events generic container for e.g. timestamps or TTLs.

Notes: New version of OE does not seem to send timestamp events.
OE-detected spikes are stored in the more specific OpenEphysSpikeEvent class.

Mostly based on Francesco Battaglia’s code.

Parameters:
  • _d – json-extracted dictionary with which to initialize the object
  • _data – binary content of the rest of the message (e.g. undecoded timestamp as received)
event_types = {0: 'TIMESTAMP', 1: 'BUFFER_SIZE', 2: 'PARAMETER_CHANGE', 3: 'TTL', 4: 'SPIKE', 5: 'MESSAGE', 6: 'BINARY_MSG'}
class opeth.openephys.OpenEphysSpikeEvent(_d, _data=None)

Bases: object

Storage class for spike events received from OE.

opeth.openephys.generate_ttl(timestamp, sample_num=0)

Debug code to auto-generate TTLs based on threshold level in case of file playback.