-
Notifications
You must be signed in to change notification settings - Fork 22
wav2spk_()
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.
- [tnWav_raw, tnWav_spk, trFet_spk,
miSite_spk
,viTime_spk
,vnAmp_spk
,vnThresh_site
,fGpu
] = wav2spk_(mnWav1
,vrWav_mean1
, P, viTime_spk, viSite_spk,mnWav1_pre
,mnWav1_post
)
-
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
- 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.
- fft_clean(): Perform adaptive notch filter in the frequency domain if P.[[fft_thresh] > 0.
- filt_car_(): Filter (P.vcFilter) and apply common average referencing (P.vcCommonRef).
- car_reject_(): Reject spike detection if average across sites exceeds certain threshold (P.blank_thresh).
-
detect_spikes_(): Detect spikes using a detection threshold (P.qqFactor).
- spikeDetectSingle_fast_(): Perform spike detection for each site using GPU (if P.fGpu==1)
- spikeMerge_(): Merge spikes detected at multiple neighboring sites using multiple CPU cores. P.spkRefrac_ms and P.maxDist_site_um parameters define the spatiotemporal limit. If larger spikes are detected within the limit, weaker spikes are removed.
- mn2tn_wav_(): Extract event waveforms from a list of specified site (viSite_spk) and time (viTime_spk)
- trWav2fet_(): Extract event features from the supplied spike waveforms (see P.vcFet)
Home
JRCLUST pipeline
Performance benchmark
Step-by-step tutorial
Video tutorials
Command line interface
Requirements and Installation
Tetrodes sorting
Command listing
Code listing
Function listing
Main GUI
Preview GUI
Probe GUI
Traces GUI
Manual GUI
PSTH view
Input and output files
Probe file
Batch file
Supported recording format
User configuration file
Combining multiple files
Generating trial files
Master struct (S0)
Parameters struct (P)
Cluster struct (S_clu)
Global variables
Variable naming convention