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

Switched interp2d to RectBivariateSpline #386

Merged
merged 2 commits into from
Jan 10, 2024
Merged

Conversation

rjassef
Copy link
Contributor

@rjassef rjassef commented Jan 9, 2024

The code used an interpolation scheme from a pre-calculated table to obtain the expected QSO number counts as a function of redshift and magnitude.

The original code used scipy.interpolate.interp2d with a cubic spline, but this routine is being deprecated. I have updated the code to instead use scipy.interpolate.RectBivariateSpline also with a cubic spline. Testing shows that the results are the same for a range of redshift and magnitudes between the two methods.

Copy link

codecov bot commented Jan 10, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (d3d7842) 55.33% compared to head (dd23b23) 55.33%.

Files Patch % Lines
rubin_sim/maf/metrics/qso_number_counts_metric.py 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #386      +/-   ##
==========================================
- Coverage   55.33%   55.33%   -0.01%     
==========================================
  Files         304      304              
  Lines       29608    29609       +1     
  Branches     4281     4282       +1     
==========================================
  Hits        16385    16385              
  Misses      12281    12281              
- Partials      942      943       +1     

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

@rhiannonlynne rhiannonlynne self-requested a review January 10, 2024 03:48
@rhiannonlynne rhiannonlynne merged commit 8ac0a23 into lsst:main Jan 10, 2024
5 of 9 checks passed
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