...
The network event module sends incoming messages on the pipeline using the midi buffer, with a special NETWORK event code.
The network event is now implemented as a source. To use it, you'll need to add a merger module and link it to the main processing pipeline, preferably, before any other modules.
Peristimulus time histogram (PSTH) sink
The PSTH sink module has two main functions:
A. It is used to display average firing rate and average lfp, aligned to external events, such as TTL pulses, or more complex trials that are sent over the network.
B. It is used to save to disk all pipeline events that were generated after the source (i.e., network events, spikes, etc).
A. PSTH functionality
The module uses the following commands that are sent using the Network Events module:
...
TrialStart 1
TrialEnd 2
An example how to send string messages to GUI from a c++ / matlab session will be available on github.
B. Save to disk functionality
In order to enable the save to disk option, you'll need to use the Record control module and enable the "Events saved by sink" option.
Events are saved in a new file format (0.3). Events can now have variable length, and are thus saved in the following format:
- Event type (uint8) which can have one of the following types:
- SESSION (code 10)
- This will inform that a new recording session has started /stopped
- TTL (code 3)
- This will inform that a digital signal went up/down
- NETWORK (code 7)
- This will inform of a string message arrived via Ethernet
- SPIKE (code 4)
- This will inform of a detected spike
- TIMESTAMP (code 0)
- This will save a pair of software & hardware timestamps, to allow synchornization between software events and hardware events.
- SESSION (code 10)
- Event size (uint16)
- Event specific data (variable length)
- SESSION
- uint8, representing whether a session has started (value = 1) or stopped (value = 0)
- uint16, representing recording session number
- int64, representing a software timestamp
- TTL
- uint8, representing whether the signal went up (value = 1), or down (value = 0)
- int64, software timestamp
- int64, hardware timestamp
- NETWORK
- <variable length>, representing the incoming message. length of the message is the event size - 8
- int64, software timestamp
- SPIKE
- int64, software timestamp
- int64, hardware timestamp
- int16, sorted unit ID number
- int16, electrode ID number
- int16, number of channels in electrode (typically, 1, 2, or 4)
- int16, number of points in each channel (typically 32+8).
- <variable length>, representing the spike wave form. actual size will depend on the previous two numbers.
- TIMESTAMP
- int64, software timestamp
- int64, hardware timestamp
- SESSION