LSSTApplications  17.0+10,17.0+51,17.0+88,18.0.0+10,18.0.0+15,18.0.0+34,18.0.0+4,18.0.0+6,18.0.0-2-ge43143a+6,18.1.0-1-g0001055+2,18.1.0-1-g0896a44+10,18.1.0-1-g1349e88+9,18.1.0-1-g2505f39+7,18.1.0-1-g380d4d4+9,18.1.0-1-g5e4b7ea+2,18.1.0-1-g7e8fceb,18.1.0-1-g85f8cd4+7,18.1.0-1-g9a6769a+3,18.1.0-1-ga1a4c1a+6,18.1.0-1-gc037db8+2,18.1.0-1-gd55f500+3,18.1.0-1-ge10677a+7,18.1.0-10-g73b8679e+12,18.1.0-12-gf30922b,18.1.0-13-g451e75588,18.1.0-13-gbfe7f7f,18.1.0-2-g31c43f9+7,18.1.0-2-g9c63283+9,18.1.0-2-gdf0b915+9,18.1.0-2-gf03bb23+2,18.1.0-3-g52aa583+3,18.1.0-3-g8f4a2b1+1,18.1.0-3-g9cb968e+8,18.1.0-4-g7bbbad0,18.1.0-5-g510c42a+8,18.1.0-5-ga46117f,18.1.0-5-gaeab27e+9,18.1.0-6-gdda7f3e+11,18.1.0-8-g4084bf03+1,w.2019.34
LSSTDataManagementBasePackage
Classes | Functions
lsst.pipe.tasks.assembleCoadd Namespace Reference

Classes

class  AssembleCoaddConfig
 
class  AssembleCoaddDataIdContainer
 
class  AssembleCoaddTask
 
class  CompareWarpAssembleCoaddConfig
 
class  CompareWarpAssembleCoaddTask
 
class  SafeClipAssembleCoaddConfig
 
class  SafeClipAssembleCoaddTask
 

Functions

def countMaskFromFootprint (mask, footprint, bitmask, ignoreMask)
 

Function Documentation

◆ countMaskFromFootprint()

def lsst.pipe.tasks.assembleCoadd.countMaskFromFootprint (   mask,
  footprint,
  bitmask,
  ignoreMask 
)
Function to count the number of pixels with a specific mask in a
footprint.

Find the intersection of mask & footprint. Count all pixels in the mask
that are in the intersection that have bitmask set but do not have
ignoreMask set. Return the count.

Parameters
----------
mask : `lsst.afw.image.Mask`
    Mask to define intersection region by.
footprint : `lsst.afw.detection.Footprint`
    Footprint to define the intersection region by.
bitmask
    Specific mask that we wish to count the number of occurances of.
ignoreMask
    Pixels to not consider.

Returns
-------
result : `int`
    Count of number of pixels in footprint with specified mask.

Definition at line 1198 of file assembleCoadd.py.

1198 def countMaskFromFootprint(mask, footprint, bitmask, ignoreMask):
1199  """Function to count the number of pixels with a specific mask in a
1200  footprint.
1201 
1202  Find the intersection of mask & footprint. Count all pixels in the mask
1203  that are in the intersection that have bitmask set but do not have
1204  ignoreMask set. Return the count.
1205 
1206  Parameters
1207  ----------
1208  mask : `lsst.afw.image.Mask`
1209  Mask to define intersection region by.
1210  footprint : `lsst.afw.detection.Footprint`
1211  Footprint to define the intersection region by.
1212  bitmask
1213  Specific mask that we wish to count the number of occurances of.
1214  ignoreMask
1215  Pixels to not consider.
1216 
1217  Returns
1218  -------
1219  result : `int`
1220  Count of number of pixels in footprint with specified mask.
1221  """
1222  bbox = footprint.getBBox()
1223  bbox.clip(mask.getBBox(afwImage.PARENT))
1224  fp = afwImage.Mask(bbox)
1225  subMask = mask.Factory(mask, bbox, afwImage.PARENT)
1226  footprint.spans.setMask(fp, bitmask)
1227  return numpy.logical_and((subMask.getArray() & fp.getArray()) > 0,
1228  (subMask.getArray() & ignoreMask) == 0).sum()
1229 
1230 
Represent a 2-dimensional array of bitmask pixels.
Definition: Mask.h:77
def countMaskFromFootprint(mask, footprint, bitmask, ignoreMask)