Apparatus

Maestro presents stimuli on several distinct "target platforms", delivers liquid rewards to the animal subject, generates TTL pulses that can be used to mark key points in the experiment timeline or synchronize with an external system, and performs other functions all while simultaneously recording the head and eye movements of the subject, the train of spikes picked up by an extracellular micro-electrode, and other relevant signals. Obviously, the program relies on a complex external apparatus to do this work, and the program's design is closely integrated with the makeup of that apparatus. The figure on the right offers a diagrammatic view of the major components in Maestro's laboratory apparatus, along with their interconnections. What follows is a brief summary of these components; it is by no means an exhaustive nuts-and-bolts specification of a practical rig.

The Maestro PC

Maestro runs on a Windows workstation. Installed in this machine are peripheral boards by which the program controls the entire laboratory apparatus. These boards handle five distinct hardware functions -- but some functions may be implemented on a single physical device: analog data acquisition (AI); analog output (AO); digital I/O with digital event timestamping (DIO); a digital signal processor that drives the vector X-Y oscilloscope (DSP); and a network interface card (NIC) over which Maestro communicates with a framebuffer video application, RMVideo, that runs on a separate Linux workstation. The AI device acquires behavioral and neuronal response data during an experiment. Maestro currently supports 16 analog inputs, and a subset of them are dedicated to a particular use. Maestro programs the device to scan all 16 channels during the first 80µs of every 1-ms epoch while running in Trial or Continuous mode. The device triggers an interrupt at the start of each scan interval, and these interrupts establish the timeline for any experimental protocol. Another peripheral that is essential in any practical rig is the digital I/O event timer device. Maestro uses it to timestamp digital pulses with 10µs accuracy and to send digital commands to a number of auxiliary digital devices. To conduct any useful experiments, the Maestro workstation will require at least three devices: the AI and DIO devices, plus one other device that drives visual stimuli.

Recording head/eye movements and neuronal responses

Various sensors measure key behavioral and physiological signals recorded by the program. In a rig designed for human psychophysical studies, an "eye tracker" monitors the position of the subject's eye. In primate studies, the animal sits in a primate chair that usually is secured to the top of a rotating turntable. The head is fixed, so that head position and velocity is equivalent to the turntable's rotational position and velocity. To measure eye position with respect to the head, scleral search coils (one for horizontal and one for vertical) are implanted in the eye. A large magnetic coil, lowered over the head of the animal, induces a current in the search coils. Phase detectors on the coil inputs provide a voltage signal proportional to the eye's horizontal and vertical position; these detectors are typically calibrated at the beginning of every experimental session. Eye position is differentiated to yield eye velocity.

To record neural activity, an extracellular microelectrode is typically lowered into the primate brain through a surgically prepared opening in the skull. The electrode voltage is suitably amplified and filtered. It can be recorded directly by Maestro at a sampling rate of 25KHz. The electrode signal passes through a window discriminator, which is adjusted so that it generates a pulse each time a "spike", or action potential, occurs. The discriminator's output is connected directly to channel 0 on the DIO event timer's input port; Maestro dedicates this channel to timestamping unit spike events.

Analog I/O interface and signal conditioning

Cables carry the signals from Maestro's analog input and output devices to a rack-mounted analog I/O interface. This interface serves as a breakout panel for the analog signal lines. It also buffers the input lines, providing the data acquisition board with an additional layer of protection against power surges, short circuits, or bad wiring in the laboratory apparatus. The analog output buffer circuitry should include potentiometers -- accessible from the front panel -- to adjust the DC offset and gain for each individual output channel. Such adjustments are often necessary to minimize position drift in the voltage-controlled servo that drives the rotational turntable on which the animal sits.

Many of the analog signals recorded by various sensors in the laboratory apparatus are processed in some way before being routed to the analog I/O panel. In our laboratory, a typical rig includes signal conditioning modules for gaze, head position/velocity, and eye position/velocity. These modules serve to amplify and filter input signals coming from various sensors in the rig. The gaze module typically forms horizontal gaze position as the sum of head and horizontal eye position. Velocity signals are obtained by differentiating position. Since electronic differentiation introduces significant noise, the velocity signal is typically low-pass filtered (<25Hz; an alternative version of horizontal eye velocity is available filtered at 100Hz instead).

The modules are calibrated so that the recorded voltages are proportional to position in degrees or velocity in deg/sec subtended at the eye. All of the modules include DC offset and gain pots to assist in calibration procedures.

The EyeLink 1000+ eye tracker

For human studies, an eye tracker system is used to monitor the subject's eye position with a high-speed camera. The tracker system we've used in the past provided eye position and velocity as analog signals. These were routed to the Maestro analog input channels dedicated to recording eye trajectory data: "HGPOS" (horizontal gaze position), "VEPOS" (vertical eye position), "HEVEL" (horizontal eye velocity), and "VEVEL" (vertical eye velocity).

However, the analog signals from our old eye tracker were notoriously noisy. In addition, some researchers have recently expressed interest in using an eye tracker system instead of the implanted scleral search coils to record eye movements in animal as well as human subjects.

As of version 3.2.0, Maestro supports the use of the EyeLink 1000+ eye tracker from SR Research. This system uses a high-speed camera and real-time image processing hardware to sample pupil position at 1KHz. To address the noisy analog signal issue, the EyeLink data is streamed to Maestro over a point-to-point Ethernet connection with the tracker's "Host PC". Raw pupil coordinates from the EyeLink are converted to the same units as the analog signals normally routed to HGPOS and VEPOS -- using horizontal and vertical offset and gain calibration factors that the user can adjust as needed. Eye velocity (HEVEL and VEVEL) is derived from eye position using a central-point difference method followed by a simple smoothing filter; the width of the filter's window is again user-adjustable.

The XYScope target platform

Maestro's XYScope targets are presented on a large-screen vector oscilloscope. The X-deflection, Y-deflection, and trigger inputs of the scope are driven by a custom-designed video output box which, in turn, is controlled by a DSP card in the Maestro computer. From the application's point of view, the screen of the oscilloscope is treated as a 65536-by-65536 array of "pixel" locations, with the origin at the lower left corner. User-specified targets (which are generally a set of random dot patterns) are stored and animated on the DSP controller with respect to this coordinate system. Targets are animated by sending a sequence of dot locations to the X-Y video output box across a high-speed interface. The analog circuitry therein converts each dot location into the appropriate X and Y voltage commands which will deflect the scope's beam to the appropriate location. It then activates the trigger to turn "on" the beam, thereby painting the dot. The DSP controller passes the trigger timing parameters (delay until trigger activation, trigger "on" time) to the output prior to starting the animation.

See this page for some technical details on the design of the video output box, also known as the XYScope "dotter" board.

XYScope rides into the sunset

Given its versatility, high frame rate (up to 500Hz), and variety of available target types, the XYScope was an important and heavily used target platform in our laboratory for many years. Unfortunately, large-screen analog vector oscilloscopes have long been replaced by digital oscilloscopes, which are unsuited to our work. All of our existing scopes no longer work, and replacements are impossible to find.

As a result, RMVideo is now the only visual stimulus platform in the lab, and Maestro 4 does not offer hardware support for the XYScope (it does retain XYScope target objects and related code in case we can develop an alternative implementation of the display platform in the future).


The RMVideo target platform

Graphic framebuffer video targets are displayed on a high-performance computer monitor, such as the Sony GDM-FW900™ color monitors currently used in our laboratory. This display platform supports experiments that require color, or more complex visual stimuli such as drifting gratings, Gabor patches, and custom-made movies, but it cannot achieve the very high frame rates of the XY oscilloscope display.

Prior to Version 2.0, the monitor was driven by a programmable video card -- the VSG2/4 from Cambridge Research, Inc. -- installed in the Maestro host PC. However, the VSG was based on a graphics chip from the late 1980s, and its relatively slow rendering speed placed severe restrictions on the kinds of stimuli we could present. To take full advantage of the power of today's video cards, we developed a stand-alone OpenGL application, RMVideo (aka: Remote Maestro Video), that runs on a separate Linux workstation and communicates with Maestro over a private, point-to-point Ethernet connection. The disadvantage of requiring a second computer was easily offset by RMVideo's far superior rendering speed -- not to mention a faster development cycle and the much lower cost of using off-the-shelf video cards. All of the original VSG-based framebuffer video targets are supported. In addition, RMVideo supports XYScope-like random-dot patterns, drifting Gabors and plaids, and the potential for many more kinds of stimuli. It also updates targets on a frame-by-frame basis, much like the XYScope controller -- so it is now possible for framebuffer video targets to participate in trials that require runtime modification of the targets' precomputed trajectories (for features such as velocity stabilization). Finally, Maestro and RMVideo support the display of images and videos; now, the kinds of visual stimuli possible are limited only by the user's ability to generate the source media!

Starting with Version 4.0, RMVideo is the only visual stimulus platform available to Maestro users, yet the lab's current RMVideo displays are aging and obsolete cathode ray tube (CRT) monitors. These are still preferred over modern LCD monitors because of the significant motion blur associated with the "sample and hold" LCD technology (the rapid decay of CRT phosphors means better motion blur performance). Recently we have tested RMVideo with a "gaming" LCD monitor that runs as high as 144Hz and offers a motion blur-reducing feature at 85-120Hz. Initial testing suggest that this monitor could serve as a replacement for the CRT, at least under certain experiment conditions -- but more testing is needed, along with a side-by-side comparison with the existing CRTs.

Digital I/O interface and plug-in digital device

The digital I/O interface is more than just a rack-mounted "breakout panel" for the 16 digital inputs and 16 digital outputs of Maestro's DIO event timer device. The interface also houses one or more plug-in modules that perform critical tasks in the experiment rig.

Each module is a custom-designed electronic "black box" that is controlled by digital commands on the DIO event timer's 16-bit output port. By design, Maestro treats the uppermost nibble of the command word, DO<15..12>, as the device address. Thus, the application can independently command up to 15 different plug-in modules (address 0 should never be assigned to a real device because it would be affected by a reset of the event timer, which will drive all of its digital outputs low). Whenever the event timer writes to its digital output port, it strobes a "data ready" signal. Each target device, upon detecting the strobe, checks the address bits and, if they match the device's unique address, "latches" in the remaining 12 "data" bits. How the 12-bit datum is used depends entirely on the device's design. Over the years our laboratory has developed a number of these plug-in modules to perform specific functions essential to Maestro's operation, as described below. Their 4-bit device addresses, listed in parentheses, are reserved.

    • Marker pulse delivery module (device address 1 = 0001b). This device merely latches the data lines DO<11..0> and presents them as digital outputs. Maestro can be configured to deliver short active-high pulses on any combination of these signal lines. However, only one or two are used in a typical experimental protocol. For example, marker pulses are often used to mark the beginning of a stimulus during an experiment, or to bracket a time interval of interest. In such cases, the user will typically connect DO<n> from the marker pulse device to the event timer's DI<n> input -- so that Maestro can timestamp the marker pulse events as they occur. The duration of the marker pulses varies somewhat but is generally 1-3µs, depending upon which event timer device is used, the host PC's hardware, etcetera. From the researcher's point of view, all that matters is that the marker pulse be delivered at the programmed time; Maestro's design ensures 1-ms accuracy.

    • Adjustable reward delivery module (device address 4 = 0100b). Whenever Maestro writes to this device, it delivers a pulse whose duration in milliseconds is specified by the 12-bit value on DO<11..0>. This pulse ultimately drives a solenoid valve that gates the flow of liquid to the animal. Longer pulses mean larger rewards; researchers will typically run tests to measure the change in volume with pulse length for their particular setup. While a 12-bit datum permits pulse lengths of 0 to 4096 milliseconds, a zero pulse length makes little sense, and long pulses will deliver excessive amounts of liquid. The Maestro user interface enforces a more practical range from 10 to 500 milliseconds.

    • Pulse stimulus generator module (device address 5 = 0101b). The PSGM is a custom-designed digital device that controls a Grass stimulus generator, delivering a sequence of electrical current pulses to the brain via an extracellular electrode. The PSGM offers the user considerable flexibility in defining the characteristics of the pulse sequence -- from a single unipolar pulse, to a biphasic pulse, to an entire train of unipolar or biphasic pulses. To program a pulse sequence, Maestro must write to several parameter registers on the PSGM. The upper four data lines DO<11..8> represent the parameter address, while lines DO<7..0> contain the parameter value written to that register. [Review the PSGM specification available on the Downloads page for a detailed description of its different operational modes and the roles of the various PSGM registers. Note that Maestro does not implement the "Direct from DAC memory" mode, which would permit defining a more complex, waveform-like stimulus, nor does it use the lower 8 bits of the 16-bit DAC voltage (voltage resolution is 80mV rather than 312.5µV).]

    • Miscellaneous signals module (device address 6 = 0110b). This is a catch-all device that carries some miscellaneous digital signals that have been requested by past users. Like the marker pulse module, it simply latches the data lines DO<11..0> whenever it is "addressed". Only one output is currently used by Maestro: DO<1> is used to drive a speaker, implementing a simple audible tone. This speaker tone plays a role in Maestro's random reward withholding feature, which was introduced to train intractable subjects. When reward withholding is enabled, the speaker tone is played whether or not the physical reward is withheld. Thus, it serves as a cue to the animal that it did the task correctly, even if the reward is indeed withheld; as such, it is referred to as an Audio Reward in the Maestro user interface. The user can specify a pulse length between 100 and 1000ms. The pulse length is implemented in software; Maestro raises DO<1> on this device, then lowers it after the requested pulse time has elapsed.

    • Plexon interface module (devices addresses 1 = 0001b, 7 = 0111b). This DIO rack plug-in module was conceived in the Lisberger lab as part of a scheme to integrate Maestro's data stream with the Plexon Multichannel Acquisition Processor, which provides real-time spike sorting across multiple electrode channels. It actually includes two "latched" devices, the aforementioned marker pulse module and the character writer module (address 0111b). Thus, Maestro can deliver both marker pulses and character data to the Plexon, or to any other external acquisition system with compatible inputs. The character writer simply transmits ASCII characters, one at a time, to the external target. When addressed, the device latches data lines DO<7..0>, representing an 8-bit ASCII character; the other data lines are not used. Maestro may write just a single character to the device, or an entire null-terminated string. In the latter case, characters are transmitted in rapid succession, roughly 1-3µs per character, with up to 200 characters in any one burst. Maestro assumes that the character writer can handle this throughput. Thus, the device includes a FIFO on the "input side" for queueing characters as they are written by Maestro, plus handshaking logic on the "output side" for removing each character from the FIFO and safely transmitting it to the Plexon. For more information on the Plexon interface module and how Maestro uses it, go here.