Skip to content

Commit

Permalink
Merge pull request #437 from lsst/tickets/SP-1776
Browse files Browse the repository at this point in the history
SP-1776 : interpret LF as cumulative and use appropriately
  • Loading branch information
rhiannonlynne authored Jan 13, 2025
2 parents f881cfa + e0c3b84 commit 15fcf12
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rubin_sim/maf/metrics/crowding_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ def _comp_crowd_error(mag_vector, lum_func, seeing, single_mag=None):
mag_uncert : `np.array` (N,)
Magnitude uncertainties.
"""
# Our saved luminosity functions are cumulative,
# so we must here convert to differential
lum_func = np.diff(lum_func)
mag_vector = mag_vector[1:]
lum_area_arcsec = 3600.0**2
lum_vector = 10 ** (-0.4 * mag_vector)
coeff = np.sqrt(np.pi / lum_area_arcsec) * seeing / 2.0
Expand Down

0 comments on commit 15fcf12

Please sign in to comment.