#Python interface for CONTEC AIO-160802AY-USB
Only analog output implemented thus far. Pass a numpy array (samples by channels) to the buffer.
Only works in windows but shouldn't be too difficult to modify to load the linux library instead.
The Contec driver must be installed.
Download this repository
git clone https://github.com/cboulay/caio_python.git caio_python
Install it as a Python package.
python setup.py install
Run python (ipython), then enter the following commands.
fromCaio.TriggerBoximportTTLtrigbox=TTL()
trigbox._caio.fs=10000trigbox.set_TTL(width=1, channel=2)
trigbox.trigger()My magstim module may be triggered via this triggerbox. I also use a Digitimer DS5 but it is considerably simpler than the Magstim device so I have created a VirtualStimulatorInterface (included in this package) that can be used in place of the Magstim interface. This VirtualStimulatorInterface, like the Magstim interface, has a method trigger() which is simply a proxy to self.trigbox.trigger()
fromCaio.VirtualStimulatorInterfaceimportVirtualstimulator=Virtual(trigbox=trigbox)
stimulator.trigger()Used by my magstim module.