Closed michayesh closed 4 months ago
This behavior is now mentioned in the help of this function. In order to avoid it, populate the Mask of the primary image. Note that you typically have to do it using: imProc.mask.maskSaturated which you are supposed to run on the raw image prior to any reduction step.
Here is an example: Obj1 = AstroImage({ones(3,3)}); % empty mask Obj2 = AstroImage({ones(3,3)}); Obj2.Mask = uint32([0 0 0; 0 0 0; 1 1 1]); % mask for Obj2 res = funBinaryProp(Obj1, Obj2, @plus,'DataProp','MaskData','DataPropIn','Data');
ans =
Now if I run: Obj1 = AstroImage({ones(3,3)}); Obj1.Mask = uint32(zeros(3,3)); % mask for Obj1 Obj2 = AstroImage({ones(3,3)}); Obj2.Mask = uint32(rand(3,3)); % mask for Obj2 res = funBinaryProp(Obj1, Obj2, @plus,'DataProp','MaskData','DataPropIn','Data'); The mask is propagated into res:
3×3 uint32 matrix
0 0 0 0 0 0 1 1 1