22import json
33
44from spikeinterface .curation .tests .common import sorting_analyzer_for_curation
5- from spikeinterface .curation import qualitymetrics_label_units
5+ from spikeinterface .curation import threshold_metrics_label_units
66
77
8- def test_qualitymetrics_label_units (sorting_analyzer_for_curation ):
9- """Test the `qualitymetrics_label_units ` function."""
8+ def test_threshold_metrics_label_units (sorting_analyzer_for_curation ):
9+ """Test the `threshold_metrics_label_units ` function."""
1010 sorting_analyzer_for_curation .compute ("quality_metrics" )
1111
1212 thresholds = {
1313 "snr" : {"min" : 5.0 },
1414 "firing_rate" : {"min" : 0.1 , "max" : 20.0 },
1515 }
1616
17- labels = qualitymetrics_label_units (
17+ labels = threshold_metrics_label_units (
1818 sorting_analyzer_for_curation ,
1919 thresholds ,
2020 )
@@ -36,8 +36,8 @@ def test_qualitymetrics_label_units(sorting_analyzer_for_curation):
3636 assert labels .loc [unit_id , "label" ] == "noise"
3737
3838
39- def test_qualitymetrics_label_units_with_file (sorting_analyzer_for_curation , tmp_path ):
40- """Test the `qualitymetrics_label_units ` function with thresholds from a JSON file."""
39+ def test_threshold_metrics_label_units_with_file (sorting_analyzer_for_curation , tmp_path ):
40+ """Test the `threshold_metrics_label_units ` function with thresholds from a JSON file."""
4141 sorting_analyzer_for_curation .compute ("quality_metrics" )
4242
4343 thresholds = {
@@ -49,7 +49,7 @@ def test_qualitymetrics_label_units_with_file(sorting_analyzer_for_curation, tmp
4949 with open (thresholds_file , "w" ) as f :
5050 json .dump (thresholds , f )
5151
52- labels = qualitymetrics_label_units (
52+ labels = threshold_metrics_label_units (
5353 sorting_analyzer_for_curation ,
5454 thresholds_file ,
5555 )
0 commit comments