LSSTApplications  16.0-10-g9d3e444,16.0-11-g09ed895+3,16.0-11-g12e47bd+6,16.0-12-g5c924a4+14,16.0-12-g71e5ef5+3,16.0-15-g7af1f30,16.0-15-gdd5ca33+2,16.0-16-gf0259e2+1,16.0-17-g5cf0468+7,16.0-18-ga4d4bcb+8,16.0-18-gcf94535+6,16.0-18-geff7d6b+3,16.0-19-g9d290d5+6,16.0-2-g0febb12+22,16.0-2-g9d5294e+73,16.0-2-ga8830df+7,16.0-21-gdae7b8c,16.0-23-g11577836,16.0-28-gfc9ea6c+13,16.0-29-g79c42fc,16.0-29-ge8801f9+6,16.0-3-ge00e371+41,16.0-4-g18f3627+17,16.0-4-g5f3a788+21,16.0-4-ga3eb747+11,16.0-4-gabf74b7+36,16.0-4-gb13d127+7,16.0-5-g27fb78a+14,16.0-5-g6a53317+41,16.0-5-gb3f8a4b+94,16.0-54-gbf35a124+1,16.0-6-g9321be7+5,16.0-6-gcbc7b31+51,16.0-6-gf49912c+37,16.0-75-gbf7a9a820,16.0-8-g21fd5fe+38,16.0-8-g3a9f023+24,16.0-8-gc11f1cf+4,16.0-9-gf3bc169+4,16.0-9-gf5c1f43+12,master-gc237143d49+1,w.2019.03
LSSTDataManagementBasePackage
Public Member Functions | Static Public Attributes | List of all members
lsst.coadd.chisquared.coadd.Coadd Class Reference
Inheritance diagram for lsst.coadd.chisquared.coadd.Coadd:
lsst.coadd.utils.coadd.Coadd

Public Member Functions

def __init__ (self, bbox, wcs, badMaskPlanes, logName="coadd.chisquared.Coadd")
 
def addExposure (self, exposure, weightFactor=1.0)
 
def fromConfig (cls, bbox, wcs, config, logName="coadd.utils.Coadd")
 
def getCoadd (self)
 
def getFilters (self)
 
def getBadPixelMask (self)
 
def getBBox (self)
 
def getWcs (self)
 
def getWeightMap (self)
 

Static Public Attributes

 ConfigClass = CoaddConfig
 

Detailed Description

Create a chi-squared coadd.

Parameters
----------
bbox : `lsst.afw.geom.Box2I`
    Bounding box of coadd Exposure with respect to parent:
    coadd dimensions = bbox.getDimensions(); xy0 = bbox.getMin()
wcs : `lsst.afw.geom.SkyWcs`
    WCS of coadd exposure
badMaskPlanes : `list` of `str`
    Mask planes to pay attention to when rejecting masked pixels.
    Specify as a collection of names.
    badMaskPlanes should always include "EDGE".
logName : `str`, optional
    Name by which messages are logged.

Definition at line 28 of file coadd.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.coadd.chisquared.coadd.Coadd.__init__ (   self,
  bbox,
  wcs,
  badMaskPlanes,
  logName = "coadd.chisquared.Coadd" 
)

Definition at line 46 of file coadd.py.

46  def __init__(self, bbox, wcs, badMaskPlanes, logName="coadd.chisquared.Coadd"):
47  coaddUtils.Coadd.__init__(self,
48  bbox=bbox,
49  wcs=wcs,
50  badMaskPlanes=badMaskPlanes,
51  logName=logName,
52  )
53 
def __init__(self, minimum, dataRange, Q)

Member Function Documentation

◆ addExposure()

def lsst.coadd.chisquared.coadd.Coadd.addExposure (   self,
  exposure,
  weightFactor = 1.0 
)
Add a an exposure to the coadd; it is assumed to have the same WCS
as the coadd

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Exposure to add to coadd; this must be:
    - background-subtracted or background-matched to the other images
      being coadded
    - psf-matched to the desired PSF model (optional)
    - warped to match the coadd
weightFactor : `float`
    weight with which to add exposure to coadd

Returns
-------
overlapBBox : `lsst.afw.geom.Box2I`
    Region of overlap between ``exposure`` and coadd in parent
    coordinates.
weight : `float`
    Weight with which ``exposure`` was added to coadd;
    weight = weightFactor for this kind of coadd.

Definition at line 54 of file coadd.py.

54  def addExposure(self, exposure, weightFactor=1.0):
55  """Add a an exposure to the coadd; it is assumed to have the same WCS
56  as the coadd
57 
58  Parameters
59  ----------
60  exposure : `lsst.afw.image.Exposure`
61  Exposure to add to coadd; this must be:
62  - background-subtracted or background-matched to the other images
63  being coadded
64  - psf-matched to the desired PSF model (optional)
65  - warped to match the coadd
66  weightFactor : `float`
67  weight with which to add exposure to coadd
68 
69  Returns
70  -------
71  overlapBBox : `lsst.afw.geom.Box2I`
72  Region of overlap between ``exposure`` and coadd in parent
73  coordinates.
74  weight : `float`
75  Weight with which ``exposure`` was added to coadd;
76  weight = weightFactor for this kind of coadd.
77  """
78  self._log.info("add exposure to coadd")
79 
80  # save filter info
81  filter = exposure.getFilter()
82  self._filterDict.setdefault(filter.getName(), filter)
83 
84  overlapBBox = addToCoadd(self._coadd.getMaskedImage(), self._weightMap,
85  exposure.getMaskedImage(), self._badPixelMask, weightFactor)
86 
87  return overlapBBox, weightFactor

◆ fromConfig()

def lsst.coadd.utils.coadd.Coadd.fromConfig (   cls,
  bbox,
  wcs,
  config,
  logName = "coadd.utils.Coadd" 
)
inherited
Create a coadd

@param[in] bbox: bounding box of coadd Exposure with respect to parent (lsst.afw.geom.Box2I):
    coadd dimensions = bbox.getDimensions(); xy0 = bbox.getMin()
@param[in] wcs: WCS of coadd exposure (lsst.afw.geom.SKyWcs)
@param[in] config: coadd config; an instance of CoaddConfig
@param[in] logName: name by which messages are logged

Definition at line 76 of file coadd.py.

76  def fromConfig(cls, bbox, wcs, config, logName="coadd.utils.Coadd"):
77  """Create a coadd
78 
79  @param[in] bbox: bounding box of coadd Exposure with respect to parent (lsst.afw.geom.Box2I):
80  coadd dimensions = bbox.getDimensions(); xy0 = bbox.getMin()
81  @param[in] wcs: WCS of coadd exposure (lsst.afw.geom.SKyWcs)
82  @param[in] config: coadd config; an instance of CoaddConfig
83  @param[in] logName: name by which messages are logged
84  """
85  return cls(
86  bbox=bbox,
87  wcs=wcs,
88  badMaskPlanes=config.badMaskPlanes,
89  logName=logName,
90  )
91 

◆ getBadPixelMask()

def lsst.coadd.utils.coadd.Coadd.getBadPixelMask (   self)
inherited
Return the bad pixel mask

Definition at line 157 of file coadd.py.

157  def getBadPixelMask(self):
158  """Return the bad pixel mask
159  """
160  return self._badPixelMask
161 

◆ getBBox()

def lsst.coadd.utils.coadd.Coadd.getBBox (   self)
inherited
Return the bounding box of the coadd

Definition at line 162 of file coadd.py.

162  def getBBox(self):
163  """Return the bounding box of the coadd
164  """
165  return self._bbox
166 

◆ getCoadd()

def lsst.coadd.utils.coadd.Coadd.getCoadd (   self)
inherited
Get the coadd exposure for all exposures you have coadded so far

If all exposures in this coadd have the same-named filter then that filter is set in the coadd.
Otherwise the coadd will have the default unknown filter.

@warning: the Calib is not be set.

Definition at line 129 of file coadd.py.

129  def getCoadd(self):
130  """Get the coadd exposure for all exposures you have coadded so far
131 
132  If all exposures in this coadd have the same-named filter then that filter is set in the coadd.
133  Otherwise the coadd will have the default unknown filter.
134 
135  @warning: the Calib is not be set.
136  """
137  # make a deep copy so I can scale it
138  coaddMaskedImage = self._coadd.getMaskedImage()
139  scaledMaskedImage = coaddMaskedImage.Factory(coaddMaskedImage, True)
140 
141  # set the edge pixels
142  setCoaddEdgeBits(scaledMaskedImage.getMask(), self._weightMap)
143 
144  # scale non-edge pixels by weight map
145  scaledMaskedImage /= self._weightMap
146 
147  scaledExposure = afwImage.makeExposure(scaledMaskedImage, self._wcs)
148  if len(self._filterDict) == 1:
149  scaledExposure.setFilter(list(self._filterDict.values())[0])
150  return scaledExposure
151 
std::shared_ptr< Exposure< ImagePixelT, MaskPixelT, VariancePixelT > > makeExposure(MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > &mimage, std::shared_ptr< geom::SkyWcs const > wcs=std::shared_ptr< geom::SkyWcs const >())
A function to return an Exposure of the correct type (cf.
Definition: Exposure.h:446
daf::base::PropertyList * list
Definition: fits.cc:833

◆ getFilters()

def lsst.coadd.utils.coadd.Coadd.getFilters (   self)
inherited
Return a collection of all the filters seen so far in in addExposure

Definition at line 152 of file coadd.py.

152  def getFilters(self):
153  """Return a collection of all the filters seen so far in in addExposure
154  """
155  return list(self._filterDict.values())
156 
daf::base::PropertyList * list
Definition: fits.cc:833

◆ getWcs()

def lsst.coadd.utils.coadd.Coadd.getWcs (   self)
inherited
Return the wcs of the coadd

Definition at line 167 of file coadd.py.

167  def getWcs(self):
168  """Return the wcs of the coadd
169  """
170  return self._wcs
171 

◆ getWeightMap()

def lsst.coadd.utils.coadd.Coadd.getWeightMap (   self)
inherited
Return the weight map for all exposures you have coadded so far

The weight map is a float Image of the same dimensions as the coadd; the value of each pixel
is the sum of the weights of all exposures that contributed to that pixel.

Definition at line 172 of file coadd.py.

172  def getWeightMap(self):
173  """Return the weight map for all exposures you have coadded so far
174 
175  The weight map is a float Image of the same dimensions as the coadd; the value of each pixel
176  is the sum of the weights of all exposures that contributed to that pixel.
177  """
178  return self._weightMap
179 

Member Data Documentation

◆ ConfigClass

lsst.coadd.utils.coadd.Coadd.ConfigClass = CoaddConfig
staticinherited

Definition at line 49 of file coadd.py.


The documentation for this class was generated from the following file:
  • /j/snowflake/release/lsstsw/stack/Linux64/coadd_chisquared/16.0-3-ge00e371+41/python/lsst/coadd/chisquared/coadd.py