Change default settings
Although default settings in DANT are designed to work well for most datasets, you may want to change some of them to get better tracking results. Some researchers may also want to avoid the usage of PETH features in clustering. You can speicify all these things in the settings.json file.
Here is a list of all the parameters in the settings.json file and when to change them:
path_to_data
The path to the spikeInfo.mat file.
output_folder
The path to the output folder where DANT will save the results. If the folder does not exist, DANT will create it.
save_intermediate_results
Default: false
Whether to save the intermediate results. If set to true, DANT will save the intermediate results in the output folder. This can be useful for debugging or for further analysis.
centering_waveforms
Default: false
Whether to center the waveforms before processing. DANT assumes that the waveforms are already aligned. If set to true, the waveforms will be centered to the trough of the waveform according to the peak channel. Waveforms generated by Kilosort may not be centered and the uncentered waveforms can impair the waveform similarity. It is recommended to center the waveforms before entering DANT to avoid “cropping” the waveforms. See Center waveforms for more details.
spikeLocation
location_algorithm
Default: monopolar_triangulation
The algorithm used to estimate the location of each unit. You can choose from monopolar_triangulation or center_of_mass. The former is recommended for most datasets.
n_nearest_channels
Default: 20
The number of channels nearest to the peak channel (the channel with maximum amplitude) used for spike location estimation. The default value works well with classical Neuropixels 1.0 and Neuropixels 2.0 channel map. Although Neuropixels 2.0 has a denser channel distribution along the shank, it doesn’t make much difference to the result.
waveformCorrection
n_nearest_channels
Default: 38
The number of channels used for computing pairwise waveform similarity. The default value works well with classical Neuropixels 1.0 and Neuropixels 2.0 channel map. If you want to change the value, 4*k+2 is recommended (k is an integer) to ensure the symmetry of the channel set. See Waveform similarity for more details.
linear_correction
Default: false
Whether to use linear correction for motion estimation. Rigid motion correction is done by default, which is sufficient for most datasets. The non-rigid motion correction can be useful in longer recordings with large probe motion. But it sometimes leads to overfitting and unstable results. Please refer to the Non-rigid correction section for more details.
waveform_similarity
n_templates
Default: 1
The number of templates (reference probes) used for waveform correction. Should be 1 or 2. If set to 1, the template is set at the mean of motion; if set to 2, two templates are set on the top and bottom of the probes. If set to 2, the waveform correction and waveform similarity calculation will be done twice, which is more accurate but slower. It recommended to use 2 for datasets with large probe motion and many units located at the edges of the probe. See Waveform correction for more details about this parameter.
path_to_motion
Default: ""
The path to a pre-computed motion .npy file (vector sized by number of sessions, e.g., estimated by DREDge). If empty, motion will be estimated from the data. This parameter can be useful if you have already estimated the motion using other methods and want to apply it directly in DANT. See Waveform correction for more details.
autocorr
window
Default: 300
The window size (in ms) for the autocorrelogram with a bin width of 1 ms.
binwidth
Default: 1
The bin width (in ms) for the autocorrelogram.
gaussian_sigma
Default: 5
The standard deviation (in ms) of the Gaussian kernel used for smoothing the autocorrelogram.
ISI
window
Default: 100
The window size (in ms) for the inter-spike interval (ISI) histogram.
binwidth
Default: 1
The bin width (in ms) for the ISI histogram.
gaussian_sigma
Default: 1
The standard deviation (in ms) of the Gaussian kernel used for smoothing the ISI histogram.
motionEstimation
features
Default:
[
["Waveform", "AutoCorr", "PETH"],
["Waveform", "AutoCorr", "PETH"]
]
The features used for motion estimation each iteration. For the default values, the motion esimation will be done twice, with the same three features. The features should be chosen from “Waveform”, “AutoCorr”, “ISI” or “PETH”. In some datasets with huge probe motion (> 100 μm), the waveform feature may not be reliable, and you can use “AutoCorr” and “PETH” for the first iteration.
clustering
max_distance
Default: 100
The maximum distance (in μm) between unit pairs in the Y direction for weight optimization. To include the unmatched unit pairs that are most likely to be “confused” with the matched pairs, only close-by unit unmatched pairs are used in LDA. Note that changes to this parameter will influence the optimized weights and clustering results. Typically, increasing this value will lead to larger weight for the waveform feature. As other features are independent of this parameter, increasing this value will include more distant unmatched pairs and thus emphasize the waveform feature more.
features
Default: ["Waveform", "AutoCorr", "PETH"]
The features used for clustering. The features should be chosen from “Waveform”, “AutoCorr”, “ISI” or “PETH”. If you want to use only the waveform feature, you can set it to ["Waveform"]. If you want to use only the autocorrelogram feature, you can set it to ["AutoCorr"]. If you want to use only the ISI feature, you can set it to ["ISI"]. If you want to use only the PETH feature, you can set it to ["PETH"].
n_iter
Default: 10
The number of iterations for the iterative clustering algorithm. The algorithm usually converges well within 6 iterations. As HDBSCAN runs very fast, the default value of 10 is set to ensure the convergence while not slowing down the process too much.
autoCuration
auto_split
Default: true
Whether to split the clusters automatically. Please refer to the Auto curation section for more details.