dspk detect
Detect spikes in a whole recording and write them as a sorting (one unit per channel)
dspk detect [OPTIONS] --output <OUTPUT> <RECORDING>Arguments
<RECORDING>
Recording (SpikeGLX .bin / .cbin, raw .bin + JSON .meta, NWB, Zarr)
Options
--source <SOURCE>
Source within the file (an iddspk-cli openlists); default: the largest electrical one--probe <PROBE>: one ofneuropixels1,neuropixels2,tetrode,utah,hdemg4x8,hdemg8x8
Probe preset; default: the geometry the recording carries (SpikeGLX), else an error--probe-file <PROBE_FILE>
Probe file (.json: probeinterface or Kilosort 4) saying which channel each contact is wired to: the data is read in contact order (unconnected contacts left out), with its geometry--channel-map <CHANNEL_MAP>
Channel map (.toml / .json, pairs underremap) applied after the probe: channels reordered, dropped, renamed; the geometry follows them--pitch-um <PITCH_UM>: default8000
Electrode pitch of HD-EMG grid presets (µm)--start-sec <START_SEC>: default0
Start of the part to process (s)--duration-sec <DURATION_SEC>
Length of the part to process (s); default: to the end-o, --output <OUTPUT>
Output folder or store--format <FORMAT>
Output format; default: from the name (.nwb.zarr→ nwb, other.zarr→ zarr, else phy)phy: Phy / Kilosort folder (.npyarrays,.tsvtables)zarr: dspk.sorting.zarrstorenwb: NWB/unitstable in a.nwb.zarrstore
--car <CAR>: defaulttrue, one oftrue,false
Common average reference before filtering--band-low-hz <BAND_LOW_HZ>: default300
Band-pass low edge (Hz)--band-high-hz <BAND_HIGH_HZ>: default5000
Band-pass high edge (Hz); must be below Nyquist--threshold <THRESHOLD>: default5
Threshold in multiples of each channel’s noise σ (MAD)--refractory-ms <REFRACTORY_MS>: default1
Smallest interval between two spikes on a channel (ms)--polarity <POLARITY>: defaultnegative, one ofnegative,positive,both
Which extrema are spikes--spacing <SPACING>
Which of two nearer crossings stayslocally-exclusive: A crossing stays unless a larger one is nearer (streaming equals whole-recording detection)scipy: Asscipy.signal.find_peaks(distance=…)(may differ at batch edges)
--radius-um <RADIUS_UM>: default150
Crossings within this radius (and the refractory window) are one spike (µm)--k-neighbors <K_NEIGHBORS>: default4
Channels per waveform snippet (the primary and its nearest)--pre-ms <PRE_MS>: default1
Snippet window before the trough (ms)--post-ms <POST_MS>: default2
Snippet window after the trough (ms)--sinc-shift <SINC_SHIFT>: defaulttrue, one oftrue,false
Realign snippets to the sub-sample trough--locate <LOCATE>: defaulttrue, one oftrue,false
Locate every spike (centre of mass of its snippet’s heights over its neighbours)--batch-sec <BATCH_SEC>: default10
Length of each processing window (s); memory only, not results--calibration-sec <CALIBRATION_SEC>: default5
Total length of the noise calibration (s)--calibration-chunks <CALIBRATION_CHUNKS>: default5
Chunks the noise calibration is spread over