Spike2 Scripts


On-Line

ZAP function: Sine wave output with increasing frequency
Improved! (01/17)

ZAP function: Sine wave output with increasing frequency

ZAPexample.zip

This script and associated sequence can be used to generate a sine wave with a linear or quadratic increasing frequency from DAC 0 of a 1401 interface. To view the output, connect DAC 0 to ADC 0, load the included sampling configuration, ZAPexample.S2C, and select the text sequence file, ZAPexample.pls, from the Sequencer tab.

The script opens a new data file ready to sample based on the current sampling configuration. Sine wave settings are controlled from a script toobar button and can be updated during sampling.

This script requires Spike2 v7.00 or higher and a Micro1401 or Power1401 interface.

Linear ramp of pulse frequency Improved! (01/17)

Linear ramp of pulse frequency

LinRampFreq.zip

This script and associated sequence creates ramps of increasing or decreasing pulse frequency on-line and allows the user to enter settings for ramp time as well as start, turning point and end frequencies for the pulse output.

Before running the script you must ensure that the LinRampFreq.pls output sequence is selected in the Sequencer tab of your sampling configuration. The script sets up a new data file for recording based on the current sampling configuration.

For testing purposes, set channel 1 in your sampling configuration to be an Event channel in which pulses can be recorded to help visualise the results. The pulses are set to be 10us long and are output from digital output 0 of the 1401.

This script requires Spike2 v5.17 or higher and a Micro1401 or Power1401 interface.

Output pre-recorded spike times as a stimulus (05/10)

Output pre-recorded spike times as a stimulus

PlaySpikeTimes.zip

This script and associated sequence is an example of using the sequencer table to output a series of pre-recorded events during sampling. Select the PlaySpikeTimes.pls sequence file in the Sequencer tab of your sampling configuration before running the script.

When run, the script prompts the user to open a data file containing the spikes or events to use and select a time range of events to write to the sequencer table. During sampling, key 'a' will play the copied data out of digital output 0.

This script requires Spike2 v5.17 or higher and a Micro1401 or Power1401 interface.

Automatically adjust video rate in relation to spike activity
(08/10)

Automatically adjust video rate in relation to spike activity

VideoRate.zip

This script can be used to monitor an event or WaveMark channel and switch between slow frame rate and the normal frame rate depending on the level of activity in the nominated channel. You can specify the minimum interval between events that signals the start of a period of low activity.

This script requires Spike2 v5.17 or higher.

Apply IIR filters to a waveform channel on-line
(06/16)

Apply IIR filters to a waveform channel on-line

OnlineFilter.zip

This script is an example of applying IIR filters to a nominated waveform channel during sampling. It opens a new data file based on the current sampling configuration and then generates a dialog from which the user can specify the type of filter to apply and the source waveform channel to use.

Once sampling is started the script uses an idle routine to apply the filter to the source data and produces a new memory channel displaying the result.

This script requires Spike2 v6.01 or higher.

Apply an IIR filter to multiple waveform channels
on-line (06/16)

Apply an IIR filter to multiple waveform channels
on-line

OnlineFilterMulti.zip

This script allows you to apply a digital IIR filter to one or more waveform channels on-line. As delivered, the script can apply your chosen filter to up to four waveform channels sampled at the same rate. A minor edit to the script will allow you to increase the number of channels that can be processed.

A wide range of filter types are possible including notch, resonator, low pass, high pass, band pass and band stop. The filter characteristic can be chosen from: Butterworth, Bessel, Chebyshev type 1 and Chebyshev type 2.

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

This script requires Spike2 v8.03 or higher

Pulse from threshold crossing (07/15)

Pulse from threshold crossing

threspul.zip

This on-line script is written for use with Spike2 for Windows version 3 and later.

Before running the script, you need to ensure a suitable sampling configuration is set. This must contain at least one waveform channel. If you select to output a TTL pulse upon threshold detection, you may choose to set up an event or level channel for testing purposes.

To run the script, go to the script menu and select Run script. If the script is already loaded, it will appear in the menu; otherwise select Load and run which will generate a file selection dialog from which you should find and load the threspul.s2s script.

When the script is run, a dialog will appear, from which you set the various required settings: Input channel - Waveform channel on which to base threshold crossing timing
Threshold - Direction of threshold crossing. Positive (rising) or negative (falling)
Action - TTL pulse and/or memory channel marker

When OK is pressed in this dialog the script will open a new data file, ready to sample, with a horizontal cursor positioned on the selected waveform channel. This should be positioned at a reasonable starting level for the threshold, and the OK button pressed to continue.

When ready to sample, a toolbar is displayed from which the data sampling is controlled.

Quit - Quit the script and close down the toolbar
Sample start - Commence data sampling
Sample stop - Stop sampling. This button is disabled until sampling begins
New file - Close current file and open a new file ready to sample

TTL output
The default TTL output gives a pulse of duration 1ms from digital output 0 (bit 8) of the 1401 interface. The overall speed of the sequence and the pulse duration and selection of output bit can be edited in the pulse.pls file if required.

If TTL output is selected, the script writes a Spike2 output sequence file which is stored with a default name (pulse.pls) in the sequence sub-directory of the main Spike2 directory where the application is stored (e.g. C:\Spike4\Sequence\pulse.pls).

Memory channel marker
If Memory channel marker is selected, a new temporary channel is created and displayed in the data file. Each time the threshold is crossed, markers are imported into this channel at a position as close as possible to the actual threshold crossing.

This channel is temporary and must be written to a permanent channel if it is to be saved with the recorded data file. To do this go to the Analysis menu and select Memory buffer then Write to channel. From the dialog you can select an empty channel into which this data will be written.

Track that recording levels always remain within
recommended limits (07/05)

Track that recording levels always remain within
recommended limits

lvlmeter.zip

In some types of experiment it may be necessary to adjust the gain and offset of external preamplifiers repeatedly during the course of a recording. It is important to keep track of these changes and to ensure that the recording levels always remain within recommended limits. The level meter script can help you fulfil these requirements. It generates a duplicate view of your incoming data with each channel displayed relative to the full input range of the 1401. It gives you audible and visual warnings if any of the traces approach the limits of the working range. The script also allows you to keep a record of gain, offset and other changes by annotating the data file with TextMarks.

This script requires Spike2 version 5 or higher.

Generate clicks tone bursts and noise for online playback
(11/07)

Generate clicks tone bursts and noise for online playback

wavemake.zip

This script enables you to create tone bursts, noise burst or clicks and store them in a sampling configuration. These waveforms are then available to be played via a 1401 DAC output as an auditory stimulus during subsequent recording sessions.

Click stimuli can be positive or negative going. The rising and falling phases of tone bursts can be of fixed duration or an exact number of cycles of the underlying waveform (tone pips). The script can also create sequences of identical tone bursts separated by fixed intervals. Thus you could create, for example, a synthesised cricket chirp with 4 equally spaced syllables.

You can store up to 10 auditory stimuli in a sample configuration. You can play them in ‘single-shot’ mode by pressing a button on the PlayWave toolbar during a recording session. Use the WavePlay script to play selected waveforms repetitively. Full user instructions are included in the comments section of the script file.

Software requirements: Spike2 version 5.14 or higher.

Hardware: not compatible with Standard 1401 interface.

Simple auditory stimulation and recording script (06/06)

Simple auditory stimulation and recording script

waveplay.zip

This script enables you to play arbitrary waveforms (play-waves) repetitively via one or more DAC outputs while recording. A typical application might be to play repeating tone bursts, or clicks created with the WaveMake script while recording auditory responses. However, there are many other possibilities.

This script allows you to select a set of waveforms to play during the next recording session and set timing parameters such as repetition rate and number of repeats. Stimuli and responses can be then be displayed as triggered sweeps or in ‘chart recorder ‘ mode. The script also has the option to play two different stimuli alternately. A typical application would be alternate presentation of condensation and rarefaction clicks. A full user guide is included in the comments section of the script.

You can store up to 10 auditory stimuli in a sample configuration. You can play them in ‘single-shot’ mode by pressing a button on the PlayWave toolbar during a recording session. Use the WavePlay script to play selected waveforms repetitively. Full user instructions are included in the comments section of the script file.

Software requirements: Spike2 version 5.14 or higher. The script works in conjunction with a text sequencer: PlayWaveform02.pls. This file must be stored in the folder named sequence inside the main Spike2 directory.

Hardware: not compatible with Standard 1401 interface.

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