You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a lot of code that relied on the nan behavior, even though it apparently only affected the mean combination, so this was a major behavior change from my side.
I recommend we make the blank pixel value explicit and user-specifiable. I have a commit that suggests that, but I'm experiencing network issues, so I'll just paste the diff here:
---a/reproject/mosaicking/coadd.py+++b/reproject/mosaicking/coadd.py@@ -26,6+26,7 @@ defreproject_and_coadd(output_footprint=None,block_sizes=None,progressbar=False,+blank_pixel_value=np.nan,**kwargs, ): """
@@ -337,7+338,7 @@ defreproject_and_coadd(
ifcombine_function=="mean":
withnp.errstate(invalid="ignore"):
output_array/=output_footprint-output_array[output_footprint==0] =0+output_array[output_footprint==0] =blank_pixel_valueelifcombine_functionin ("first", "last", "min", "max"):
ifmatch_background:
@@ -369,7+370,6 @@ defreproject_and_coadd(
# this is redundant, but left as a note-to-devs about where such an implementation belongsraiseNotImplementedError("combine_function='median' is not yet implemented")
-ifcombine_functionin ("min", "max"):
-output_array[output_footprint==0] =0.0+output_array[output_footprint==0] =blank_pixel_value
The text was updated successfully, but these errors were encountered:
Before #413, pixels that were not covered by the footprint were set to nan, and they are now set to zero.
31c4205
I have a lot of code that relied on the nan behavior, even though it apparently only affected the mean combination, so this was a major behavior change from my side.
I recommend we make the blank pixel value explicit and user-specifiable. I have a commit that suggests that, but I'm experiencing network issues, so I'll just paste the diff here:
The text was updated successfully, but these errors were encountered: