Editing    Analysis    Display    Archive Scripts    Useful Script Functions    Control

On-Line    Experiments    Examples of Method    Spectrum    Export

Experiments
Play tone for ECG R-wave detection
Force feedback display
Analyse cricket song with burst analysis
Cardiac action potential analysis
Respiratory sinus arrythmia
Eye movement monitor
X-Yplot of eye movements
Skinner box
Auditory Stimulation and Single Unit Recordings
Simple Auditory Brainstem Responses
Play tone for ECG R-wave detection ECGTone.zip 3,200

This script plays a tone 'pip' from DAC 0 of the 1401 when the R-wave of an ECG complex is detected during sampling.

Sampling is controlled via the script toolbar and the user is asked to set the ECG channel to monitor and a hysteresis value for the R-wave peak detection. A horizontal cursor is then used to set a threshold for the detection of the R-wave. Each time the threshold is crossed the script monitors the level of the incoming data and, when a peak is found, waits for the data to fall by at least the level set by the hysteresis value before playing the tone to flag the R-wave detection.

This script requires Spike2 v6.00 or higher.

Keywords: ECG, R-wave detection, tone output


Force feedback display BarDisplay.zip 1,924

This script is an example of displaying an on-line channel value in a separate window for use in a force feedback experiment. The script contains an idle routine that updates the bar display in response to incoming waveform data in channel 1.

This script requires Spike2 v4.24 or higher.

Keywords: Force feedback display


Analyse cricket song with burst analysis songan.zip 2,709 songan.sit 3,763

Analysis of cricket song into pulses and chirps, using the burst analysis feature of Spike2. A simple table of results is produced. Have your cricket song data-file open and visible before running this script.


Cardiac Action Potential Analysis System capas.zip 59,087 capas.sit 11,173

This extracts certain parameters from Cardiac Action Potential (CAP) data.

The user is first required select a suitable file for analysis, and to specify the CAP channel. They should then place a horizontal cursor on the data such that it crosses all the upstrokes of the data file.

This enables the script to place marks in a temporary event channel every time a CAP is located. The script then attempts to extract certain characteristics from the CAP; these values are written to the screen.

The extracted characteristics include:

CAP start time
CAP end time
Baseline value
Peak value
Peak time
Upstroke gradient
Repolarisation gradient
30, 50, 60, 90 % re-polarisation times.

The user may click the mouse on the text window and this will place a cursor on the data at the value indicated by the clicked position (easier done than said).

All desired results are dumped to a text file.


Respiratory Sinus Arrythmia rsa3.zip 4,142 rsa3.sit 5,745

This script is designed to show respiratory sinus arrhythmia in EMG data.

A data-file is loaded which contains one channel of EMG activity and another of pressure waves. A threshold level is set on the pressure channel to mark the start and end points of each pressure wave. For each pressure wave interval the instantaneous heart rate is sampled at a given frequency and the instantaneous frequencies are logged to a text file.


Eye movement monitor eyemove.zip 16,989

This script allows the user to plot eye movements in two dimensions and show positions of fixations and saccadic motions graphically.

Each experiment consists of a number of trials in which a subject is presented with a visual stimulus and the motion of the eye is tracked by suitable apparatus. This apparatus should output two voltages proportional to angular deflections in the X- and Y-directions respectively and these signals are the inputs to the CED 1401 connected to the PC running the script. When a trial is initiated the script displays an XY-plot of the motion of the subject's eye in real-time. Points of fixation are marked as the trace develops and saccadic motions are drawn at the end of the trial. A record of data concerning these features is kept in a log file.

A very simple sequencer file, eyemove.pls, is included which sends a digital output signal to the visual stimulus apparatus to trigger a trial of the required type.

A facility for scanning results and dumping data off-line is provided.

The script requires a Power1401, a 1401plus or a micro1401; it cannot run with a standard 1401. It runs with Spike2 version 3.xx or later, not with any version 2 program.


X-Yplot of eye movements Itrack.ZIP 49,757

This offline script displays eye movements relative to a target that is being tracked by replaying the data file and plotting the angular coordinates of each eye in an X-Y view.

The raw data is a time view of horizontal and vertical components of eye and (optionally) target movements, as recorded by a pupil-tracking camera system. This script then allows you to replay the data with a simultaneous display of the X-Y track followed by the eyes and the target. You can select the speed of the replay in the range 0.1x to 10x actual speed and select the duration of the tracks to display. Typically, you would choose to display the most recently replayed data, for example the last 0.5 seconds.

The script requires Spike2 version 6.09 or higher.

A full user guide is included in the comments section of the script file.

The .ZIP file contains an example data file that you can use to try out the script.


Skinner box Skinner.zip 115,607

This script allows you to record of one or more channels of physiological data while a rat learns to press levers in a Skinner box. The times of each lever press are recorded as events (on ports 0 and 1) and the 1401 delivers TTL output pulses to trigger the release of a food pellet when the rat gives the required response. The timing of rewards is recorded on event port 2. You can set the duration of a refractory period after a reward during which no further rewards are given even if the correct lever is pressed.

Three experimental paradigms are available:

  1. Pressing either of two levers is rewarded (training).
  2. Pressing the left lever is rewarded.
  3. Reversal learning. Pressing the left lever is rewarded a set number of times and subsequently, only pressing the right lever is rewarded.
Software requirements: Spike2 v3 or higher.
Hardware requirements:
A standard 1401 is suitable for recording a single channel of physiological data at high sampling rate (10k to 20kHz).
Multi-channel recording at 10kHz or higher sampling rates per channel requires a 1401plus, Micro1401 or Power1401.
Auditory Stimulation and Single Unit Recordings audstimrec.ZIP 485,682

This package of scripts allows you to generate acoustic and vibratory stimuli, record neural single-unit responses and perform online analysis of window discriminated spikes. These scripts were developed for research on the auditory system and lateral line organs of fish but should be suitable for a wide range of auditory studies on both vertebrates and insects.

This package enables you to generate acoustic or vibratory stimuli of known intensity and record intra- or extra-cellular single unit responses to these stimuli. Available stimuli include tone pips and symmetrical or asymmetrical tonebursts with frequencies ranging from 1Hz to 10kHz. It is also possible to stimulate with stored arbitrary waveforms (for example, pre-recorded sounds) or to trigger an external stimulator.

The recording system includes a virtual window discriminator for spike detection. Online analysis of incoming data includes post-stimulus time, interval and phase histograms. Circular statistics are used to quantify the degree of phase -locking of spikes to the stimulus waveform. See the user guides for further details.

System Requirements:

Hardware: Power 1401, CED3505 programmable attenuator (see details)
Software: Spike2 v5.15 or higher
Scripts: AudioStimRecSU.s2s, SoundCalSU.s2s
Sampling configuration: SU.s2c
Sequencer: SU4.pls
Other files: MScaldataSU.txt, SpkcaldataSU.txt, SUSettings.txt
User guides: AudioStimRec SU.pdf, SoundCalSU.pdf, 3505_V2spec.pdf

Simple Auditory Brainstem Responses simpleabr.ZIP 312,725

This Spike2 script package is suitable for recording auditory brainstem responses (ABR) to tone pip stimuli. It was developed for research on responses of fish to underwater sounds but may be equally useful for investigating the responses of other vertebrates to airborne sound.

The script generates symmetrical tone pips with a linear rise and fall phase and filled with carrier frequencies ranging from 20Hz to 10kHz via DAC0. The user can set up the shape of the tone pip, select its polarity (or choose alternating polarity), stimulus repetition rate and number of sweeps to include in the average. Stimulus intensity can be set in steps of 5dB over a range of 75dB using the CED program controlled attenuator. A calibration curve to correct for variations in intensity with stimulus frequency is applied automatically.

Pre-amplified neural responses recorded via ADC0 are processed by signal averaging. The averaged responses at each stimulus frequency are displayed in descending order of stimulus intensity for easy estimation of thresholds. The script builds up and displays threshold -response curve as the experiment proceeds.

System Requirements:

Hardware: Power 1401 or Micro1401 Mk2, CED3505 attenuator (see details)
Software: Spike2 v5.15 or higher
Scripts: FishABR v1.15.s2s, SoundCal v1.15.s2s
Sampling configuration: Fishabr v1.15.s2c
Sequencer: Fishabr v1.15.pls
Other files: MScaldataSU.txt, SpkcaldataSU.txt, SUSettings.txt
User guides: FishABR v1.15.pdf, SoundCal.pdf, 3505_V2spec.pdf


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 line, below. Then you can down-load them by clicking on the filename; please check the size received.