Add numba check to sd_ratio#3890
Merged
alejoe91 merged 1 commit intoMay 5, 2025
Merged
Conversation
alejoe91
reviewed
May 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_ratiouses_find_duplicated_spikes_keep_first_iterativewhich needs numba.This PR checks for numba in
compute_sd_ratioand 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_spikesinstead 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_spikesmethod. Unfortunately, the different methods are genuinely different algorithms and give different results. Hence this is not a good idea for reproducibility.