Skip to content
jamesjun edited this page Dec 18, 2017 · 10 revisions

Performs filtering, common-average-referencing (CAR), spike detection, waveform and feature extraction for a given memory block of raw traces. This function is called by file2spk_(), which loads a recording file to RAM in multiple loading cycles permitted by an available system memory.

Spike waveforms are extracted (mn2tn_wav_()) which is centered at the peak site, and coincident weaker spikes are removed (spikeMerge_(). Features are extracted from given spike waveforms (trWav2Fet_()) according to the specified feature (P.vcFet). Default feature is P.vcFet='gpca' with P.nPcPerChan=1, which is recommended for high-density probes such as Neuropixels probes.

Syntax

Input

  • mnWav1: Raw recording traces (nSamples_load x nSites: int16)
  • vrWav_mean1: Averaged raw trace across all recording sites (unused, default: [])
  • P: Parameters struct (P)
  • viTime_spk: Optional spike peak timing, used for importing spiking data from previous sorting output (default: [])
  • viSite_spk: Optional spike center sites, used for importing spiking data from previous sorting output (default: [])
  • mnWav1_pre: Raw traces preceding the current block (mnWav1), used for edge-safe filtering operation
  • mnWav1_post: Raw traces following the current block (mnWav1), used for edge-safe filtering operation

Output

  • tnWav_raw: raw spike waveforms
  • tnWav_spk: filtered spike waveforms
  • trFet_spk: spike features
  • miSite_spk: sites centered at the (nPositions x nSpikes: int32)
  • viTime_spk: spike time
  • `vnAmp_spk: peak spike amplitude at the peak site
  • vnThresh_site: spike detection threshold per site (nSites x 1: int16)
  • fGpu: flag for GPU usage. 0 if GPU use is disabled or failed.

Operations performed

See also

file2spk_(), detect_()

Clone this wiki locally