Skip to content

Commit

Permalink
Switched interp2d to RectBivariateSpline
Browse files Browse the repository at this point in the history
  • Loading branch information
rjassef committed Jan 9, 2024
1 parent d3d7842 commit 61b1e87
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rubin_sim/maf/metrics/qso_number_counts_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ def __init__(
c_mz_data = np.cumsum(c_mz_data, axis=1)

# Create a 2D interpolation object for the long table.
self.nqso_cumulative = interpolate.interp2d(zs[:-1], mags[:-1], c_mz_data[:-1, :-1], kind="cubic")
#self.nqso_cumulative = interpolate.interp2d(zs[:-1], mags[:-1], #c_mz_data[:-1, :-1], kind="cubic")
self.nqso_cumulative_aux = interpolate.RectBivariateSpline(zs[:-1], mags[:-1], c_mz_data[:-1,:-1].T, kx=3, ky=3)

self.nqso_cumulative = lambda z_new, m_new: self.nqso_cumulative_aux(z_new,m_new).T[0]

super().__init__(
col=[m5_col, filter_col, "saturation_mag"],
Expand Down

0 comments on commit 61b1e87

Please sign in to comment.