Supported Matlab Tools

Since the Matlab™ application suite is heavily used to analyze experimental results in our laboratory, researchers must routinely read their Maestro data files into the Matlab environment. The MEX function readcxdata() handles this tedious but essential task, parsing the data file into various fields of a Matlab structure. Researchers can then write their own Matlab scripts and functions to access the fields in this structure and process the data in any way they choose.

readcxdata() is based on an earlier incarnation developed by past graduate students and postdoctoral scientists. So that users can migrate their custom analysis programs from these earlier versions to readcxdata(), care was taken to make the MEX function backwards-compatible. Any additional data or information parsed by readcxdata() that was not available in the previous version is exposed in new structure fields, rather than modifying the content of any pre-existing fields. Also note that readcxdata() should be able to parse data files generated by any version of Maestro or Cntrlx, as well as data files that have been augmented by the analysis program JMWork or its earlier incarnations -- MWork and XWork.

JMWork replaces XWork/MWork

JMWork evolved from the UNIX-based XWork, originally developed by Steve Lisberger. As their analysis work became increasingly dependent upon Matlab, most postdocs and graduate students switched to MWork, a Matlab program -- complete with a graphical user interface -- which does a subset of the tasks handled in XWork. This program, originally developed by Justin Gardner and since revised by a number of lab members, relies on readcxdata() and editcxdata() to interface with Maestro data files. In January 2008, JMWork was introduced as a replacement for both XWork and MWork. It implements all the functionality available in MWork, though still only a subset of what XWork could do. As of 2010, XWork is retired and MWork is no longer supported.

Researchers use JMWork, a Java application developed by Scott Ruffner, to view data files and perform various analytical operations such as cutting saccades from eye velocity trajectories, placing marks at selected time points in a trial, marking a trial as "no good", spike sorting, and so forth. The Maestro data file may be augmented by JMWork "action" records which "remember" the actions that the researcher has performed so that they can be automatically regenerated the next time the user reads the data file into JMWork. The action records are merely a sequence of action codes with accomanying parameters. All raw data records originally created by Maestro are left unchanged by JMWork -- part of the laboratory's effort to ensure data integrity.

Several fields in the Matlab output structure returned by readcxdata() expose the contents of the JMWork action records. The MEX function editcxdata(), on the other hand, accepts this same structure as input and alters the data file's existing action records accordingly, while maintaining the integrity of the original data records. It may be used to clear, edit or augment the following categories of analysis information: mark1 and mark2 time points, saccade cuts, mark segments, and sorted spike trains. It also may be used to edit the 25KHz spike waveform data in the file, which is useful if the waveform must be preprocessed to remove stimulus artifacts prior to submitting to JMWork for spike sorting.

A number of other "higher-level" Matlab utilities have been built upon the two MEX functions readcxdata() and editcxdata(). The introduction of tagged sections in Maestro created a need for a Matlab utility that could accumulate behavioral and/or event data (aka, spike times) recorded during tagged sections across a set of trials, with times reported relative to the start of the tagged section rather than the containing trial. The M-file function extractsectiondata() was developed to meet this need. It relies on readcxdata() to read in the contents of each trial data file. The need to integrate Maestro and the Plexon Multichannel Acquisition Processor (MAP) gave rise to plexmon, an interactive Matlab application that may be used to monitor -- "on the fly" -- the Plexon data stream and the corresponding data files recorded by Maestro during a trial sequence -- with data displayed and/or processed by a user-supplied handler function.

Explore the subpages in this section to review usage information on these and all other Matlab utilities that are maintained for use by Lisberger lab and any other Maestro users. Many of the supported functions and scripts include help documentation; just type help functionName at the Matlab command prompt (the function or script file must be in the Matlab command path, of course). All are available for download. The compiled MEX functions are platform-specific; we currently support the Linux 64-bit, Windows 32- and 64-bit, and the Mac OS X Intel 32- and 64-bit operating systems; all are compiled under Matlab 7.3 but should run fine under later versions.