The file is a Python file which should define a dictionary variable probes,
with keys the shank number, and values a list of channel pairs defining the
edges of the graph.
The Probe object has the following attributes:
num_channels
The number of channels used (1+the maximum channel number referred to)
channel_graph
A dictionary with keys the shank number, and values being graphs. A graph being a dictionary with keys the nodes (channel number) and values the set of all connected nodes. (So each channel in an edge is referred to twice in this data structure.)
shanks_set
The set of shank numbers
channel_set
A dictionary with keys the shank numbers, and values the
set of channels for that shank
channel_to_shank
A dictionary with keys the channel numbers and values the corresponding shank number.
probes
The raw probes dictionary definition in the file.
I have included some examples of probe files:
buzsaki32.probe
linear16.probe
multishankslinear32.probe (an 8 shank example)
2) Parameters to adjust
Please alter the following two lines in your parameters.py file (I have included the file example_parameters.py)
# Options for computing in chunks
CHUNK_SIZE = 20000 # number of time samples used in chunk for filtering and detection
CHUNK_OVERLAP = 200 # number of samples that chunks overlap in time
The higher your sampling rate, the higher you should set these two (maintain the ratio of 10:1, it seems good). Set CHUNK_SIZE = sampling rate.
The default parameters are as follows (change as desired):
# Options for filteringF_LOW=500.# low pass frequency (Hz)BUTTER_ORDER=3# Order of butterworth filterWRITE_FIL_FILE=True# write filtered output to .fil file# ThresholdingUSE_SINGLE_THRESHOLD=False# use a single threshold for all channelsCHUNKS_FOR_THRESH=5# number of chunks used to determine threshold for detectionTHRESH_SD=4.5# threshold for detection. standard deviations of signalDETECT_POSITIVE=False# detect spikes with positive threshold crossing# Options for spike detectionT_BEFORE=.0005# time before peak in extracted spikeT_AFTER=.0005# time after peak in extracted spikeT_JOIN_CC=.0005# maximum time between two samples for them to be "contiguous" in detection stepPENUMBRA_SIZE=0# mask penumbra size for the binary masks (0 no penumbra, 1 first neighbours, etc.)# Options for alignmentUSE_WEIGHTED_MEAN_PEAK_SAMPLE=True# used for aligning wavesUPSAMPLING_FACTOR=10# used for aligning waves# Options for featuresFPC=3# Features per channelSHOW_PCS=False# show principal components# Options for maskingUSE_FLOAT_MASKS=TrueUSE_INTERPOLATION=TrueADDITIONAL_FLOAT_PENUMBRA=2# adds some more penumbraFLOAT_MASK_THRESH_SD=(2,4.5)# (min, max), mask 0 at min, 1 at max for penumbral featuresFLOAT_MASK_INTERPOLATION='x'# f(x) for x in [0,1], f(0)=0, f(1)=1
Quick Start Guide for electrophysiologists (will become more comprehensive with time):
0) Installation
We recommend you use Python 2.6 or 2.7, e.g. a free academic version can be obtained from Enthought Python.
Once you have set up Python on your system, go to the SpiKeDeteKt folder and type (on the command line):
This will install SpiKeDeteKt.
1) Probefiles:
Below are the instructions for a multi-shank probe (I hope this is clear from my example probe - otherwise do ask):
Construct a probe object from a .probe file with:
probe = Probe(filename)
The file should have a form something like:
The file is a Python file which should define a dictionary variable probes,
with keys the shank number, and values a list of channel pairs defining the
edges of the graph.
The Probe object has the following attributes:
num_channels
The number of channels used (1+the maximum channel number referred to)
channel_graph
A dictionary with keys the shank number, and values being graphs. A graph being a dictionary with keys the nodes (channel number) and values the set of all connected nodes. (So each channel in an edge is referred to twice in this data structure.)
shanks_set
The set of shank numbers
channel_set
A dictionary with keys the shank numbers, and values the
set of channels for that shank
channel_to_shank
A dictionary with keys the channel numbers and values the corresponding shank number.
probes
The raw probes dictionary definition in the file.
I have included some examples of probe files:
2) Parameters to adjust
Please alter the following two lines in your parameters.py file (I have included the file example_parameters.py)
The higher your sampling rate, the higher you should set these two (maintain the ratio of 10:1, it seems good). Set CHUNK_SIZE = sampling rate.
The default parameters are as follows (change as desired):
3) Running
Finally to run the program type:
If you don't have an .xml file with the necessary parameters, it will ask for the number of channels and the sampling rate and then commence.
4) Output
SpiKeDeteKt will output the following files, where n is your shank number:
.fet.n (feature file - required for all versions of KlustaKwik)
.mask.n (needed for using the new (masked) KlustaKwik)
.clu.n (a trivial clue file where everything is put into a single cluster, enabling the user to peruse the data using Klusters if desired)
.fmask.n (trial - float masks instead of binary, we are using this for testing masked KlustaKwik)
.spk.n (spike file)
.upsk.n (unfiltered spike waveform)
.res.n (list of spike times)
.xml (an xml file with all the parameters that can subsequently be used by neuroscope or klusters)
.fil (highpass filtered data)
.h5 (an .h5 file duplicating a lot of the above data, which may later be eliminated). It contains:
Last edit: Shabnam N Kadir 2012-11-01