Skip to content

Change 'min'/'max' to 'greater'/'less' when defining thresholds for threshold_metrics_label_units#4416

Merged
alejoe91 merged 7 commits intoSpikeInterface:mainfrom
ecobost:greater_less
Mar 3, 2026
Merged

Change 'min'/'max' to 'greater'/'less' when defining thresholds for threshold_metrics_label_units#4416
alejoe91 merged 7 commits intoSpikeInterface:mainfrom
ecobost:greater_less

Conversation

@ecobost
Copy link
Contributor

@ecobost ecobost commented Feb 27, 2026

This closes #4414

I also added a check to make sure that only valid keys are accepted inside the threshold dictionaries. Currently (in main):

sc.threshold_metrics_label_units(metrics=pd.DataFrame({"m1": [0.5]}), thresholds={"m1": {'greater': 1}}) # -> noise (correct)
sc.threshold_metrics_label_units(metrics=pd.DataFrame({"m1": [0.5]}), thresholds={"m1": {'greatr': 1}}) # -> good (wrong)

in this PR the second line will raise ValueError

@ecobost ecobost changed the title Change 'min'/ Change 'min'/'max' to 'greater'/'less' when defining thresholds for threshold_metrics_label_units Feb 27, 2026
@alejoe91 alejoe91 added the curation Related to curation module label Mar 3, 2026
@alejoe91 alejoe91 merged commit 924020e into SpikeInterface:main Mar 3, 2026
17 of 18 checks passed
@ecobost ecobost deleted the greater_less branch March 3, 2026 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

curation Related to curation module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change max/min keywords in threshold_metrics_label_units to greater/less

2 participants