• UK
  • US
  • Français
  • Deutsch
  • Español (precios €)
  • Portugal
  • Polski
  • 日本人
  • 中國傳統
  • 简化中国

Data processing using the script language

As well as commands for implementing all the built-in data processing functions described above, the Spike2 script language has full access to the data as arrays of waveform values or marker times. Within the script language there are many commands and mathematical functions for use with arrays, matrices and individual values. Results may then be placed back into a data file, or to another type of view, or output for further analysis.

Typical commands include:

Fill an array with a waveform or event times

Take specified measurements from a channel

Perform spectral analysis on result views, or data array

Applies a FIR filter to an array

Sort an array and optionally order others in the same way

Interpolate one array to another using cubic splines

Calculate the determinant of a matrix

Solve a set of linear equations

Transpose a matrix

Principal component analysis (singular value decomposition)

Exponential function of a number or array

Logarithm to base 10 of a number or array

The script language also contains a function for converting events to waveform format. Although similar functionality is available through the use of virtual channels, the EventToWaveform() command gives the added benefit of allowing the resultant waveform to be smoothed with a user-defined shape which may be asymmetrical.

Example script command help page

Script driven waveform processing; integration of nerve activity normalised to baseline

Cambridge Electronic Design Limited

Registered in England: 00972132

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