After reading this guide you will,
Recommended reading after this guide:
C++
or python
scripts.The new Cyclops is now controlled by Teensy 3.2, a powerful 32 bit ARM Cortex M4 CPU. The primary reason for choosing a Teensy over an Arduino was its superior clock speed and peripheral options. A more detailed discussion can be found in this GitHub issue.
C++
and python
control the Teensy and all connected boards.The Teensy is flashed/programmed using the Teensyduino add-on for Arduino IDE. The Open-Ephys GUI can also flash programs (that it auto-generates) into the Teensy.
doxygen
for your PC.python
installed (preferably python 3.X
). Also install:IPython
python-scipy
, python-numpy
, python-matplotlib
(if you haven't already)pyserial
All Teensy boards packaged with Cyclops have been tested.
Doxygen is an automatic documentation generator, which will build the documentation (we wrote) for you and place it in/docs/teensy
.
In all feedback loop systems, the stimulus is governed by a set of feedback transformation rules. These rules translate the observed phenomenon (or, behaviour) of the system (being stimulated), into modifications of the stimulus signal (hence providing feedback).
The Cyclops device only guarantees efficient delivery and modification of the stimulus signals, and since it cannot "monitor" neuronal circuits, it cannot "close" the feedback loop.
That means, system monitoring and analysis of the various monitored signals, as well as applying the feedback transformation rules to generate modifications of the stimulus, must happen elsewhere like the Open Ephys GUI, or some custom script that you write. These modifications must be forwarded to the Cyclops, in real-time.
For this, the Cyclops Library provides an RPC (Remote Procedure Call) interface over USB to communicate with the Teensy. It can be used to alter almost all aspects of the signal and its delivery in real-time for any number of Teensy boards (and hence any number of Cyclops Boards)!
Hence, there are 2 ways to use this library's RPC interface.
CyclopsStimulator
plugin.C++
, that parse "Events" in the Open Ephys data-flow, and generates modification calls (via RPC C++
API).channel
. channel
.Baremetal
Write and flash a custom Arduino script on the Cyclops. Optionally connect with PC on USB, and control via custom C++
or python
script.
is a flexible use-case and designed to support almost all kinds of Optogenetic experiments, and it lets you focus on your experiment and its results, rather than the nitty-gritty details of the Cyclops library. |
If your use case requires more customisation, you might want to tweak the Cyclops Library. You can always request a feature, or help us build it!
If you've already explored (hobbyist) embedded programming (of any kind) on any platform, you'll find the Teensy to be similar. There are some differences from an Arduino, chiefly the architecture. Teensy is based on ARM Cortex M4 while the Arduino is AVR based.
The Teensy device documentation is your best resource, second to the very mature Teensy forums.
xxx_ISR()
.To get started with Teensy programming, go though the simple Tutorials first.
Also see this experimental feature guide, which explains how to tweak the OE code generation module.
Optogenetic Stimulation involves delivery of optical signals.
So, for any experiment, you must specify the set of signals that may be delivered. >Cyclops supports delivery of arbitrary signals.
Each Cyclops Control program is composed of (atleast) 3 objects:
Source
Board
Waveform
Thus, a Cyclops program only contains information about the Signals that might be used, using a global list of Source
objects.
The Waveform
object defines powerful methods to control everthing about the delivery of signals. It can even be used to change the output channel
(LED) at runtime.
All the objects and their interconnections can be created and modified at runtime.
The Cyclops programs are |
A surface level walkthrough of an example.