Skip to content

Change max/min keywords in threshold_metrics_label_units to greater/less #4414

@ecobost

Description

@ecobost

Current implementation:

thresholds = {'presence_ratio': {'min': 0.9}, # some places say this threshold is 0.8 but official documentation says 0.9
              'isi_violations_ratio': {'max': 0.5},
              'amplitude_cutoff': {'max': 0.1}
             }
aind_labels = sc.threshold_metrics_label_units(metrics, thresholds, column_name='aind_label')

I don't know if it's just me but thinking about 'max' or 'min' requires some mental gymnastics and I have to keep double checking. Why not use 'greater'/'less'? E.g.,

thresholds = {'presence_ratio': {'greater': 0.9},
              'isi_violations_ratio': {'less': 0.5},
              'amplitude_cutoff': {'less': 0.1}
             }

it reads nicely and It's early enough that a change would not require backwards-compatibility with max/min (only perhaps changing docs & examples).

Metadata

Metadata

Assignees

No one assigned

    Labels

    curationRelated to curation module

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions