Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
If you don't have numba installed and try to compute
sd_ratio
, like so:you get a tricky error message:
This is because
sd_ratio
uses_find_duplicated_spikes_keep_first_iterative
which needs numba.This PR checks for numba in
compute_sd_ratio
and gives a warning if it's not installed (I'd be mad if my pipeline crashed because of one quality metric):I also use the conveinence function
find_duplicated_spikes
instead of_find_duplicated_spikes_keep_first_iterative
, which would give a better error message if someone tried to use it.EDIT: Also fixed a couple of typos and remove some commented out code.
Another option: if there's no numba, use a different
find_duplicated_spikes
method. Unfortunately, the different methods are genuinely different algorithms and give different results. Hence this is not a good idea for reproducibility.