Skip to content

Remove noise_levels and templates from quality metric deps #4080

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

chrishalcrow
Copy link
Member

At the moment, the quality_metrics extension requires noise_levels and templates to be computed before we can compute quality metrics. However,

  1. Only sd_ratio depends on templates.
  2. Only snr depends on noise_levels.
  3. Other metrics depend on other extensions.

So these requirements are a bit over the top. This PR moves the extension existence check to the compute_metric functions, and adds a nice function _has_required_extensions which deals with the error message. Does not work for the amplitude metrics, since they can use spike_amplitudes or amplitude_scalings.

Now, the quality metrics extension has no dependencies, and will compute some spike-train related metrics if you give it an extension-less analyzer.

We had discussed introducing a UnitMetric class or something. I think this is simpler for now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant