From 0435b08f9029a6a48875ba75cdaff0e96e1fa5fb Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Mon, 6 May 2024 16:20:53 +0200 Subject: [PATCH] Update KS4 parameters --- src/spikeinterface/sorters/external/kilosort4.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/spikeinterface/sorters/external/kilosort4.py b/src/spikeinterface/sorters/external/kilosort4.py index e454e575ca..5b830a152b 100644 --- a/src/spikeinterface/sorters/external/kilosort4.py +++ b/src/spikeinterface/sorters/external/kilosort4.py @@ -36,6 +36,7 @@ class Kilosort4Sorter(BaseSorter): "template_sizes": 5, "nearest_chans": 10, "nearest_templates": 100, + "max_channel_distance": None, "templates_from_data": True, "n_templates": 6, "n_pcs": 6, @@ -44,7 +45,8 @@ class Kilosort4Sorter(BaseSorter): "ccg_threshold": 0.25, "cluster_downsampling": 20, "cluster_pcs": 64, - "duplicate_spike_bins": 15, + "x_centers": None, + "duplicate_spike_bins": 7, "do_correction": True, "keep_good_only": False, "save_extra_kwargs": False, @@ -73,6 +75,7 @@ class Kilosort4Sorter(BaseSorter): "template_sizes": "Number of sizes for universal spike templates (multiples of the min_template_size). Default value: 5.", "nearest_chans": "Number of nearest channels to consider when finding local maxima during spike detection. Default value: 10.", "nearest_templates": "Number of nearest spike template locations to consider when finding local maxima during spike detection. Default value: 100.", + "max_channel_distance": "Templates farther away than this from their nearest channel will not be used. Also limits distance between compared channels during clustering. Default value: None.", "templates_from_data": "Indicates whether spike shapes used in universal templates should be estimated from the data or loaded from the predefined templates. Default value: True.", "n_templates": "Number of single-channel templates to use for the universal templates (only used if templates_from_data is True). Default value: 6.", "n_pcs": "Number of single-channel PCs to use for extracting spike features (only used if templates_from_data is True). Default value: 6.", @@ -81,6 +84,7 @@ class Kilosort4Sorter(BaseSorter): "ccg_threshold": "Fraction of refractory period violations that are allowed in the CCG compared to baseline; used to perform splits and merges. Default value: 0.25.", "cluster_downsampling": "Inverse fraction of nodes used as landmarks during clustering (can be 1, but that slows down the optimization). Default value: 20.", "cluster_pcs": "Maximum number of spatiotemporal PC features used for clustering. Default value: 64.", + "x_centers": "Number of x-positions to use when determining center points for template groupings. If None, this will be determined automatically by finding peaks in channel density. For 2D array type probes, we recommend specifying this so that centers are placed every few hundred microns.", "duplicate_spike_bins": "Number of bins for which subsequent spikes from the same cluster are assumed to be artifacts. A value of 0 disables this step. Default value: 15.", "keep_good_only": "If True only 'good' units are returned", "do_correction": "If True, drift correction is performed",