Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
98de1f9
template metrics from bombcell - use scipy findpeaks() to detect peak…
Julie-Fabre Jan 7, 2026
71d35a4
template denoising - SVD option and bombcell baseline flatness metric
Julie-Fabre Jan 7, 2026
788e8be
woops remove kilosort4_output folder
Julie-Fabre Jan 7, 2026
4b79f55
woops remove kilosort4_output folder
Julie-Fabre Jan 7, 2026
b391456
remove SVD option - was not performing well - and add sane tested def…
Julie-Fabre Jan 7, 2026
c9306df
bombcell unit type classification logic and output plots - waveform o…
Julie-Fabre Jan 7, 2026
44d8192
bombcell unit type classification logic and output plots - waveform o…
Julie-Fabre Jan 7, 2026
a29d3e1
bombcell snr
Julie-Fabre Jan 7, 2026
4514a51
fix: use peak_valley code to get duration, rename to peak_to_trough_d…
Julie-Fabre Jan 7, 2026
5b4cafb
upset plots
Julie-Fabre Jan 8, 2026
515ed36
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 8, 2026
8467177
cleanup
Julie-Fabre Jan 8, 2026
41fde99
Merge branch 'bombcell' of https://github.com/Julie-Fabre/spikeinterf…
Julie-Fabre Jan 8, 2026
2e8d6ea
cleanup
Julie-Fabre Jan 8, 2026
ed770bb
cleanup
Julie-Fabre Jan 8, 2026
c81898f
cleanup old template metric functions and ensure backward compaiblity…
Julie-Fabre Jan 8, 2026
71063dc
move bombcell functions to curation and rename bombcell ones to bombc…
Julie-Fabre Jan 8, 2026
5a2416e
remove upset plot warnings for now
Julie-Fabre Jan 8, 2026
afe4e1b
bombcell plot wrapper
Julie-Fabre Jan 8, 2026
6fb5b13
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 8, 2026
52a58b2
users can input bombcell parameters as JSON
Julie-Fabre Jan 8, 2026
103ba7a
Merge branch 'bombcell' of https://github.com/Julie-Fabre/spikeinterf…
Julie-Fabre Jan 8, 2026
aa35ac8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 8, 2026
eb130e9
optionally save plots and metrics, explicit inputs to functions to ha…
Julie-Fabre Jan 8, 2026
3b609b5
Merge branch 'bombcell' of https://github.com/Julie-Fabre/spikeinterf…
Julie-Fabre Jan 8, 2026
01480b3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 8, 2026
af36259
example jupyter notebook
Julie-Fabre Jan 8, 2026
7045c43
example jupyter notebook
Julie-Fabre Jan 8, 2026
91a333e
Merge branch 'bombcell' of https://github.com/Julie-Fabre/spikeinterf…
Julie-Fabre Jan 8, 2026
adac68e
labelling -> labeling and unit_labeling.py -> bombcell_curation.py
Julie-Fabre Jan 18, 2026
291bca4
WAVEFORM_METRICS -> NOISE_METRICS
Julie-Fabre Jan 18, 2026
6b21830
use sorting analyzer rather than inputing template_metrics and qualty…
Julie-Fabre Jan 18, 2026
8673ebc
remove unused apply_thresholds() function
Julie-Fabre Jan 18, 2026
e55cde7
get_labeling_summary -> get_bombcell_labeling_summary
Julie-Fabre Jan 18, 2026
b04ff26
Removed save_thresholds and load_thresholds. can now use standard jso…
Julie-Fabre Jan 18, 2026
5383728
get_labeling_results -> get_bombcell_results
Julie-Fabre Jan 18, 2026
7491a6a
woops, that was tracked and committed too early - reverting
Julie-Fabre Jan 18, 2026
3b1d819
removed debugging plots
Julie-Fabre Jan 18, 2026
02c9a53
imports to individual functions
Julie-Fabre Jan 18, 2026
96d8bb6
remove more debugging plots
Julie-Fabre Jan 18, 2026
0e7fb40
rename waveform_duration
Julie-Fabre Jan 18, 2026
a5ab4a6
more combine -> sorting_analyzer
Julie-Fabre Jan 18, 2026
a345e42
converted all durations (and defualt thresholds) to seconds
Julie-Fabre Jan 18, 2026
1b18775
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 18, 2026
e596493
Use external metrics and remove json
alejoe91 Jan 21, 2026
90b5a51
clean up imports
alejoe91 Jan 21, 2026
7d4747d
Add polarity inversion for old peak to trough
alejoe91 Jan 21, 2026
81dc7d6
ported general label widhet to unit labels and backward comp for unit…
alejoe91 Jan 21, 2026
702f5c7
labels to lower case
alejoe91 Jan 22, 2026
2983204
Use peak_sign='both' as default for SNR
alejoe91 Jan 22, 2026
bbab79a
Merge conflicts and use SNR in bombcell by default
alejoe91 Jan 22, 2026
2d8c126
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 22, 2026
7e8e644
Lazy import of pandas and basic tests
alejoe91 Jan 22, 2026
241a6cb
Merge branch 'bombcell' of github.com:Julie-Fabre/spikeinterface into…
alejoe91 Jan 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/how_to/import_kilosort_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ If you'd like to store the information you've computed, you can save the analyze
)

You now have a fully functional ``SortingAnalyzer`` - congrats! You can now use `spikeinterface-gui <https://github.com/SpikeInterface/spikeinterface-gui/>`__. to view the results
interactively, or start manually labelling your units to `create an automated curation model <https://spikeinterface.readthedocs.io/en/stable/tutorials_custom_index.html#automated-curation-tutorials>`__.
interactively, or start manually labeling your units to `create an automated curation model <https://spikeinterface.readthedocs.io/en/stable/tutorials_custom_index.html#automated-curation-tutorials>`__.

Note that if you have access to the raw recording, you can attach it to the analyzer, and re-compute extensions from the raw data. E.g.

Expand Down
2 changes: 1 addition & 1 deletion src/spikeinterface/comparison/comparisontools.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ def make_hungarian_match(agreement_scores, min_score):

def do_score_labels(sorting1, sorting2, delta_frames, unit_map12, label_misclassification=False):
"""
Makes the labelling at spike level for each spike train:
Makes the labeling at spike level for each spike train:
* TP: true positive
* CL: classification error
* FN: False negative
Expand Down
39 changes: 39 additions & 0 deletions src/spikeinterface/core/analyzer_extension_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,38 @@ def get_optional_dependencies(cls, **params):
depend_on = list(cls.depend_on) + list(metric_depend_on)
return depend_on

def get_computed_metric_names(self):
"""
Get the list of already computed metric names.

Returns
-------
computed_metric_names : list[str]
List of computed metric names.
"""
if self.data is None or len(self.data) == 0:
return []
else:
computed_metric_columns = self.data["metrics"].columns.tolist()
computed_metric_names = []
for m in self.metric_list:
if all(col in computed_metric_columns for col in m.metric_columns.keys()):
computed_metric_names.append(m.metric_name)
return computed_metric_names

def _cast_metrics(self, metrics_df):
metric_dtypes = {}
for m in self.metric_list:
metric_dtypes.update(m.metric_columns)

for col in metrics_df.columns:
if col in metric_dtypes:
try:
metrics_df[col] = metrics_df[col].astype(metric_dtypes[col])
except Exception as e:
print(f"Error casting column {col}: {e}")
return metrics_df

def _set_params(
self,
metric_names: list[str] | None = None,
Expand Down Expand Up @@ -1155,6 +1187,13 @@ def _compute_metrics(
metric = [m for m in self.metric_list if m.metric_name == metric_name][0]
column_names_dtypes.update(metric.metric_columns)

# drop metric that don't map to any metric names
possible_metric_names = [m.metric_name for m in self.metric_list]
wrong_metric_names = [m for m in metric_names if m not in possible_metric_names]
if len(wrong_metric_names) > 0:
warnings.warn(f"The following metric names are not recognized and will be ignored: {wrong_metric_names}")
metric_names = [m for m in metric_names if m in possible_metric_names]

metrics = pd.DataFrame(index=unit_ids, columns=list(column_names_dtypes.keys()))

run_times = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def test_aggregation_labeling_for_lists():
assert np.all(user_group_property == [6, 6, 7, 7])


def test_aggretion_labelling_for_dicts():
def test_aggretion_labeling_for_dicts():
"""Aggregated dicts of recordings get different labels depending on their underlying `property`s"""

recording1 = generate_recording(num_channels=4, durations=[20], set_probe=False)
Expand Down
7 changes: 7 additions & 0 deletions src/spikeinterface/curation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,12 @@
from .sortingview_curation import apply_sortingview_curation

# automated curation
from .bombcell_curation import (
bombcell_get_default_thresholds,
bombcell_label_units,
get_bombcell_labeling_summary,
save_bombcell_results,
)

from .model_based_curation import auto_label_units, load_model
from .train_manual_curation import train_model, get_default_classifier_search_spaces
Loading
Loading