Spike2 Scripts


Analysis

Rectify and Integrate waveforms (06/16)

Rectify and Integrate waveforms

integrate01.zip

Extra-cellular multi-unit activity from peripheral nerves can be difficult to quantify. Individual units may not be identifiable because the signal to noise ratio is too low or too many units are activated simultaneously. In these circumstances, it can be helpful to rectify and integrate the signal over a short time range to convert the activity of an ensemble of units to a level that can indicate changing responses to stimuli. This script works on- or off-line on up to 4 source channels sampled at the same rate. You can increase the number of channels processed on-line by minor edits to the script.

This script has been tested with Spike2 v7.17 or higher.

Grand Average (05/10)

Grand Average

GrandAverage.zip

This script can be used to 'build' an average of multiple result views including waveform averages, PSTH's and interval histograms. Select result views to add to the Grand Average by opening a saved result view or creating a new result view and making it the current or 'top' window. Then simply click the ADD button in the script toolbar.

This script requires Spike2 v4.24 or higher.

Multiple cross-channel correlations (09/07)

Multiple cross-channel correlations

CrossChanCorrelation.zip

This script generates multiple spike correlation histograms for all combinations of templated spikes in a channel. Currently it allows for up to 8 spike templates per channel (including code 0) for correlating between channels in the file.

The script is controlled from a toolbar where the user can open a data file for analysis and control the parameters for the correlation as well as the number of correlation results views to display at any one time. A suitable example data file, Extracellular spikes.smr, is included in the Data folder of your Spike2 directory.

This script requires Spike2 v4.24 or higher.

Interactive feature detection (05/10)

Interactive feature detection

FeatureDetect.zip

This script allows the user to interactively import peaks, troughs or threshold crossings based on an amplitude value defined with a pair of horizontal cursors, or a single horizontal cursor used as a threshold crossing.

The script utilises an idle routine that automatically updates the memory channel holding the event markers if the user adjusts the amplitudes or threshold levels. A suitable example data file, Blood pressure waveform.smr, is included in the Data folder of your Spike2 directory.

This script requires Spike2 v4.24 or higher.

Automate Cursor Regions Measurements
Improved! (01/17)

Automate Cursor Regions Measurements

WMeasure.zip

This script automates the process of taking multiple Cursor Regions type measurements. You simply specify the source channel, the type of measurement to take and the time range over which to make it. For example one could specify the mean of a waveform to be measured in 30s bins. The results can be plotted as a RealMark or tabulated in the log. As a further refinement you can specify a State channel and marker codes to gate the analysis to time ranges of interest.

This script requires Spike2 v6.06 or higher.

Fit a Gabor Function (05/09)

Fit a Gabor Function

GaborFitDemo.zip

The Gabor function is a sine wave damped by a Gaussian function.

This script allows you to fit a Gabor function to physiological data. An example application might be to detect oscillatory neural activity in auto-correlograms, e.g., Young et al (1992). The script also generates test data that you can use to familiarise yourself with the curve-fitting procedure.

You could also use this script as a template for fitting other functions by non-linear regression using the FitNLUser() script function.

This script requires Spike2 v6.06 or higher.

REFERENCE Young MP, Tanaka K, Yamane S (1992) On Oscillating Neuronal Responses in the Visual Cortex of the Monkey J NeuroPhysiol 67:1464 - 1474

Record and analyse respiratory data Improved! (11/17)

Record and analyse respiratory data

RespRelease.zip

This archive contains scripts that enable you to:

  • Calibrate a pneumotachograph, the type of flow meter commonly used to record breathing
  • Convert the pneumotach. output to BTPS flow and BTPS volume online
  • Analyse respiratory data

The respiration analysis script enables you to:

  • Subtract drift from volume and flow traces
  • Measure inspired capacity (IC) and forced vital capacity (FVC) manoeuvres
  • Perform breath by breath analysis of many respiratory parameters
  • Plot Flow-Volume loops
  • Investigate flow limitation during exercise by making comparative measurements of F-V loops
  • Plot Volume-Pressure loops
  • Measure elastic and resistive components of Work of Breathing

The archive also includes user guides, example data files and sampling configurations that should help you to get started. These scripts require Spike2 version 8.09 or higher.

They are beta versions. Send your bug reports and ideas for further development to geoff@ced.co.uk

On/Offline Measurement from a Blood Pressure Trace
(11/13)

On/Offline Measurement from a Blood Pressure Trace

hrbp_8.zip

This family of Spike2 v7 scripts and sampling configurations allows you to perform long-term recordings of blood pressure, heart rate and sympathetic activity and to analyse baroreceptor reflexes and heart rate variability. The scripts are suitable for use with a range of laboratory animals and can record data from up to 8 animals simultaneously when used together with telemetry systems.

HRBP8b.s2s derives systolic, diastolic and mean blood pressure, heart rate and respiratory rate from each blood pressure trace. Data from up to 8 animals can be analysed on- or off-line. Results are recorded continuously or according to a user-defined schedule, e.g. 10 minutes per hour. Data can be auto-saved to a new file at regular intervals (e.g. every 24 hr.) in order to achieve virtually continuous recording over days or weeks.

MergeFiles.s2s /SplitFiles.s2s These utility scripts allow you to splice auto-saved data files end to end before further analysis and to split data related to different animals into separate data files.

sBRG.s2s This offline script calculates baroreceptor reflex sensitivity based on spontaneous fluctuations in blood pressure.

SigFit.s2s Fits sigmoid curves (4 and 5 parameters) to heart rate and blood pressure data derived from steady-state experiments.

HRV1.s2s Performs frequency domain analysis of heart rate variability.

Poincaré s2s Performs non-linear analysis of heart rate variability.

HRBPtable.s2s Generates tables of results suitable for further analysis with spreadsheet software.

Baro5.s2s This is a library of script functions required by the SigFit script.

This family of Spike 2 scripts require v7.12 or higher.

Amplitude histogram (06/07)

Amplitude histogram

amphist.zip

This script generates an amplitude distribution histogram from a Waveform, RealWave or WaveMark channel. You can select the required channel, time range, amplitude range and bin size using a combination of cursor dragging and dialog entries. The results can be displayed in various forms including number of points, Time and percent time in each amplitude bin. A user guide is included in the comments at the head of the script.

This script requires Spike2 version 6,04 or higher. It also makes use of functions in the script file GHutils.s2s (included in the download). This file must be located in a folder called include located inside the directory holding your copy of Spike2.

Separate traces from stereotrode and tetrode channels
(09/13)

Separate traces from stereotrode and tetrode channels

SeparateTraces.zip

This script will take a selected channel of multiple trace WaveMark data and create additional memory channels in the data file, each holding a single trace from the source channel. The user selectes the channel and type (stereotrode or tetrode) from a dialog when the script is run. A suitable example data file, Tetrode data.smr, is included in the .zip file.

This script requires Spike2 v5.21 or higher.

Detecting event bursts using Poisson Surprise (05/98)

Detecting event bursts using Poisson Surprise

surprise.zip

This script detects bursts of events against a background of more random events.

Improved burst analysis (07/12)

Improved burst analysis

bursts.zip

Create level channels in a data file that mark groups of Events, Markers or Wavemarks. Plot burst duration, inter-burst interval, burst period or events /burst vs time.

Create additional channels showing burst rate, burst onset times, and events within bursts and events not in bursts.

Generate a table of burst statistics that can be easily copied to a spreadsheet for further analysis.

Display a state channel marking low, intermediate
and high levels of a waveform (09/10)

Display a state channel marking low, intermediate
and high levels of a waveform

levelind.zip

For many applications it is important to know the timing and duration of periods when the level of a waveform channel exceeded a user-defined upper threshold, fell below a lower threshold or was between these levels. This script provides a convenient method of displaying and analyzing the number and duration of high, intermediate and low states.

The script allows you to do the following:

  • Set an upper and lower threshold level on the selected waveform channel
  • Create a level indicator channel in the data file with periods above, below and between the threshold levels denoted by coloured bars
  • Choose an appropriate colour code for the high, mid. and low states, e.g. red/amber/green or green/amber/red, depending on whether the high or the low level represents the 'optimal' or 'preferred' range
  • Plot the duration of an individual state or all 3 states as a function of time
  • Display the distribution of durations of each state as a bar chart
  • Generate a report suitable for further analysis with spreadsheet software
  • Use the normal data manipulation and analysis features of Spike2 during script operation

This script requires Spike2 version 5.09 or higher.

PSTH logging and integration (12/98)

PSTH logging and integration

qpsth.zip

This script records trigger and response signals. It creates a PSTH result view and integrates it to produce a cumulative display. This is done on-line as the data is sampled. Two channels are defined: a trigger channel and a response event channel.

Automatic sleep staging for rats (08/15)

Automatic sleep staging for rats

RatSleepAuto.zip

This script assigns sleep scores (Wake, NREM, REM and Doubt) based on recordings of hippocampal EEG and nuchal EMG. It implements the method of Costa-Miserachs et al (2003). The script includes a brief user guide that should be read in conjunction with the original article:

Costa-Miserachs D, Portel-Cortez I, Torras-Garcia M, Morgado-Bernal I (2003) Automated sleep staging in rat with a standard spreadsheet. J.Neurosci Methods 130:93-101

This script requires Spike2 version 5.20 or higher.

On/Offline sleep-scoring for up to 4 animals
(12/16)

On/Offline sleep-scoring for up to 4 animals

osd4.zip

This script is intended for on-line sleep staging in rats, mice or chicks. Sleep is divided into epochs of WAKE, NREM or REM sleep based on recordings of one EEG and one EMG channel per animal. The script can generate user-defined patterns of output pulses when a target sleep stage (e.g. REM) is detected. These pulses are suitable for controlling a laser in optogenetic studies.

The script as also suitable for simpler applications such as off-line sleep staging or plotting EEG spectral power in up to 4 frequency bands off-line.

Recording more than 2 animals simultaneously requires a breakout box (CED 2805 DIO-8) or a home-made custom cable in order to connect to digital inputs and outputs on the rear panel of a 1401 interface.

This script requires Spike2 version 8.08 or higher.

Manual sleep staging and event marking
Improved! (09/17)

Manual sleep staging and event marking

sleepscr.zip

This script allows you to perform the following tasks:

  • Subdivide a Spike2 time view into epochs of the desired length
  • Inspect the data and assign epochs to sleep stages (or other user-defined categories)
  • Mark user-defined ‘Events’ such as apneas and arousals
  • Epochs and Events are shown as states in TextMark channels with different stages and events represented by a colour code
  • Mark Events and sleep stages under mouse control using a drag and drop method
  • Optionally display ‘skyline’ plots of EEG power in user-defined bands
  • Optionally display banded EEG power spectra of a selected epoch
  • Optionally display a hypnogram where each sleep state is represented by a level
  • Generate a report suitable for further analysis with spreadsheet software

This script requires Spike2 version 7.10 or higher.

Tabulate sleep-state -related changes in EEG spectral
characteristics New! (10/17)

Tabulate sleep-state -related changes in EEG spectral
characteristics

PiBrept.zip

This script works on data files that contain one or more EEG channels and a sleep stage marker channel (a state channel with vigilance states marked by differently coloured bars).

You can create multiple EEG spectral channels, showing EEG power-in- band, dominant frequency or spectral edge. The script then generates a table of results showing the spectral characteristics of each successive episode of a user-defined sleep state (e.g. NREM) during a long term recording. This allows you to quantify changes in spectral characteristic with time and effects of optogenetic or other stimulation. The table generates a summary every hour or time interval of your choice so that trends can be identified more easily.

There is an option to “gate” the results, that is, to include or exclude data that falls in a time range around markers in a nominated channel.This means that you can, for example, exclude all data during stimulation, or include data for a specified time range after stimulation.

This script requires Spike2 v8.12 or higher.

Import data from a Compumedics Profusion™
sleep scoring system (04/16)

Import data from a Compumedics Profusion™
sleep scoring system

ssevtsimport.zip

This is a multi-stage process.

You can export the waveform data as European data format (.edf) and then import the .edf file into Spike2 for further analysis. However, data on sleep states and the onset and duration of manually scored events, -eye movements, apnoeas etc. are stored in a resource file (.xml format) that cannot be read directly by Spike 2.

Convert the .xml file to .txt format by copying the Profusion™ resource file from a web browser window to a simple text editor such as Notepad™ via the Clipboard and save it. You can then import the sleep stage and event information from the text file into the corresponding Spike2 data file using this script.

This script imports data saved in the CMPPSGSCOREDATA format.

There is a user guide in the comments at the start of the script file.

This script requires Spike2 v7.17 or higher.

Import data from a Compumedics Profusion™
sleep scoring system 2 (06/16)

Import data from a Compumedics Profusion™
sleep scoring system 2

ssevtsimport2.zip

This script works in a similar way to the previous script. However, it is intended to import text files created from .xml files in the Compumedics CMPSTUDYCONFIG format.

There is a user guide in the comments at the start of the script file.

This script is based on one contributed by Dwayne Mann, Biomedical Engineering, University of Queensland. If it works for you then it is thanks to him; if it doesn’t, you can blame me (GH).

This script requires Spike2 v7.10 or higher.

Import data from a Somnologica™ sleep scoring system
(04/16)

Import data from a Somnologica™ sleep scoring system

ssimpsomno.zip

This is a multi-stage process.

You can export the waveform data as European data format (.edf) and then import the .edf file into Spike2 for further analysis. However, data on sleep stages are stored in a resource file (.xml format) that cannot be read directly by Spike 2.

Convert the .xml file to .txt format by copying the Somnologica™ resource file from a web browser window to a simple text editor such as Notepad™ via the Clipboard and save it. You can then import the sleep stage information from the text file into the corresponding .Spike2 data file using this script.

There is a user guide in the comments at the start of the script file.

This script has been tested with Spike2 v7,17 and 8.08.

Mean and mean deviation (10/05)

Mean and mean deviation

mean_angle.zip

The purpose of the script is to calculate the mean and the mean deviation of a set of angles (or other variables) given by a textfile. In addition, it performs the Rayleigh test of uniformity, which tests whether the distribution of angles differs significantly from uniformity. The down-load contains the script and two test files.

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 CFS
  • CED SON (Macintosh)
  • CONSAM (D. Colquhuon)
  • DATAQ Instruments (Codas)
  • DataWave
  • DATAPAC
  • 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
  • ENGLAND.

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
CAGE/NCAGE: KB797
NAICS: 423490
Commodity codes
Hardware: 84716070
Software: 85234945
×

By email:

info@ced.co.uk

By post:
  • Cambridge Electronic Design Limited,
  • Technical Centre,
  • 139 Cambridge Road,
  • Milton,
  • Cambridge CB24 6AZ
  • ENGLAND.
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.

Cookies

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. ×