Skip to content

Commit

Permalink
Include change requested by @thalos23 in tickets/OPSIM-1048
Browse files Browse the repository at this point in the history
  • Loading branch information
rhiannonlynne committed Feb 2, 2024
1 parent 3424508 commit 21b1caa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rubin_sim/maf/metrics/crowding_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,13 @@ def run(self, data_slice, slice_point=None):
mag_vector = slice_point[f"starMapBins_{self.filtername}"][1:]
lum_func = slice_point[f"starLumFunc_{self.filtername}"]
# Magnitude uncertainty given crowding
# Use minimum here, however this may not be appropriate in all cases.
# (minimum makes value here match MagCrowding above, however
# the minimum seeing could also correlate with poor m5 values)
# Likely there should be some comparison between errors from crowding
# and errors from photometric noise that we're just not doing.
dmag_crowd = _comp_crowd_error(
mag_vector, lum_func, data_slice[self.seeing_col], single_mag=self.rmag
mag_vector, lum_func, min(data_slice[self.seeing_col]), single_mag=self.rmag
)
result = np.mean(dmag_crowd)
return result

0 comments on commit 21b1caa

Please sign in to comment.