lsst.pipe.tasks  17.0-5-gf0ac6446+2
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.pipe.tasks.makeCoaddTempExp.MakeWarpTask Class Reference
Inheritance diagram for lsst.pipe.tasks.makeCoaddTempExp.MakeWarpTask:
lsst.pipe.tasks.makeCoaddTempExp.MakeCoaddTempExpTask lsst.pipe.tasks.coaddBase.CoaddBaseTask

Public Member Functions

def getInputDatasetTypes (cls, config)
 
def getOutputDatasetTypes (cls, config)
 
def adaptArgsAndRun (self, inputData, inputDataIds, outputDataIds, butler)
 
def prepareCalibratedExposures (self, calExpList, backgroundList=None, skyCorrList=None, kwargs)
 
def runDataRef (self, patchRef, selectDataList=[])
 Produce <coaddName>Coadd_<warpType>Warp images by warping and optionally PSF-matching. More...
 
def run (self, calExpList, ccdIdList, skyInfo, visitId=0, dataIdList=None, kwargs)
 
def getCalibratedExposure (self, dataRef, bgSubtracted)
 
def getWarpTypeList (self)
 
def applySkyCorr (self, dataRef, calexp)
 
def selectExposures (self, patchRef, skyInfo=None, selectDataList=[])
 Select exposures to coadd. More...
 
def getSkyInfo (self, patchRef)
 Use getSkyinfo to return the skyMap, tract and patch information, wcs and the outer bbox of the patch. More...
 
def getCoaddDatasetName (self, warpType="direct")
 
def getTempExpDatasetName (self, warpType="direct")
 
def getBadPixelMask (self)
 Convenience method to provide the bitmask from the mask plane names. More...
 

Public Attributes

 reuse
 

Static Public Attributes

 ConfigClass = MakeWarpConfig
 
 RunnerClass = CoaddTaskRunner
 

Detailed Description

Warp and optionally PSF-Match calexps onto an a common projection

First Draft of a Gen3 compatible MakeWarpTask which
currently does not handle doApplyUberCal=True.

Definition at line 620 of file makeCoaddTempExp.py.

Member Function Documentation

◆ adaptArgsAndRun()

def lsst.pipe.tasks.makeCoaddTempExp.MakeWarpTask.adaptArgsAndRun (   self,
  inputData,
  inputDataIds,
  outputDataIds,
  butler 
)
Construct warps for requested warp type for single epoch

PipelineTask (Gen3) entry point to warp and optionally PSF-match
calexps. This method is analogous to `runDataRef`, it prepares all
the data products to be passed to `run`.
Return a Struct with only requested warpTypes controlled by the configs
makePsfMatched and makeDirect.

Parameters
----------
inputData : `dict`
    Keys are the names of the configs describing input dataset types.
    Values are input Python-domain data objects (or lists of objects)
    retrieved from data butler.
inputDataIds : `dict`
    Keys are the names of the configs describing input dataset types.
    Values are DataIds (or lists of DataIds) that task consumes for
    corresponding dataset type.
outputDataIds : `dict`
    Keys are the names of the configs describing input dataset types.
    Values are DataIds (or lists of DataIds) that task is to produce
    for corresponding dataset type.
butler : `lsst.daf.butler.Butler`
    Gen3 Butler object for fetching additional data products before
    running the Task

Returns
-------
result : `lsst.pipe.base.Struct`
   Result struct with components:

   - ``direct`` : (optional) direct Warp Exposure
          (``lsst.afw.image.Exposure``)
   - ``psfMatched``: (optional) PSF-Matched Warp Exposure
            (``lsst.afw.image.Exposure``)

Definition at line 655 of file makeCoaddTempExp.py.

◆ applySkyCorr()

def lsst.pipe.tasks.makeCoaddTempExp.MakeCoaddTempExpTask.applySkyCorr (   self,
  dataRef,
  calexp 
)
inherited
Apply correction to the sky background level

Sky corrections can be generated with the 'skyCorrection.py'
executable in pipe_drivers. Because the sky model used by that
code extends over the entire focal plane, this can produce
better sky subtraction.

The calexp is updated in-place.

Parameters
----------
dataRef : `lsst.daf.persistence.ButlerDataRef`
    Data reference for calexp.
calexp : `lsst.afw.image.Exposure` or `lsst.afw.image.MaskedImage`
    Calibrated exposure.

Definition at line 541 of file makeCoaddTempExp.py.

◆ getBadPixelMask()

def lsst.pipe.tasks.coaddBase.CoaddBaseTask.getBadPixelMask (   self)
inherited

Convenience method to provide the bitmask from the mask plane names.

Definition at line 199 of file coaddBase.py.

◆ getCalibratedExposure()

def lsst.pipe.tasks.makeCoaddTempExp.MakeCoaddTempExpTask.getCalibratedExposure (   self,
  dataRef,
  bgSubtracted 
)
inherited
Return one calibrated Exposure, possibly with an updated SkyWcs.

@param[in] dataRef        a sensor-level data reference
@param[in] bgSubtracted   return calexp with background subtracted? If False get the
                  calexp's background background model and add it to the calexp.
@return calibrated exposure

@raises MissingExposureError If data for the exposure is not available.

If config.doApplyUberCal, the exposure will be photometrically
calibrated via the `jointcal_photoCalib` dataset and have its SkyWcs
updated to the `jointcal_wcs`, otherwise it will be calibrated via the
Exposure's own Calib and have the original SkyWcs.

Definition at line 463 of file makeCoaddTempExp.py.

◆ getCoaddDatasetName()

def lsst.pipe.tasks.coaddBase.CoaddBaseTask.getCoaddDatasetName (   self,
  warpType = "direct" 
)
inherited
Return coadd name for given warpType and task config

Parameters
----------
warpType : string
    Either 'direct' or 'psfMatched'

Returns
-------
CoaddDatasetName : `string`

Definition at line 149 of file coaddBase.py.

◆ getInputDatasetTypes()

def lsst.pipe.tasks.makeCoaddTempExp.MakeWarpTask.getInputDatasetTypes (   cls,
  config 
)
Return input dataset type descriptors

Remove input dataset types not used by the Task

Definition at line 630 of file makeCoaddTempExp.py.

◆ getOutputDatasetTypes()

def lsst.pipe.tasks.makeCoaddTempExp.MakeWarpTask.getOutputDatasetTypes (   cls,
  config 
)
Return output dataset type descriptors

Remove output dataset types not produced by the Task

Definition at line 643 of file makeCoaddTempExp.py.

◆ getSkyInfo()

def lsst.pipe.tasks.coaddBase.CoaddBaseTask.getSkyInfo (   self,
  patchRef 
)
inherited

Use getSkyinfo to return the skyMap, tract and patch information, wcs and the outer bbox of the patch.

Parameters
[in]patchRefdata reference for sky map. Must include keys "tract" and "patch"
Returns
pipe_base Struct containing:
  • skyMap: sky map
  • tractInfo: information for chosen tract of sky map
  • patchInfo: information about chosen patch of tract
  • wcs: WCS of tract
  • bbox: outer bbox of patch, as an afwGeom Box2I

Definition at line 133 of file coaddBase.py.

◆ getTempExpDatasetName()

def lsst.pipe.tasks.coaddBase.CoaddBaseTask.getTempExpDatasetName (   self,
  warpType = "direct" 
)
inherited
Return warp name for given warpType and task config

Parameters
----------
warpType : string
    Either 'direct' or 'psfMatched'

Returns
-------
WarpDatasetName : `string`

Definition at line 164 of file coaddBase.py.

◆ getWarpTypeList()

def lsst.pipe.tasks.makeCoaddTempExp.MakeCoaddTempExpTask.getWarpTypeList (   self)
inherited
Return list of requested warp types per the config.

Definition at line 531 of file makeCoaddTempExp.py.

◆ prepareCalibratedExposures()

def lsst.pipe.tasks.makeCoaddTempExp.MakeWarpTask.prepareCalibratedExposures (   self,
  calExpList,
  backgroundList = None,
  skyCorrList = None,
  kwargs 
)
Calibrate and add backgrounds to input calExpList in place

TODO DM-17062: apply jointcal/meas_mosaic here

Parameters
----------
calExpList : `list` of `lsst.afw.image.Exposure`
    Sequence of calexps to be modified in place
backgroundList : `list` of `lsst.afw.math.backgroundList`
    Sequence of backgrounds to be added back in if bgSubtracted=False
skyCorrList : `list` of `lsst.afw.math.backgroundList`
    Sequence of background corrections to be subtracted if doApplySkyCorr=True

Definition at line 716 of file makeCoaddTempExp.py.

◆ run()

def lsst.pipe.tasks.makeCoaddTempExp.MakeCoaddTempExpTask.run (   self,
  calExpList,
  ccdIdList,
  skyInfo,
  visitId = 0,
  dataIdList = None,
  kwargs 
)
inherited
Create a Warp from inputs

We iterate over the multiple calexps in a single exposure to construct
the warp (previously called a coaddTempExp) of that exposure to the
supplied tract/patch.

Pixels that receive no pixels are set to NAN; this is not correct
(violates LSST algorithms group policy), but will be fixed up by
interpolating after the coaddition.

@param calexpRefList: List of data references for calexps that (may)
    overlap the patch of interest
@param skyInfo: Struct from CoaddBaseTask.getSkyInfo() with geometric
    information about the patch
@param visitId: integer identifier for visit, for the table that will
    produce the CoaddPsf
@return a pipeBase Struct containing:
  - exposures: a dictionary containing the warps requested:
"direct": direct warp if config.makeDirect
"psfMatched": PSF-matched warp if config.makePsfMatched

Definition at line 366 of file makeCoaddTempExp.py.

◆ runDataRef()

def lsst.pipe.tasks.makeCoaddTempExp.MakeCoaddTempExpTask.runDataRef (   self,
  patchRef,
  selectDataList = [] 
)
inherited

Produce <coaddName>Coadd_<warpType>Warp images by warping and optionally PSF-matching.

Parameters
[in]patchRefdata reference for sky map patch. Must include keys "tract", "patch", plus the camera-specific filter key (e.g. "filter" or "band")
Returns
: dataRefList: a list of data references for the new <coaddName>Coadd_directWarps if direct or both warp types are requested and <coaddName>Coadd_psfMatchedWarps if only psfMatched warps are requested.
Warning
: this task assumes that all exposures in a warp (coaddTempExp) have the same filter.
: this task sets the Calib of the coaddTempExp to the Calib of the first calexp with any good pixels in the patch. For a mosaic camera the resulting Calib should be ignored (assembleCoadd should determine zeropoint scaling without referring to it).

Definition at line 269 of file makeCoaddTempExp.py.

◆ selectExposures()

def lsst.pipe.tasks.coaddBase.CoaddBaseTask.selectExposures (   self,
  patchRef,
  skyInfo = None,
  selectDataList = [] 
)
inherited

Select exposures to coadd.

Get the corners of the bbox supplied in skyInfo using afwGeom.Box2D and convert the pixel positions of the bbox corners to sky coordinates using skyInfo.wcs.pixelToSky. Use the WcsSelectImagesTask to select exposures that lie inside the patch indicated by the dataRef.

Parameters
[in]patchRefdata reference for sky map patch. Must include keys "tract", "patch", plus the camera-specific filter key (e.g. "filter" or "band")
[in]skyInfogeometry for the patch; output from getSkyInfo
Returns
a list of science exposures to coadd, as butler data references

Definition at line 113 of file coaddBase.py.

Member Data Documentation

◆ ConfigClass

lsst.pipe.tasks.makeCoaddTempExp.MakeWarpTask.ConfigClass = MakeWarpConfig
static

Definition at line 626 of file makeCoaddTempExp.py.

◆ reuse

lsst.pipe.tasks.makeCoaddTempExp.MakeCoaddTempExpTask.reuse
inherited

Definition at line 265 of file makeCoaddTempExp.py.

◆ RunnerClass

lsst.pipe.tasks.coaddBase.CoaddBaseTask.RunnerClass = CoaddTaskRunner
staticinherited

Definition at line 106 of file coaddBase.py.


The documentation for this class was generated from the following file: