Scripting Expo

Revised: 9/30/05

Expo is a scriptable application and understands the core AppleScript commands. In addition it has its own suite of scriptable objects and associated commands. These are exposed through Expo's dictionary, which you can examine with Script Editor or some similar application.

Sample Scripts

The Expo distribution contains two scripts (in the Scripts folder). Both are Applescript applications, or 'droplets' — scripts that are launched when you drop a file or a collection files on their icons.

Removing Spike Waveforms

The script "Expo-StripRawSpikes" removes from a data file(s) the (often very large) data object that contains the raw spike waveform, leaving the data file otherwise unchanged. To run this script, simply drop on its icon the set of files from which you want to remove the stored waveforms. Expo will remove the waveforms without changing the dates on the files. If you use this script it is a good idea to run it on duplicates of the original files.

The Expo capabilities exploited by the script are not accessible through the user interface.

Producing XML documents from Data Files

The File->Export Data… command saves the active data set as an XML document. The script "Expo-ExportXML" undertakes bulk conversion of data files. To run this script, simply drop on its icon the set of files from which you want to generate XML documents. For each file in the set, Expo will generate a counterpart XML document with the same name, but the filename extension ".xml".

The script executes a command 'export', which takes an argument (0,1,2) that specifies how much of any raw spike waveform (none, sample, full) to include in the XML document. The default value set in the script is 0 (none).