Skip to content

Commit

Permalink
Verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
yger committed Jan 15, 2025
1 parent beb8f23 commit eacaa0b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/spikeinterface/sorters/internal/spyking_circus2.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ def _run_from_folder(cls, sorter_output_folder, params, verbose):
)
peaks = detect_peaks(recording_w, "locally_exclusive", **detection_params, **job_kwargs)

if verbose:
print("We found %d peaks in total" % len(peaks))
if not skip_peaks and verbose:
print("Found %d peaks in total" % len(peaks))

if params["multi_units_only"]:
sorting = NumpySorting.from_peaks(peaks, sampling_frequency, unit_ids=recording_w.unit_ids)
Expand All @@ -249,7 +249,7 @@ def _run_from_folder(cls, sorter_output_folder, params, verbose):
selected_peaks = select_peaks(peaks, **selection_params)

if verbose:
print("We kept %d peaks for clustering" % len(selected_peaks))
print("Kept %d peaks for clustering" % len(selected_peaks))

## We launch a clustering (using hdbscan) relying on positions and features extracted on
## the fly from the snippets
Expand Down Expand Up @@ -334,7 +334,7 @@ def _run_from_folder(cls, sorter_output_folder, params, verbose):
np.save(fitting_folder / "spikes", spikes)

if verbose:
print("We found %d spikes" % len(spikes))
print("Found %d spikes" % len(spikes))

## And this is it! We have a spyking circus
sorting = np.zeros(spikes.size, dtype=minimum_spike_dtype)
Expand Down Expand Up @@ -377,7 +377,7 @@ def _run_from_folder(cls, sorter_output_folder, params, verbose):
sorting = final_cleaning_circus(recording_w, sorting, templates, merging_params, **job_kwargs)

if verbose:
print(f"Final merging, keeping {len(sorting.unit_ids)} units")
print(f"Kept {len(sorting.unit_ids)} units after final merging")

folder_to_delete = None
cache_mode = params["cache_preprocessing"].get("mode", "memory")
Expand Down
4 changes: 2 additions & 2 deletions src/spikeinterface/sortingcomponents/clustering/circus.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def main_function(cls, recording, peaks, params, job_kwargs=dict()):
peak_labels[mask] = -1

if verbose:
print("We found %d raw clusters, starting to clean with matching..." % (len(templates.unit_ids)))
print("Found %d raw clusters, starting to clean with matching" % (len(templates.unit_ids)))

cleaning_job_kwargs = job_kwargs.copy()
cleaning_job_kwargs["progress_bar"] = False
Expand All @@ -292,6 +292,6 @@ def main_function(cls, recording, peaks, params, job_kwargs=dict()):
)

if verbose:
print("We kept %d non-duplicated clusters..." % len(labels))
print("Kept %d non-duplicated clusters" % len(labels))

return labels, peak_labels
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def main_function(cls, recording, peaks, params, job_kwargs=dict()):
peak_labels[mask] = -1

if verbose:
print("We found %d raw clusters, starting to clean with matching..." % (len(templates.unit_ids)))
print("Found %d raw clusters, starting to clean with matching" % (len(templates.unit_ids)))

cleaning_job_kwargs = job_kwargs.copy()
cleaning_job_kwargs["progress_bar"] = False
Expand All @@ -183,6 +183,6 @@ def main_function(cls, recording, peaks, params, job_kwargs=dict()):
)

if verbose:
print("We kept %d non-duplicated clusters..." % len(labels))
print("Kept %d non-duplicated clusters" % len(labels))

return labels, peak_labels

0 comments on commit eacaa0b

Please sign in to comment.