A collection of wrapper functions for DAQ packages and libraries in Python. Mainly intended for internal use within IntellSensing Lab.
The wrappers follow a simple protocol for data acqusition, which is compatible with axopy.
Each device implements a read()
method which returns a numpy array with shape (n_channels
, samples_per_read
). This method needs to be called in a loop from the main application. The frequency the method is called needs to be at least equal to the rate data are streamed from the DAQ device.
Here is a minimal working example:
from pydaqs.nidaq import Nidaq
dev = Nidaq(channels=[0,1], rate=1000, samples_per_read=100)
dev.read()
dev.stop()
Numpy >= 1.11
Tested versions in brackets.
- MYO armband: myo-python (v. 1.0.4)
- NI DAQs: nidaqmx-python (v. 0.5.7)
- Blackrock hardware (Cerebus, Neuroport): CereLink (v. 0.7.4)
- Arduino DAQ: pyFirmata (v. 1.1.0)
Note that some DAQs also require proprietary software to be running concurrentely for data acquistion to work.
- Myo armband: Myo connect (v.1.0.1) and Myo SDK (v.0.9.0), which you can find in this repositories Assets
- Blackrock hardware (Cerebus, Neuroport): Central Software Suite (v. 7.0.4)
- Digitimer D360 (sampled with NI-DAQ): D360 control software (v. 4.7.3.0)
- Tested with Python >= 3.6
- When using the Myo band (and therefore myo-python), the libary needs to be initalised and also be told where the Myo SDK files are stored on the disk (i.e.,
myo.init(sdk_path=...
). See example in the library documentation.