LSST Applications g0fba68d861+6234375589,g1e78f5e6d3+628c932f15,g1fd858c14a+eb8d917efb,g35bb328faa+fcb1d3bbc8,g4af146b050+4faa9dad44,g4d2262a081+3c0ac0cdae,g4e0f332c67+8616b824a5,g53246c7159+fcb1d3bbc8,g5a012ec0e7+d65fd7031a,g60b5630c4e+042d43a120,g67b6fd64d1+c0248a1c13,g6ea0df0560+042d43a120,g78460c75b0+2f9a1b4bcd,g786e29fd12+cf7ec2a62a,g7b71ed6315+fcb1d3bbc8,g87b7deb4dc+7fa294d175,g8852436030+40f6ec51d1,g89139ef638+c0248a1c13,g9125e01d80+fcb1d3bbc8,g94187f82dc+042d43a120,g989de1cb63+c0248a1c13,g9f33ca652e+da0da5ecef,g9f7030ddb1+682810b470,ga2b97cdc51+042d43a120,gabe3b4be73+1e0a283bba,gabf8522325+83c19109ce,gb1101e3267+5921e058d2,gb58c049af0+f03b321e39,gb89ab40317+c0248a1c13,gcf25f946ba+40f6ec51d1,gd6cbbdb0b4+d9e8db455e,gd9a9a58781+fcb1d3bbc8,gdabf7e867e+a3799d3da4,gde0f65d7ad+4a3db72839,ge278dab8ac+4ce6343b44,ge410e46f29+c0248a1c13,gf67bdafdda+c0248a1c13,gfe06eef73a+95f9f0e40c,v29.0.0.rc3
LSST Data Management Base Package
|
Classes | |
class | GetDcrTemplateConnections |
class | GetTemplateConnections |
Functions | |
run (self, *, coaddExposureHandles, bbox, wcs, dataIds, physical_filter) | |
_makeExposureCatalog (self, exposureRefs, dataIds) | |
_merge (self, maskedImages, bbox, wcs) | |
_makePsf (self, template, catalog, wcs) | |
checkPatchList (self, patchList) | |
getDcrModel (self, patchList, coaddRefs, visitInfo) | |
_selectDataRef (coaddRef, tract, patch) | |
Variables | |
detectorPolygon = geom.Box2D(bbox) | |
int | overlappingArea = 0 |
coaddExposures = collections.defaultdict(list) | |
dataIds = collections.defaultdict(list) | |
dataId = coaddRef.dataId | |
patchWcs = skymap[dataId['tract']].getWcs() | |
patchBBox = skymap[dataId['tract']][dataId['patch']].getOuterBBox() | |
patchCorners = patchWcs.pixelToSky(geom.Box2D(patchBBox).getCorners()) | |
patchPolygon = afwGeom.Polygon(wcs.skyToPixel(patchCorners)) | |
patchList = dict() | |
|
protected |
Make an exposure catalog for one tract. Parameters ---------- exposureRefs : `list` of [`lsst.daf.butler.DeferredDatasetHandle` of \ `lsst.afw.image.Exposure`] Exposures to include in the catalog. dataIds : `list` [`lsst.daf.butler.DataCoordinate`] Data ids of each of the included exposures; must have "tract" and "patch" entries. Returns ------- images : `dict` [`lsst.afw.image.MaskedImage`] MaskedImages of each of the input exposures, for warping. catalog : `lsst.afw.table.ExposureCatalog` Catalog of metadata for each exposure totalBox : `lsst.geom.Box2I` The union of the bounding boxes of all the input exposures.
Definition at line 366 of file getTemplate.py.
|
protected |
Return a PSF containing the PSF at each of the input regions. Note that although this includes all the exposures from the catalog, the PSF knows which part of the template the inputs came from, so when evaluated at a given position it will not include inputs that never went in to those pixels. Parameters ---------- template : `lsst.afw.image.Exposure` Generated template the PSF is for. catalog : `lsst.afw.table.ExposureCatalog` Catalog of exposures that went into the template that contains all of the input PSFs. wcs : `lsst.afw.geom.SkyWcs` WCS of the template, to warp the PSFs to. Returns ------- coaddPsf : `lsst.meas.algorithms.CoaddPsf` The meta-psf constructed from all of the input catalogs.
Definition at line 483 of file getTemplate.py.
|
protected |
Merge the images that came from one tract into one larger image, ignoring NaN pixels and non-finite variance pixels from individual exposures. Parameters ---------- maskedImages : `dict` [`lsst.afw.image.MaskedImage` or `lsst.afw.image.Exposure`] Images to be merged into one larger bounding box. bbox : `lsst.geom.Box2I` Bounding box defining the image to merge into. wcs : `lsst.afw.geom.SkyWcs` WCS of all of the input images to set on the output image. Returns ------- merged : `lsst.afw.image.MaskedImage` Merged image with all of the inputs at their respective bbox positions. count : `int` Count of the number of good pixels (those with positive weights) in the merged image. included : `list` [`int`] List of indexes of patches that were included in the merged result, to be used to trim the exposure catalog.
Definition at line 411 of file getTemplate.py.
|
protected |
Definition at line 732 of file getTemplate.py.
lsst.ip.diffim.getTemplate.checkPatchList | ( | self, | |
patchList ) |
Check that all of the DcrModel subfilters are present for each patch. Parameters ---------- patchList : `dict` Dict of the patches containing valid data for each tract. Raises ------ RuntimeError If the number of exposures found for a patch does not match the number of subfilters.
Definition at line 679 of file getTemplate.py.
lsst.ip.diffim.getTemplate.getDcrModel | ( | self, | |
patchList, | |||
coaddRefs, | |||
visitInfo ) |
Build DCR-matched coadds from a list of exposure references. Parameters ---------- patchList : `dict` Dict of the patches containing valid data for each tract. coaddRefs : `list` [`lsst.daf.butler.DeferredDatasetHandle`] Data references to `~lsst.afw.image.Exposure` representing DcrModels that overlap the detector. visitInfo : `lsst.afw.image.VisitInfo` Metadata for the science image. Returns ------- coaddExposures : `list` [`lsst.afw.image.Exposure`] Coadd exposures that overlap the detector.
Definition at line 700 of file getTemplate.py.
lsst.ip.diffim.getTemplate.run | ( | self, | |
* | , | ||
coaddExposureHandles, | |||
bbox, | |||
wcs, | |||
dataIds, | |||
physical_filter ) |
Warp coadds from multiple tracts and patches to form a template to subtract from a science image. Tract and patch overlap regions are combined by a variance-weighted average, and the variance planes are combined with the same weights, not added in quadrature; the overlap regions are not statistically independent, because they're derived from the same original data. The PSF on the template is created by combining the CoaddPsf on each template image into a meta-CoaddPsf. Parameters ---------- coaddExposureHandles : `dict` [`int`, `list` of \ [`lsst.daf.butler.DeferredDatasetHandle` of \ `lsst.afw.image.Exposure`]] Coadds to be mosaicked, indexed on tract id. bbox : `lsst.geom.Box2I` Template Bounding box of the detector geometry onto which to resample the ``coaddExposureHandles``. Modified in-place to include the template border. wcs : `lsst.afw.geom.SkyWcs` Template WCS onto which to resample the ``coaddExposureHandles``. dataIds : `dict` [`int`, `list` [`lsst.daf.butler.DataCoordinate`]] Record of the tract and patch of each coaddExposure, indexed on tract id. physical_filter : `str` Physical filter of the science image. Returns ------- result : `lsst.pipe.base.Struct` A struct with attributes: ``template`` A template coadd exposure assembled out of patches (`lsst.afw.image.ExposureF`). Raises ------ NoWorkFound If no coadds are found with sufficient un-masked pixels.
Definition at line 229 of file getTemplate.py.
lsst.ip.diffim.getTemplate.coaddExposures = collections.defaultdict(list) |
Definition at line 207 of file getTemplate.py.
lsst.ip.diffim.getTemplate.dataId = coaddRef.dataId |
Definition at line 211 of file getTemplate.py.
lsst.ip.diffim.getTemplate.dataIds = collections.defaultdict(list) |
Definition at line 208 of file getTemplate.py.
lsst.ip.diffim.getTemplate.detectorPolygon = geom.Box2D(bbox) |
Definition at line 205 of file getTemplate.py.
int lsst.ip.diffim.getTemplate.overlappingArea = 0 |
Definition at line 206 of file getTemplate.py.
Definition at line 213 of file getTemplate.py.
lsst.ip.diffim.getTemplate.patchCorners = patchWcs.pixelToSky(geom.Box2D(patchBBox).getCorners()) |
Definition at line 214 of file getTemplate.py.
lsst.ip.diffim.getTemplate.patchList = dict() |
Definition at line 653 of file getTemplate.py.
lsst.ip.diffim.getTemplate.patchPolygon = afwGeom.Polygon(wcs.skyToPixel(patchCorners)) |
Definition at line 215 of file getTemplate.py.
lsst.ip.diffim.getTemplate.patchWcs = skymap[dataId['tract']].getWcs() |
Definition at line 212 of file getTemplate.py.