Spike2 Scripts


Add two waveforms (08/98)

Add two waveforms


Adds two waveform channels together between stated times. The script is a little complicated for what it does; it has a lot of error checking.

Users of Spike2 versions 5 and above can use the built-in Virtual Channels to perform channel arithmetic.

Copy and paste waveforms and events (11/97)

Copy and paste waveforms and events


This script enables the user to copy sections of waveform, and corresponding event data from several different files and to paste them into a newly created data file. Each section copied will be appended to previously copied data, and optional gaps can be left. This file can then be saved as a normal Spike2 data file.

This script is now superseded by the Merge Files script for Spike2 versions 5 and above.

Extract a waveform section Improved! (01/17)

Extract a waveform section


Chops off sections of data before and after a chunk that you want to isolate. It works only on waveform channels. Beware! This script makes large, irreversible changes to your data-file.

This script is now superseded by the Merge Files script for Spike2 versions 5 and above.

Rectify waveform data (01/97)

Rectify waveform data


This script almost wholly consists of a Rectify function which demonstrates how to generate rectified data in a memory channel.

Rectification can be applied as a Channel Process in Spike2 version 4 and higher, but this script remains a good example of copying and manipulating channel data using the script language.

Shrink a script Improved! (01/17)

Shrink a script


Takes a script and shrinks its size, while preserving the functionality.

XY display of multiple files Improved! (01/17)

XY display of multiple files


This script allows the user to open a sequence of data files and copy regions of data into an XY-view, superimposing one upon another. The script operates in two modes: firstly, when copying from Waveform channels, the region to be written is delimited by cursors positioned by the user and optionally snapped to a relevant marker with an associated pre-trigger time. If the channel being copied is of Wavemark type the program acts by superimposing all spikes in the interval between the cursors. In both modes a sequence of data files can be opened for copying and different channels can be used within each data file.

The down-load contains further documentation in Word format.

Some of these scripts have come from users rather than the CED team. If you have a script that you would like to offer to fellow users via this page, please tell Simon Gray. We provide some scripts for Signal too.

These scripts are stored as WinZip files, myscript.zip, except where they are shown as spike\scripts\myscript.s2s. Those latter files were installed with Spike2 and spike stands for the directory in which you installed Spike2. See the summaries by clicking on the description in the side menu. Then you can down-load them by clicking on the filename.


Mains ‘hum’ is often complex and composed of odd harmonics of the mains frequency, making it very difficult to remove or suppress using simple high pass or notch filters. HumRemoveExpress.s2s is a Spike2 version 7 script that you can use offline to strip out much of this residual mains interference, making your data much more presentable and easier to analyse. This video tutorial shows how to use the script to remove mains hum.

  • Alpha MED Sciences
  • Alpha Omega Engineering
  • Axon Instruments
  • Binary data
  • Bionic/Cyberkinetics
  • Biopac
  • CED SON (Macintosh)
  • CONSAM (D. Colquhuon)
  • DATAQ Instruments (Codas)
  • DataWave
  • Data Sciences International
  • Delsys Files
  • European Data Format(+)
  • Grass-Telefactor (PolyView)
  • HLR Data Format
  • Heka Data Format
  • Multi Channel System (Mc_Rack)
  • MindSet (16/24) data Files
  • MindWare data files
  • Motion Labs Systems Files .c3d
  • NeuroScan
  • Neuralynx
  • Plexon
  • RC Electronics
  • Text files
  • TMS International
  • Tucker-Davis Technologies
  • WAV (Microsoft)
  • WaveMetrics Igor Pro (PC/Mac)
  • Xltek Neuroworks
Cambridge Electronic Design Limited

Registered in England: 972132

Registered office:

  • Cambridge Electronic Design Limited,
  • Technical Centre,
  • 139 Cambridge Road,
  • Milton,
  • Cambridge CB24 6AZ

VAT: GB 214 2617 96

Producer Registration number: WEE/BD0050TZ

Terms and Conditions of Sale

For our US customers, we can provide tax form W-8BEN, that identifies us as a UK company.

DUNS: 219151016
NAICS: 423490
Commodity codes
Hardware: 84716070
Software: 85234945

By email:


By post:
  • Cambridge Electronic Design Limited,
  • Technical Centre,
  • 139 Cambridge Road,
  • Milton,
  • Cambridge CB24 6AZ
By telephone:

(Int.+44) (0)1223 420186

From North America (Toll Free):

1 800 345 7794


Privacy policy

CED, through this site, does two things that relate to privacy. We would like to explain them.

Emails from down-loads

We offer free down-loads of many files on our site, from test programs to complete install files for updated versions of major packages like Spike2 and Signal.

When customers wish to take a down-load of a major package, we ask a few questions, including their name, email address, the serial number of the software for which they seek an upgrade and whether they would like an automatic email whenever we update the product. This information is emailed back to CED when they access the final down-load screen. Within this email, your browser transmits the type and version of browser you are using, and the screen resolution you are running.

The reasons why we take and keep this information are that it is useful for our software development team to know who has taken the latest versions, and it is useful for our web site development team to know which browsers people are using to view our site, and what resolution they have their screens set to.


When people down-load a major package, we try to write a cookie, a small file in your computer, that records your name, serial number of the software package, and the version you are down-loading. These files have a lifetime of one year.

The reasons for storing this information are firstly that if you ask for another down-load some other time, your details are read from the cookie and are pre-written into the form, to save you looking them up again. The other reason is that next time you access our site, your browser looks through your CED cookies and compares the versions down-loaded with the latest version numbers read from our site. If there is a later version of a product you have already down-loaded, we tell you on the home page screen, so you know that it is worth going to the down-load page again.

None of this information is ever given to anyone outside CED. ×