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

After the initial clustering using DPCLUS, units with similar event waveforms (averaged raw spike waveforms from nearby sites) are merged if their correlation score exceeds P.maxWavCor. Since the probe drift changes the spike waveforms, averaged waveforms are computed at three depth ranges per unit using the center-of-mass positions. The spike position is computed by the center of mass (CoM) using the site positions and the peak spike amplitude at each site (spk_pos_()). Three depth ranges are set using 1/3, 2/3 quantiles as boundaries. Since each unit has three average waveforms, maximum correlation score is taken from the 3x3 correlation matrix for each unit pair. Time shift is applied between a pair of unit (P.spkRefrac_ms = 0.25 ms) to find the maximum cross-correlation value.

Clusters are merged with most similar cluster recursively.

Syntax

  • [S_clu, S0] = post_merge_(S_clu, P, fPostCluster)

Input

  • S_clu
  • P
  • fPostCluster: flag to call postCluster_() function. Defauult: 1. This function assigns the cluster membership

Output

  • S_clu: Cluster index S_clu.viClu gets updated, as well as cluster quality metrics, mean unit waveforms and waveform correlation matrix (S_clu.mrWavCor).
  • S0

Operations

Clone this wiki locally