numba accelerated special functions#942
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #942 +/- ##
==========================================
+ Coverage 72.62% 72.65% +0.03%
==========================================
Files 142 143 +1
Lines 21940 22083 +143
==========================================
+ Hits 15933 16045 +112
- Misses 6007 6038 +31 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ecial functions Also remove unused constants and include more tests for wofz and exp1 functions. We also must enable numba JIT coverage instead of disabling numba JIT now.
The numba flag that uploads coverage info for compiled functions only works for Python3.11. It should get fixed upstream sometime. Until then, there's no issue with just using Python3.11 for code coverage measurements. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
We need to seed the tests for reproducible behavior. In theory, the tests should always pass, but seeding removes any flakiness. We also removed an unused import. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
This is completely necessary for exp1exp to work correctly. This commit also removes the unnecessary threshold changes. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
psavery
approved these changes
Jun 8, 2026
psavery
left a comment
Collaborator
There was a problem hiding this comment.
Made a few minor fixes. LGTM
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.
a few of the functions such as
exp1implemented previously were not correct for complex arguments. The latest implementation fixes that.Also included is a new special function
wofzwhich implements the Faddeeva function for complex arguments.Both these are needed for the new peak shapes to deal with x-ray induced heating experiments.
The PR removes some unused constants in the
herd.core.constantsand moves all the special function implementation tohexrd.core.fitting.special. The paths inhexrd.powder.wppf.peakfunctionsandhexed.core.fitting.peakfunctionshave been updated to reflect this move.Also added tests for these new functions by comparing them to
spicy.special.