Device and drivers for generating trigger signals to synchronise recorded signals with behavioural data
Project description
SyncMaster
The SyncMaster provides a simple way to synchronise behavioural tasks with recorded signals.
The device is connected to the computer running the task via USB and the output port is connected to an input on the recording system. The task script can then send commands to the device, producing event-specific signals on the output channel which can be used to time-lock recorded signals to behavioural events.
Installation
The drivers to run the device using Python can be installed using pip:
pip install syncmaster
Further details are given in the installation
section.
Once the Python package is installed and the device connected as
outlined in the setup
section, the device can be initialised and
triggered to synchronise behavioural events with recorded signals. A
simple application is shown below, with further details available in the
initialisation
and triggering
sections.
Example application
After importing the library, the device must be initialised. This should be done once at the beginning of the behavioural task.
Triggers can then be sent using simple commands. These can be integrated with the behavioural task in order to indicate the occurence of events of interest. This generates signals on the output channel which are recorded and can be used to analyse recorded data relative to behavioural events.
# Import library
import syncmaster
# Create device object
device = syncmaster.SyncMaster()
# Run trial with start and end signals
device.start() # Send start signal
''' Run behavioural task '''
device.end() # Send end signal
# Close communication channel when finished
device.close()
On completion of the task, the communication channel with the device should be formally closed.
Note that more complex task designs with up to 100 user-defined event
types can be accommodated. This is outlined in detail in the
triggering
section.
Output
The device produced pulses of differing lengths on a single output channel. Each pulse length corresponds to a specific event type.
The package includes a function for recovering the discrete event
timings from this single-channel pulse data in order to facilitate data
analysis. A simple example is shown below with raw recorded data above
and each subsequent row showing recovered trigger timings for each event
type. This is described in further detail in the analysis
section.
This approach can also be used to recover precise event timings for
user-defined events. This is outlined in detail in the analysis
section.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for syncmaster-1.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e9bcfd39dcaf829b2b414405cb78ceb0990d2816afc004f9991b9623cf103eb |
|
MD5 | 1c1de679124015cc8f10d57efc0eeb71 |
|
BLAKE2b-256 | 9969f1415a2a22e8525247f3d3f4c40cefa4b595099c90aa46ec7ecfb7181437 |