This script is designed to improve the signal-to-noise ratio of physiological recordings by removing mains-related interference. This is done, not by filtering, but by subtracting an estimate of the mains interference from the raw data and storing the results in a new channel. The script has been modified to work on waveforms with gaps.
The script requires Spike2 v 6.02 or later.
Waveforms should be recorded with a sampling rate of at least 5kHz. Better results will be obtained if you record an event channel that marks the onset of each cycle of the mains or alternatively, a waveform channel that accurately reflects the mains frequency.
See the data sheet Hum Remove.pdf, included in the HumRemove.ZIP file, for full details.
This script is an example that allows the addition of TextMark items interactively to a region of data by holding down the Shift key and clicking and dragging the mouse pointer.
This script requires Spike2 v7.01 or higher.
This script can be used to copy event or marker times from a currently selected data file to a new permanent channel in any open data file. The script creates two cursors to select the data range to copy and you can apply an optional time shift by setting the start time for the data in the new channel. A suitable example data file, Demo.smr is included in the Data folder of your Spike2 directory.
This script requires Spike2 v5.21 or higher.
Keywords: Time shift, copy events
This script allows the user to set a time range and frequency of stimulation for adding events into a new channel in a data file at the specified interval and time range. The script also allows the addition of multiple event trains into the same channel.
This script could also be used to create pulse trains at a set frequency for output. Once the events have been created as an event channel in the data file, you could load them into the output sequencer using the PlaySpikeTimes script.
This script requires Spike2 v5.21 or higher.
Keywords: Pulse trains
This script can be used to give an identifying number to stimulus events, spike shapes or markers. The script creates a new TextMark memory channel that holds text strings starting at 1 for the time of the first event in range. A suitable example data file, Demo.smr, is included in the Data folder of your Spike2 directory.
This script requires Spike2 v5.21 or higher.
This script is a utility for script writers. It improves the layout of a script by aligning the comments on lines containing code to a common, user-defined offset.
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.
This script is a utility for script writers. It can improve the readability of scripts especially longer ones with many functions and procedures.
Available options include: removing constants and variables that were declared but not used and sorting functions and procedures into an alphabetical list after the main program. The most convenient way to run this script is via a button on the Script Bar.
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.
This utility script allows you to:
This script requires Spike2 v6.16 or higher. It allows you to delete marked time ranges from a Spike2 time view. Mark the time ranges to cut out using the TimeRanges.s2s script in your Spike2 scripts folder. Then run this script to create a new edited data file.
The original data is untouched. You could use this script to generate ‘edited highlights’ of your data or to remove stimulus artefacts.
This script replaces the old Copy_Chn script. It allows you to copy channels into new channels using a time-axis offset. Several channels can be copied at a time and the offset may be input either as a number of seconds or as the position of a cursor. It works on all types of channels.
These scripts differentiate and integrate a selected section of waveform data respectively. The result is placed in a memory channel.
This simple script cleans-up an event channel by copying to another event channel, leaving out all events occurring too soon after the last event.
This script reduces the size of ECG artefacts in emg recordings by reference noise subtraction. You will need to record a dedicated ECG channel alongside your data as a source for Events marking the position of the artefacts unless the artefacts on the emg channels themselves are sufficiently large for reliable triggering.
The zip file includes 2 scripts, ECGdelete01.s2s suitable for use with Spike2 v7.07 or higher and ECGdelete v5.s2s for use with Spike2 v5.21 and v6.
Removes stimulus artefacts from data channels, replacing the artefact with a straight line to preserve continuity. Artefacts can be identified by timing from a trigger channel, or by cursor positions.
The download now includes an updated version for users of Spike2 v6 and higher. The basic version is still available for users of earlier versions of Spike2.
This version 7 script replaces glitches or artefacts on a Waveform or RealWave channel using linear prediction. Put simply, the script replaces segments of “bad” data with a wavefom of similar spectral content to the “good” data on either side of the glitch.
Undelete a channel you have accidentally deleted from a data-file. Back up your data before using this script!
Converts result file data back into a data file to allow data file specific use. This requires Spike2 version 4 or later.
This script reads data from a text file, creates a new Spike2 data file and writes the imported data into waveform channels. The number of channels to be imported can be set by the user.
This is a general purpose script that is useful for creating and editing Event, Level, Marker, TextMark, RealMark and WaveMark channels in a time view.
Using this script you can:
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.