lsst / rubin_sim

Scheduler, survey strategy analysis, and other simulation tools for Rubin Observatory.
https://rubin-sim.lsst.io
GNU General Public License v3.0
41 stars 37 forks source link

Switched interp2d to RectBivariateSpline #386

Closed rjassef closed 9 months ago

rjassef commented 9 months ago

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.

codecov[bot] commented 9 months ago

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 :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.