Closed svank closed 9 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
f9bcc9e
) 93.60% compared to head (31c4205
) 93.60%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I noticed that, when using
reproject_and_coadd
with background matching and withcombine_function='first'
, a bounding box around some of the input images can be filled, so that outputs look like this: instead of this:This happens because output pixels not covered by a given input image are set to zero after that image is reprojected, and those zero values get adjusted by the background matching. For the other
combine_function
options, those out-of-bounds pixels never get used, so their final value doesn't matter, but that wasn't the case forcombine_function='first'
, which this PR rectifies.While adding a test that works through the options and ensures the final output mosaics are zero outside the returned footprint and filled-in inside the footprint, I noticed an inconsistency in that all the
combine_function
s produce zeros for pixels not spanned by any input image, except forcombine_function='mean'
, which outputsnan
s for those unsampled pixels (generated when dividing by sum-of-weight values of zero). This PR also changes thosenan
s to0
, to ensuremean
is consistent with the other modes.