Skip to content
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

GSF CubicInterpolation oscillation fix. #46

Merged
merged 2 commits into from
Nov 21, 2024
Merged

GSF CubicInterpolation oscillation fix. #46

merged 2 commits into from
Nov 21, 2024

Conversation

The-Ludwig
Copy link
Contributor

@pascalgutjahr noticed that in very rare cases, the GSF flux returns a close-to-zero negative value. It turned out this was due to the interpolation between the provided datapoints of the GSF model with scipy's CubicSpline.
As sugested here we switched to scipy's PchipInterpolator, which is monotone between the interpolated points and prevents the oscillations. It is still cubic.

The exact flux values changed a bit, so I had to recreate the test-values for GSF.

I added a test for this bug.

@The-Ludwig The-Ludwig requested a review from kjmeagher November 21, 2024 17:51
Copy link

Test Results

  6 files  ± 0    6 suites  ±0   2m 31s ⏱️ +8s
104 tests + 3  103 ✅ + 3  1 💤 ±0  0 ❌ ±0 
624 runs  +18  618 ✅ +18  6 💤 ±0  0 ❌ ±0 

Results for commit 4bc2756. ± Comparison against base commit ecb840d.

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (ecb840d) to head (4bc2756).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #46   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           12        12           
  Lines          799       799           
=========================================
  Hits           799       799           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@kjmeagher kjmeagher merged commit 23e4d3e into main Nov 21, 2024
12 checks passed
@kjmeagher kjmeagher deleted the gsf-spline-fix branch November 21, 2024 23:50
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.

2 participants