Skip to content

Commit

Permalink
Cleaning imports. Need to test with mac
Browse files Browse the repository at this point in the history
  • Loading branch information
yger committed Nov 22, 2024
1 parent 5a983ab commit 9cc1673
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/spikeinterface/sortingcomponents/clustering/circus.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from spikeinterface.core.waveform_tools import estimate_templates
from .clustering_tools import remove_duplicates_via_matching
from spikeinterface.core.recording_tools import get_noise_levels, get_channel_distances
from spikeinterface.core.job_tools import fix_job_kwargs
from spikeinterface.sortingcomponents.peak_selection import select_peaks
from spikeinterface.sortingcomponents.waveforms.temporal_pca import TemporalPCAProjection
from spikeinterface.core.template import Templates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from spikeinterface.core.basesorting import minimum_spike_dtype
from spikeinterface.core.waveform_tools import estimate_templates
from .clustering_tools import remove_duplicates_via_matching
from spikeinterface.core.recording_tools import get_noise_levels, get_channel_distances
from spikeinterface.core.recording_tools import get_noise_levels
from spikeinterface.sortingcomponents.waveforms.savgol_denoiser import SavGolDenoiser
from spikeinterface.sortingcomponents.features_from_peaks import RandomProjectionsFeature
from spikeinterface.core.template import Templates
Expand Down Expand Up @@ -144,7 +144,7 @@ def main_function(cls, recording, peaks, params, job_kwargs=dict()):
is_scaled=False,
)
if params["noise_levels"] is None:
params["noise_levels"] = get_noise_levels(recording, return_scaled=False)
params["noise_levels"] = get_noise_levels(recording, return_scaled=False, **job_kwargs)
sparsity = compute_sparsity(templates, params["noise_levels"], **params["sparsity"])
templates = templates.to_sparse(sparsity)
templates = remove_empty_templates(templates)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
get_random_data_chunks,
extract_waveforms_to_buffers,
)
from .clustering_tools import auto_clean_clustering, auto_split_clustering
from .clustering_tools import auto_clean_clustering


class SlidingHdbscanClustering:
Expand Down
9 changes: 2 additions & 7 deletions src/spikeinterface/sortingcomponents/clustering/tdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,22 @@

from spikeinterface.core import (
get_channel_distances,
Templates,
compute_sparsity,
get_global_tmp_folder,
)

from spikeinterface.core.node_pipeline import (
run_node_pipeline,
ExtractDenseWaveforms,
ExtractSparseWaveforms,
PeakRetriever,
)

from spikeinterface.sortingcomponents.tools import extract_waveform_at_max_channel, cache_preprocessing
from spikeinterface.sortingcomponents.peak_detection import detect_peaks, DetectPeakLocallyExclusive
from spikeinterface.sortingcomponents.tools import extract_waveform_at_max_channel
from spikeinterface.sortingcomponents.peak_selection import select_peaks
from spikeinterface.sortingcomponents.peak_localization import LocalizeCenterOfMass, LocalizeGridConvolution
from spikeinterface.sortingcomponents.waveforms.temporal_pca import TemporalPCAProjection

from spikeinterface.sortingcomponents.clustering.split import split_clusters
from spikeinterface.sortingcomponents.clustering.merge import merge_clusters
from spikeinterface.sortingcomponents.clustering.tools import compute_template_from_sparse



class TdcClustering:
Expand Down

0 comments on commit 9cc1673

Please sign in to comment.