diff --git a/src/spikeinterface/sorters/external/kilosort2.py b/src/spikeinterface/sorters/external/kilosort2.py index bdc0372789..0425ad5e53 100644 --- a/src/spikeinterface/sorters/external/kilosort2.py +++ b/src/spikeinterface/sorters/external/kilosort2.py @@ -37,6 +37,7 @@ class Kilosort2Sorter(KilosortBase, BaseSorter): "detect_threshold": 6, "projection_threshold": [10, 4], "preclust_threshold": 8, + "whiteningRange": 32, # samples of the template to use for whitening "spatial" dimension "momentum": [20.0, 400.0], "car": True, "minFR": 0.1, @@ -62,6 +63,7 @@ class Kilosort2Sorter(KilosortBase, BaseSorter): "detect_threshold": "Threshold for spike detection", "projection_threshold": "Threshold on projections", "preclust_threshold": "Threshold crossings for pre-clustering (in PCA projection space)", + "whiteningRange": "Number of channels to use for whitening each channel", "momentum": "Number of samples to average over (annealed from first to second value)", "car": "Enable or disable common reference", "minFR": "Minimum spike rate (Hz), if a cluster falls below this for too long it gets removed", @@ -199,7 +201,7 @@ def _get_specific_options(cls, ops, params): ops["NT"] = params[ "NT" ] # must be multiple of 32 + ntbuff. This is the batch size (try decreasing if out of memory). - ops["whiteningRange"] = 32.0 # number of channels to use for whitening each channel + ops["whiteningRange"] = params["whiteningRange"] # number of channels to use for whitening each channel ops["nSkipCov"] = 25.0 # compute whitening matrix from every N-th batch ops["nPCs"] = params["nPCs"] # how many PCs to project the spikes into ops["useRAM"] = 0.0 # not yet available diff --git a/src/spikeinterface/sorters/external/kilosort2_5.py b/src/spikeinterface/sorters/external/kilosort2_5.py index abde2ab324..b3d1718d59 100644 --- a/src/spikeinterface/sorters/external/kilosort2_5.py +++ b/src/spikeinterface/sorters/external/kilosort2_5.py @@ -41,6 +41,7 @@ class Kilosort2_5Sorter(KilosortBase, BaseSorter): "detect_threshold": 6, "projection_threshold": [10, 4], "preclust_threshold": 8, + "whiteningRange": 32.0, "momentum": [20.0, 400.0], "car": True, "minFR": 0.1, @@ -69,6 +70,7 @@ class Kilosort2_5Sorter(KilosortBase, BaseSorter): "detect_threshold": "Threshold for spike detection", "projection_threshold": "Threshold on projections", "preclust_threshold": "Threshold crossings for pre-clustering (in PCA projection space)", + "whiteningRange": "Number of channels to use for whitening each channel", "momentum": "Number of samples to average over (annealed from first to second value)", "car": "Enable or disable common reference", "minFR": "Minimum spike rate (Hz), if a cluster falls below this for too long it gets removed", @@ -220,7 +222,7 @@ def _get_specific_options(cls, ops, params): ops["NT"] = params[ "NT" ] # must be multiple of 32 + ntbuff. This is the batch size (try decreasing if out of memory). - ops["whiteningRange"] = 32.0 # number of channels to use for whitening each channel + ops["whiteningRange"] = params["whiteningRange"] # number of channels to use for whitening each channel ops["nSkipCov"] = 25.0 # compute whitening matrix from every N-th batch ops["nPCs"] = params["nPCs"] # how many PCs to project the spikes into ops["useRAM"] = 0.0 # not yet available diff --git a/src/spikeinterface/sorters/external/kilosort3.py b/src/spikeinterface/sorters/external/kilosort3.py index 3d2103ea66..f560fd7e1e 100644 --- a/src/spikeinterface/sorters/external/kilosort3.py +++ b/src/spikeinterface/sorters/external/kilosort3.py @@ -38,6 +38,7 @@ class Kilosort3Sorter(KilosortBase, BaseSorter): "detect_threshold": 6, "projection_threshold": [9, 9], "preclust_threshold": 8, + "whiteningRange": 32, "car": True, "minFR": 0.2, "minfr_goodchannels": 0.2, @@ -65,6 +66,7 @@ class Kilosort3Sorter(KilosortBase, BaseSorter): "detect_threshold": "Threshold for spike detection", "projection_threshold": "Threshold on projections", "preclust_threshold": "Threshold crossings for pre-clustering (in PCA projection space)", + "whiteningRange": "number of channels to use for whitening each channel", "car": "Enable or disable common reference", "minFR": "Minimum spike rate (Hz), if a cluster falls below this for too long it gets removed", "minfr_goodchannels": "Minimum firing rate on a 'good' channel", @@ -212,7 +214,7 @@ def _get_specific_options(cls, ops, params): ops["NT"] = params[ "NT" ] # must be multiple of 32 + ntbuff. This is the batch size (try decreasing if out of memory). - ops["whiteningRange"] = 32.0 # number of channels to use for whitening each channel + ops["whiteningRange"] = params["whiteningRange"] # number of channels to use for whitening each channel ops["nSkipCov"] = 25.0 # compute whitening matrix from every N-th batch ops["scaleproc"] = 200.0 # int16 scaling of whitened data ops["nPCs"] = params["nPCs"] # how many PCs to project the spikes into