lsst.pipe.tasks
16.0-13-g1e751bcc+8
|
Public Member Functions | |
def | runDataRef (self, dataRef, selectDataList=[]) |
def | prepareDcrInputs (self, templateCoadd, tempExpRefList, weightList) |
def | run (self, skyInfo, tempExpRefList, imageScalerList, weightList, supplementaryData=None) |
def | calculateNImage (self, dcrModels, bbox, tempExpRefList, spanSetMaskList, statsCtrl) |
def | dcrAssembleSubregion (self, dcrModels, bbox, tempExpRefList, imageScalerList, weightList, spanSetMaskList, statsFlags, statsCtrl, convergenceMetric, baseMask, subfilterVariance) |
def | dcrResiduals (self, residual, visitInfo, bbox, wcs, filterInfo) |
def | newModelFromResidual (self, dcrModels, residualGeneratorList, bbox, statsFlags, statsCtrl, weightList) |
def | calculateConvergence (self, dcrModels, bbox, tempExpRefList, imageScalerList, weightList, spanSetMaskList, statsCtrl) |
def | calculateSingleConvergence (self, dcrModels, exposure, significanceImage, statsCtrl, altMaskSpans=None) |
def | stackCoadd (self, dcrCoadds) |
def | fillCoadd (self, dcrModels, skyInfo, tempExpRefList, weightList, calibration=None, coaddInputs=None) |
def | makeSupplementaryData (self, dataRef, selectDataList) |
def | run (self, skyInfo, tempExpRefList, imageScalerList, weightList, supplementaryData, args, kwargs) |
def | applyAltEdgeMask (self, mask, altMaskList) |
def | findArtifacts (self, templateCoadd, tempExpRefList, imageScalerList) |
def | prefilterArtifacts (self, spanSetList, exp) |
def | filterArtifacts (self, spanSetList, epochCountImage, nImage, footprintsToExclude=None) |
def | processResults (self, coaddExposure, dataRef) |
def | getTempExpRefList (self, patchRef, calExpRefList) |
def | prepareInputs (self, refList) |
def | prepareStats (self, mask=None) |
def | assembleMetadata (self, coaddExposure, tempExpRefList, weightList) |
def | assembleSubregion (self, coaddExposure, bbox, tempExpRefList, imageScalerList, weightList, altMaskList, statsFlags, statsCtrl, nImage=None) |
def | removeMaskPlanes (self, maskedImage) |
def | applyAltMaskPlanes (self, mask, altMaskSpans) |
def | shrinkValidPolygons (self, coaddInputs) |
def | readBrightObjectMasks (self, dataRef) |
def | setBrightObjectMasks (self, exposure, dataId, brightObjectMasks) |
def | setInexactPsf (self, mask) |
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 | getCalExp (self, dataRef, bgSubtracted) |
Return one "calexp" calibrated exposure. 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... | |
Static Public Member Functions | |
def | setRejectedMaskMapping (statsCtrl) |
Public Attributes | |
bufferSize | |
warpCtrl | |
brightObjectBitmask | |
warpType | |
Static Public Attributes | |
ConfigClass = DcrAssembleCoaddConfig | |
RunnerClass = CoaddTaskRunner | |
Assemble DCR coadded images from a set of warps. Notes ----- As with AssembleCoaddTask, we want to assemble a coadded image from a set of Warps (also called coadded temporary exposures), including the effects of Differential Chromatic Refraction (DCR). For full details of the mathematics and algorithm, please see DMTN-037: DCR-matched template generation (https://dmtn-037.lsst.io). This Task produces a DCR-corrected deepCoadd, as well as a dcrCoadd for each subfilter used in the iterative calculation. It begins by dividing the bandpass-defining filter into N equal bandwidth "subfilters", and divides the flux in each pixel from an initial coadd equally into each as a "dcrModel". Because the airmass and parallactic angle of each individual exposure is known, we can calculate the shift relative to the center of the band in each subfilter due to DCR. For each exposure we apply this shift as a linear transformation to the dcrModels and stack the results to produce a DCR-matched exposure. The matched exposures are subtracted from the input exposures to produce a set of residual images, and these residuals are reverse shifted for each exposures' subfilters and stacked. The shifted and stacked residuals are added to the dcrModels to produce a new estimate of the flux in each pixel within each subfilter. The dcrModels are solved for iteratively, which continues until the solution from a new iteration improves by less than a set percentage, or a maximum number of iterations is reached. Two forms of regularization are employed to reduce unphysical results. First, the new solution is averaged with the solution from the previous iteration, which mitigates oscillating solutions where the model overshoots with alternating very high and low values. Second, a common degeneracy when the data have a limited range of airmass or parallactic angle values is for one subfilter to be fit with very low or negative values, while another subfilter is fit with very high values. This typically appears in the form of holes next to sources in one subfilter, and corresponding extended wings in another. Because each subfilter has a narrow bandwidth we assume that physical sources that are above the noise level will not vary in flux by more than a factor of `clampFrequency` between subfilters, and pixels that have flux deviations larger than that factor will have the excess flux distributed evenly among all subfilters.
Definition at line 118 of file dcrAssembleCoadd.py.
|
inherited |
Propagate alt EDGE mask to SENSOR_EDGE AND INEXACT_PSF planes. Parameters ---------- mask : `lsst.afw.image.Mask` Original mask. altMaskList : `list` List of Dicts containing ``spanSet`` lists. Each element contains the new mask plane name (e.g. "CLIPPED and/or "NO_DATA") as the key, and list of ``SpanSets`` to apply to the mask.
Definition at line 1863 of file assembleCoadd.py.
|
inherited |
Apply in place alt mask formatted as SpanSets to a mask. Parameters ---------- mask : `lsst.afw.image.Mask` Original mask. altMaskSpans : `dict` SpanSet lists to apply. Each element contains the new mask plane name (e.g. "CLIPPED and/or "NO_DATA") as the key, and list of SpanSets to apply to the mask. Returns ------- mask : `lsst.afw.image.Mask` Updated mask.
Definition at line 776 of file assembleCoadd.py.
|
inherited |
Set the metadata for the coadd. This basic implementation sets the filter from the first input. Parameters ---------- coaddExposure : `lsst.afw.image.Exposure` The target exposure for the coadd. tempExpRefList : `list` List of data references to tempExp. weightList : `list` List of weights.
Definition at line 607 of file assembleCoadd.py.
|
inherited |
Assemble the coadd for a sub-region. For each coaddTempExp, check for (and swap in) an alternative mask if one is passed. Remove mask planes listed in `config.removeMaskPlanes`. Finally, stack the actual exposures using `lsst.afw.math.statisticsStack` with the statistic specified by statsFlags. Typically, the statsFlag will be one of lsst.afw.math.MEAN for a mean-stack or `lsst.afw.math.MEANCLIP` for outlier rejection using an N-sigma clipped mean where N and iterations are specified by statsCtrl. Assign the stacked subregion back to the coadd. Parameters ---------- coaddExposure : `lsst.afw.image.Exposure` The target exposure for the coadd. bbox : `lsst.afw.geom.Box` Sub-region to coadd. tempExpRefList : `list` List of data reference to tempExp. imageScalerList : `list` List of image scalers. weightList : `list` List of weights. altMaskList : `list` List of alternate masks to use rather than those stored with tempExp, or None. Each element is dict with keys = mask plane name to which to add the spans. statsFlags : `lsst.afw.math.Property` Property object for statistic for coadd. statsCtrl : `lsst.afw.math.StatisticsControl` Statistics control object for coadd. nImage : `lsst.afw.image.ImageU`, optional Keeps track of exposure count for each pixel.
Definition at line 663 of file assembleCoadd.py.
def lsst.pipe.tasks.dcrAssembleCoadd.DcrAssembleCoaddTask.calculateConvergence | ( | self, | |
dcrModels, | |||
bbox, | |||
tempExpRefList, | |||
imageScalerList, | |||
weightList, | |||
spanSetMaskList, | |||
statsCtrl | |||
) |
Calculate a quality of fit metric for the matched templates. Parameters ---------- dcrModels : `lsst.pipe.tasks.DcrModel` Best fit model of the true sky after correcting chromatic effects. bbox : `lsst.afw.geom.box.Box2I` Sub-region to coadd tempExpRefList : `list` of `lsst.daf.persistence.ButlerDataRef` The data references to the input warped exposures. imageScalerList : `list` of `lsst.pipe.task.ImageScaler` The image scalars correct for the zero point of the exposures. weightList : `list` of `float` The weight to give each input exposure in the coadd spanSetMaskList : `list` of `dict` containing spanSet lists, or None Each element is dict with keys = mask plane name to add the spans to statsCtrl : `lsst.afw.math.StatisticsControl` Statistics control object for coadd Returns ------- convergenceMetric : `float` Quality of fit metric for all input exposures, within the sub-region
Definition at line 564 of file dcrAssembleCoadd.py.
def lsst.pipe.tasks.dcrAssembleCoadd.DcrAssembleCoaddTask.calculateNImage | ( | self, | |
dcrModels, | |||
bbox, | |||
tempExpRefList, | |||
spanSetMaskList, | |||
statsCtrl | |||
) |
Calculate the number of exposures contributing to each subfilter. Parameters ---------- dcrModels : `lsst.pipe.tasks.DcrModel` Best fit model of the true sky after correcting chromatic effects. bbox : `lsst.afw.geom.box.Box2I` Bounding box of the patch to coadd. tempExpRefList : `list` of `lsst.daf.persistence.ButlerDataRef` The data references to the input warped exposures. spanSetMaskList : `list` of `dict` containing spanSet lists, or None Each element is dict with keys = mask plane name to add the spans to statsCtrl : `lsst.afw.math.StatisticsControl` Statistics control object for coadd Returns ------- dcrNImages : `list` of `lsst.afw.image.ImageU` List of exposure count images for each subfilter
Definition at line 388 of file dcrAssembleCoadd.py.
def lsst.pipe.tasks.dcrAssembleCoadd.DcrAssembleCoaddTask.calculateSingleConvergence | ( | self, | |
dcrModels, | |||
exposure, | |||
significanceImage, | |||
statsCtrl, | |||
altMaskSpans = None |
|||
) |
Calculate a quality of fit metric for a single matched template. Parameters ---------- dcrModels : `lsst.pipe.tasks.DcrModel` Best fit model of the true sky after correcting chromatic effects. exposure : `lsst.afw.image.ExposureF` The input warped exposure to evaluate. significanceImage : `numpy.ndarray` Array of weights for each pixel corresponding to its significance for the convergence calculation. statsCtrl : `lsst.afw.math.StatisticsControl` Statistics control object for coadd altMaskSpans : `dict` containing spanSet lists, or None The keys of the `dict` equal the mask plane name to add the spans to Returns ------- convergenceMetric : `float` Quality of fit metric for one exposure, within the sub-region.
Definition at line 607 of file dcrAssembleCoadd.py.
def lsst.pipe.tasks.dcrAssembleCoadd.DcrAssembleCoaddTask.dcrAssembleSubregion | ( | self, | |
dcrModels, | |||
bbox, | |||
tempExpRefList, | |||
imageScalerList, | |||
weightList, | |||
spanSetMaskList, | |||
statsFlags, | |||
statsCtrl, | |||
convergenceMetric, | |||
baseMask, | |||
subfilterVariance | |||
) |
Assemble the DCR coadd for a sub-region. Build a DCR-matched template for each input exposure, then shift the residuals according to the DCR in each subfilter. Stack the shifted residuals and apply them as a correction to the solution from the previous iteration. Restrict the new model solutions from varying by more than a factor of `modelClampFactor` from the last solution, and additionally restrict the individual subfilter models from varying by more than a factor of `clampFrequency` from their average. Finally, mitigate potentially oscillating solutions by averaging the new solution with the solution from the previous iteration, weighted by their convergence metric. Parameters ---------- dcrModels : `lsst.pipe.tasks.DcrModel` Best fit model of the true sky after correcting chromatic effects. bbox : `lsst.afw.geom.box.Box2I` Bounding box of the subregion to coadd. tempExpRefList : `list` of `lsst.daf.persistence.ButlerDataRef` The data references to the input warped exposures. imageScalerList : `list` of `lsst.pipe.task.ImageScaler` The image scalars correct for the zero point of the exposures. weightList : `list` of `float` The weight to give each input exposure in the coadd spanSetMaskList : `list` of `dict` containing spanSet lists, or None Each element is dict with keys = mask plane name to add the spans to statsFlags : `lsst.afw.math.Property` Statistics settings for coaddition. statsCtrl : `lsst.afw.math.StatisticsControl` Statistics control object for coadd convergenceMetric : `float` Quality of fit metric for the matched templates of the input images. baseMask : `lsst.afw.image.Mask` Mask of the initial template coadd. subfilterVariance : `list` of `numpy.ndarray` The variance of each coadded subfilter image.
Definition at line 426 of file dcrAssembleCoadd.py.
def lsst.pipe.tasks.dcrAssembleCoadd.DcrAssembleCoaddTask.dcrResiduals | ( | self, | |
residual, | |||
visitInfo, | |||
bbox, | |||
wcs, | |||
filterInfo | |||
) |
Prepare a residual image for stacking in each subfilter by applying the reverse DCR shifts. Parameters ---------- residual : `lsst.afw.image.MaskedImageF` The residual masked image for one exposure, after subtracting the matched template visitInfo : `lsst.afw.image.VisitInfo` Metadata for the exposure. bbox : `lsst.afw.geom.box.Box2I` Sub-region of the coadd wcs : `lsst.afw.geom.SkyWcs` Coordinate system definition (wcs) for the exposure. filterInfo : `lsst.afw.image.Filter` The filter definition, set in the current instruments' obs package. Required for any calculation of DCR, including making matched templates. Yields ------ residualImage : `lsst.afw.image.maskedImageF` The residual image for the next subfilter, shifted for DCR.
Definition at line 496 of file dcrAssembleCoadd.py.
def lsst.pipe.tasks.dcrAssembleCoadd.DcrAssembleCoaddTask.fillCoadd | ( | self, | |
dcrModels, | |||
skyInfo, | |||
tempExpRefList, | |||
weightList, | |||
calibration = None , |
|||
coaddInputs = None |
|||
) |
Create a list of coadd exposures from a list of masked images. Parameters ---------- dcrModels : `lsst.pipe.tasks.DcrModel` Best fit model of the true sky after correcting chromatic effects. skyInfo : `lsst.pipe.base.Struct` Patch geometry information, from getSkyInfo tempExpRefList : `list` of `lsst.daf.persistence.ButlerDataRef` The data references to the input warped exposures. weightList : `list` of `float` The weight to give each input exposure in the coadd calibration : `lsst.afw.Image.Calib`, optional Scale factor to set the photometric zero point of an exposure. coaddInputs : `lsst.afw.Image.CoaddInputs`, optional A record of the observations that are included in the coadd. Returns ------- dcrCoadds : `list` of `lsst.afw.image.ExposureF` A list of coadd exposures, each exposure containing the model for one subfilter.
Definition at line 670 of file dcrAssembleCoadd.py.
|
inherited |
Filter artifact candidates. Parameters ---------- spanSetList : `list` List of SpanSets representing artifact candidates. epochCountImage : `lsst.afw.image.Image` Image of accumulated number of warpDiff detections. nImage : `lsst.afw.image.Image` Image of the accumulated number of total epochs contributing. Returns ------- maskSpanSetList : `list` List of SpanSets with artifacts.
Definition at line 2017 of file assembleCoadd.py.
|
inherited |
Find artifacts. Loop through warps twice. The first loop builds a map with the count of how many epochs each pixel deviates from the templateCoadd by more than ``config.chiThreshold`` sigma. The second loop takes each difference image and filters the artifacts detected in each using count map to filter out variable sources and sources that are difficult to subtract cleanly. Parameters ---------- templateCoadd : `lsst.afw.image.Exposure` Exposure to serve as model of static sky. tempExpRefList : `list` List of data references to warps. imageScalerList : `list` List of image scalers. Returns ------- altMasks : `list` List of dicts containing information about CLIPPED (i.e., artifacts), NO_DATA, and EDGE pixels.
Definition at line 1882 of file assembleCoadd.py.
|
inherited |
Convenience method to provide the bitmask from the mask plane names.
Definition at line 221 of file coaddBase.py.
|
inherited |
Return one "calexp" calibrated exposure.
[in] | dataRef | a sensor-level data reference |
[in] | bgSubtracted | return calexp with background subtracted? If False get the calexp's background background model and add it to the calexp. |
If config.doApplyUberCal, meas_mosaic calibrations will be applied to the returned exposure using applyMosaicResults.
Definition at line 143 of file coaddBase.py.
|
inherited |
Return coadd name for given warpType and task config Parameters ---------- warpType : string Either 'direct' or 'psfMatched' Returns ------- CoaddDatasetName : `string`
Definition at line 171 of file coaddBase.py.
|
inherited |
Use getSkyinfo to return the skyMap, tract and patch information, wcs and the outer bbox of the patch.
[in] | patchRef | data reference for sky map. Must include keys "tract" and "patch" |
Definition at line 127 of file coaddBase.py.
|
inherited |
Return warp name for given warpType and task config Parameters ---------- warpType : string Either 'direct' or 'psfMatched' Returns ------- WarpDatasetName : `string`
Definition at line 186 of file coaddBase.py.
|
inherited |
Generate list data references corresponding to warped exposures that lie within the patch to be coadded. Parameters ---------- patchRef : `dataRef` Data reference for patch. calExpRefList : `list` List of data references for input calexps. Returns ------- tempExpRefList : `list` List of Warp/CoaddTempExp data references.
Definition at line 409 of file assembleCoadd.py.
|
inherited |
Make inputs specific to Subclass. Generate a templateCoadd to use as a native model of static sky to subtract from warps. Parameters ---------- dataRef : `lsst.daf.persistence.butlerSubset.ButlerDataRef` Butler dataRef for supplementary data. selectDataList : `list` List of data references to Warps. Returns ------- result : `lsst.pipe.base.Struct` Result struct with components: - ``templateCoaddcoadd``: coadded exposure (``lsst.afw.image.Exposure``).
Definition at line 1777 of file assembleCoadd.py.
def lsst.pipe.tasks.dcrAssembleCoadd.DcrAssembleCoaddTask.newModelFromResidual | ( | self, | |
dcrModels, | |||
residualGeneratorList, | |||
bbox, | |||
statsFlags, | |||
statsCtrl, | |||
weightList | |||
) |
Calculate a new DcrModel from a set of image residuals. Parameters ---------- dcrModels : `lsst.pipe.tasks.DcrModel` Current model of the true sky after correcting chromatic effects. residualGeneratorList : `generator` of `lsst.afw.image.maskedImageF` The residual image for the next subfilter, shifted for DCR. bbox : `lsst.afw.geom.box.Box2I` Sub-region of the coadd statsFlags : `lsst.afw.math.Property` Statistics settings for coaddition. statsCtrl : `lsst.afw.math.StatisticsControl` Statistics control object for coadd weightList : `list` of `float` The weight to give each input exposure in the coadd Returns ------- dcrModel : `lsst.pipe.tasks.DcrModel` New model of the true sky after correcting chromatic effects.
Definition at line 523 of file dcrAssembleCoadd.py.
|
inherited |
Remove artifact candidates covered by bad mask plane. Any future editing of the candidate list that does not depend on temporal information should go in this method. Parameters ---------- spanSetList : `list` List of SpanSets representing artifact candidates. exp : `lsst.afw.image.Exposure` Exposure containing mask planes used to prefilter. Returns ------- returnSpanSetList : `list` List of SpanSets with artifacts.
Definition at line 1985 of file assembleCoadd.py.
def lsst.pipe.tasks.dcrAssembleCoadd.DcrAssembleCoaddTask.prepareDcrInputs | ( | self, | |
templateCoadd, | |||
tempExpRefList, | |||
weightList | |||
) |
Prepare the DCR coadd by iterating through the visitInfo of the input warps. Sets the properties ``filterInfo`` and ``bufferSize``. Parameters ---------- templateCoadd : `lsst.afw.image.ExposureF` The initial coadd exposure before accounting for DCR. tempExpRefList : `list` of `lsst.daf.persistence.ButlerDataRef` The data references to the input warped exposures. weightList : `list` of `float` The weight to give each input exposure in the coadd Will be modified in place if ``doAirmassWeight`` is set. Returns ------- dcrModels : `lsst.pipe.tasks.DcrModel` Best fit model of the true sky after correcting chromatic effects. Raises ------ NotImplementedError If ``lambdaMin`` is missing from the Mapper class of the obs package being used.
Definition at line 210 of file dcrAssembleCoadd.py.
|
inherited |
Prepare the input warps for coaddition by measuring the weight for each warp and the scaling for the photometric zero point. Each Warp has its own photometric zeropoint and background variance. Before coadding these Warps together, compute a scale factor to normalize the photometric zeropoint and compute the weight for each Warp. Parameters ---------- refList : `list` List of data references to tempExp Returns ------- result : `lsst.pipe.base.Struct` Result struct with components: - ``tempExprefList``: `list` of data references to tempExp. - ``weightList``: `list` of weightings. - ``imageScalerList``: `list` of image scalers.
Definition at line 433 of file assembleCoadd.py.
|
inherited |
Prepare the statistics for coadding images. Parameters ---------- mask : `int`, optional Bit mask value to exclude from coaddition. Returns ------- stats : `lsst.pipe.base.Struct` Statistics structure with the following fields: - ``statsCtrl``: Statistics control object for coadd (`lsst.afw.math.StatisticsControl`) - ``statsFlags``: Statistic for coadd (`lsst.afw.math.Property`)
Definition at line 502 of file assembleCoadd.py.
|
inherited |
Interpolate over missing data and mask bright stars. Parameters ---------- coaddExposure : `lsst.afw.image.Exposure` The coadded exposure to process. dataRef : `lsst.daf.persistence.ButlerDataRef` Butler data reference for supplementary data.
Definition at line 372 of file assembleCoadd.py.
|
inherited |
Retrieve the bright object masks. Returns None on failure. Parameters ---------- dataRef : `lsst.daf.persistence.butlerSubset.ButlerDataRef` A Butler dataRef. Returns ------- result : `lsst.daf.persistence.butlerSubset.ButlerDataRef` Bright object mask from the Butler object, or None if it cannot be retrieved.
Definition at line 830 of file assembleCoadd.py.
|
inherited |
Unset the mask of an image for mask planes specified in the config. Parameters ---------- maskedImage : `lsst.afw.image.MaskedImage` The masked image to be modified.
Definition at line 732 of file assembleCoadd.py.
def lsst.pipe.tasks.dcrAssembleCoadd.DcrAssembleCoaddTask.run | ( | self, | |
skyInfo, | |||
tempExpRefList, | |||
imageScalerList, | |||
weightList, | |||
supplementaryData = None |
|||
) |
Assemble the coadd. Requires additional inputs Struct ``supplementaryData`` to contain a ``templateCoadd`` that serves as the model of the static sky. Find artifacts and apply them to the warps' masks creating a list of alternative masks with a new "CLIPPED" plane and updated "NO_DATA" plane Then pass these alternative masks to the base class's assemble method. Divide the ``templateCoadd`` evenly between each subfilter of a ``DcrModel`` as the starting best estimate of the true wavelength- dependent sky. Forward model the ``DcrModel`` using the known chromatic effects in each subfilter and calculate a convergence metric based on how well the modeled template matches the input warps. If the convergence has not yet reached the desired threshold, then shift and stack the residual images to build a new ``DcrModel``. Apply conditioning to prevent oscillating solutions between iterations or between subfilters. Once the ``DcrModel`` reaches convergence or the maximum number of iterations has been reached, fill the metadata for each subfilter image and make them proper ``coaddExposure``s. Parameters ---------- skyInfo : `lsst.pipe.base.Struct` Patch geometry information, from getSkyInfo tempExpRefList : `list` of `lsst.daf.persistence.ButlerDataRef` The data references to the input warped exposures. imageScalerList : `list` of `lsst.pipe.task.ImageScaler` The image scalars correct for the zero point of the exposures. weightList : `list` of `float` The weight to give each input exposure in the coadd supplementaryData : `lsst.pipe.base.Struct` Result struct returned by ``makeSupplementaryData`` with components: - ``templateCoadd``: coadded exposure (`lsst.afw.image.Exposure`) Returns ------- result : `lsst.pipe.base.Struct` Result struct with components: - ``coaddExposure``: coadded exposure (`lsst.afw.image.Exposure`) - ``nImage``: exposure count image (`lsst.afw.image.ImageU`) - ``dcrCoadds``: `list` of coadded exposures for each subfilter - ``dcrNImages``: `list` of exposure count images for each subfilter
Definition at line 264 of file dcrAssembleCoadd.py.
|
inherited |
Assemble the coadd. Find artifacts and apply them to the warps' masks creating a list of alternative masks with a new "CLIPPED" plane and updated "NO_DATA" plane. Then pass these alternative masks to the base class's `run` method. Parameters ---------- skyInfo : `lsst.pipe.base.Struct` Patch geometry information. tempExpRefList : `list` List of data references to warps. imageScalerList : `list` List of image scalers. weightList : `list` List of weights. supplementaryData : `lsst.pipe.base.Struct` This Struct must contain a ``templateCoadd`` that serves as the model of the static sky. Returns ------- result : `lsst.pipe.base.Struct` Result struct with components: - ``coaddExposure``: coadded exposure (``lsst.afw.image.Exposure``). - ``nImage``: exposure count image (``lsst.afw.image.Image``), if requested.
Definition at line 1819 of file assembleCoadd.py.
def lsst.pipe.tasks.dcrAssembleCoadd.DcrAssembleCoaddTask.runDataRef | ( | self, | |
dataRef, | |||
selectDataList = [] |
|||
) |
Assemble a coadd from a set of warps. Coadd a set of Warps. Compute weights to be applied to each Warp and find scalings to match the photometric zeropoint to a reference Warp. Assemble the Warps using run method. Forward model chromatic effects across multiple subfilters, and subtract from the input Warps to build sets of residuals. Use the residuals to construct a new ``DcrModel`` for each subfilter, and iterate until the model converges. Interpolate over NaNs and optionally write the coadd to disk. Return the coadded exposure. Parameters ---------- dataRef : `lsst.daf.persistence.ButlerDataRef` Data reference defining the patch for coaddition and the reference Warp selectDataList : `list` of `lsst.daf.persistence.ButlerDataRef` List of data references to warps. Data to be coadded will be selected from this list based on overlap with the patch defined by the data reference. Returns ------- results : `lsst.pipe.base.Struct` The Struct contains the following fields: - ``coaddExposure``: coadded exposure (`lsst.afw.image.Exposure`) - ``nImage``: exposure count image (`lsst.afw.image.ImageU`) - ``dcrCoadds``: `list` of coadded exposures for each subfilter - ``dcrNImages``: `list` of exposure count images for each subfilter
Definition at line 164 of file dcrAssembleCoadd.py.
|
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.
[in] | patchRef | data reference for sky map patch. Must include keys "tract", "patch", plus the camera-specific filter key (e.g. "filter" or "band") |
[in] | skyInfo | geometry for the patch; output from getSkyInfo |
Definition at line 107 of file coaddBase.py.
|
inherited |
Set the bright object masks. Parameters ---------- exposure : `lsst.afw.image.Exposure` Exposure under consideration. dataId : `lsst.daf.persistence.dataId` Data identifier dict for patch. brightObjectMasks : `lsst.afw.table` Table of bright objects to mask.
Definition at line 852 of file assembleCoadd.py.
|
inherited |
Set INEXACT_PSF mask plane. If any of the input images isn't represented in the coadd (due to clipped pixels or chip gaps), the `CoaddPsf` will be inexact. Flag these pixels. Parameters ---------- mask : `lsst.afw.image.Mask` Coadded exposure's mask, modified in-place.
Definition at line 904 of file assembleCoadd.py.
|
staticinherited |
Map certain mask planes of the warps to new planes for the coadd. If a pixel is rejected due to a mask value other than EDGE, NO_DATA, or CLIPPED, set it to REJECTED on the coadd. If a pixel is rejected due to EDGE, set the coadd pixel to SENSOR_EDGE. If a pixel is rejected due to CLIPPED, set the coadd pixel to CLIPPED. Parameters ---------- statsCtrl : `lsst.afw.math.StatisticsControl` Statistics control object for coadd Returns ------- maskMap : `list` of `tuple` of `int` A list of mappings of mask planes of the warped exposures to mask planes of the coadd.
Definition at line 748 of file assembleCoadd.py.
|
inherited |
Shrink coaddInputs' ccds' ValidPolygons in place. Either modify each ccd's validPolygon in place, or if CoaddInputs does not have a validPolygon, create one from its bbox. Parameters ---------- coaddInputs : `lsst.afw.image.coaddInputs` Original mask.
Definition at line 808 of file assembleCoadd.py.
def lsst.pipe.tasks.dcrAssembleCoadd.DcrAssembleCoaddTask.stackCoadd | ( | self, | |
dcrCoadds | |||
) |
Add a list of sub-band coadds together. Parameters ---------- dcrCoadds : `list` of `lsst.afw.image.ExposureF` A list of coadd exposures, each exposure containing the model for one subfilter. Returns ------- coaddExposure : `lsst.afw.image.ExposureF` A single coadd exposure that is the sum of the sub-bands.
Definition at line 651 of file dcrAssembleCoadd.py.
|
inherited |
Definition at line 304 of file assembleCoadd.py.
lsst.pipe.tasks.dcrAssembleCoadd.DcrAssembleCoaddTask.bufferSize |
Definition at line 249 of file dcrAssembleCoadd.py.
|
static |
Definition at line 160 of file dcrAssembleCoadd.py.
|
staticinherited |
Definition at line 100 of file coaddBase.py.
lsst.pipe.tasks.dcrAssembleCoadd.DcrAssembleCoaddTask.warpCtrl |
Definition at line 254 of file dcrAssembleCoadd.py.
|
inherited |
Definition at line 310 of file assembleCoadd.py.