LSST Applications g0f08755f38+9c285cab97,g1635faa6d4+13f3999e92,g1653933729+a8ce1bb630,g1a0ca8cf93+bf6eb00ceb,g28da252d5a+0829b12dee,g29321ee8c0+5700dc9eac,g2bbee38e9b+9634bc57db,g2bc492864f+9634bc57db,g2cdde0e794+c2c89b37c4,g3156d2b45e+41e33cbcdc,g347aa1857d+9634bc57db,g35bb328faa+a8ce1bb630,g3a166c0a6a+9634bc57db,g3e281a1b8c+9f2c4e2fc3,g414038480c+077ccc18e7,g41af890bb2+fde0dd39b6,g5fbc88fb19+17cd334064,g781aacb6e4+a8ce1bb630,g80478fca09+55a9465950,g82479be7b0+d730eedb7d,g858d7b2824+9c285cab97,g9125e01d80+a8ce1bb630,g9726552aa6+10f999ec6a,ga5288a1d22+2a84bb7594,gacf8899fa4+c69c5206e8,gae0086650b+a8ce1bb630,gb58c049af0+d64f4d3760,gc28159a63d+9634bc57db,gcf0d15dbbd+4b7d09cae4,gda3e153d99+9c285cab97,gda6a2b7d83+4b7d09cae4,gdaeeff99f8+1711a396fd,ge2409df99d+5e831397f4,ge79ae78c31+9634bc57db,gf0baf85859+147a0692ba,gf3967379c6+41c94011de,gf3fb38a9a8+8f07a9901b,gfb92a5be7c+9c285cab97,w.2024.46
LSST Data Management Base Package
|
Classes | |
class | GetDcrTemplateConnections |
class | GetTemplateConnections |
Functions | |
run (self, coaddExposures, bbox, wcs, dataIds, physical_filter) | |
_makeExposureCatalog (self, exposures, 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(inputs['bbox']) | |
int | overlappingArea = 0 |
coaddExposures = collections.defaultdict(list) | |
dataIds = collections.defaultdict(list) | |
skymap = inputs['skyMap'] | |
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)) | |
list | coaddExposureRefList = [] |
patchList = dict() | |
|
protected |
Make an exposure catalog for one tract. Parameters ---------- exposures : `list` [`lsst.afw.image.Exposuref`] 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 : `list` [`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 313 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 403 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 : `list` [`lsst.afw.image.MaskedImage`] 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.
Definition at line 353 of file getTemplate.py.
|
protected |
Definition at line 620 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 567 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 588 of file getTemplate.py.
lsst.ip.diffim.getTemplate.run | ( | self, | |
coaddExposures, | |||
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 ---------- coaddExposures : `dict` [`int`, `list` [`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 ``coaddExposures``. Modified in-place to include the template border. wcs : `lsst.afw.geom.SkyWcs` Template WCS onto which to resample the ``coaddExposures``. 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 202 of file getTemplate.py.
list lsst.ip.diffim.getTemplate.coaddExposureRefList = [] |
Definition at line 538 of file getTemplate.py.
lsst.ip.diffim.getTemplate.coaddExposures = collections.defaultdict(list) |
Definition at line 179 of file getTemplate.py.
lsst.ip.diffim.getTemplate.dataId = coaddRef.dataId |
Definition at line 184 of file getTemplate.py.
Definition at line 180 of file getTemplate.py.
lsst.ip.diffim.getTemplate.detectorPolygon = geom.Box2D(inputs['bbox']) |
Definition at line 177 of file getTemplate.py.
int lsst.ip.diffim.getTemplate.overlappingArea = 0 |
Definition at line 178 of file getTemplate.py.
Definition at line 186 of file getTemplate.py.
lsst.ip.diffim.getTemplate.patchCorners = patchWcs.pixelToSky(geom.Box2D(patchBBox).getCorners()) |
Definition at line 187 of file getTemplate.py.
lsst.ip.diffim.getTemplate.patchList = dict() |
Definition at line 540 of file getTemplate.py.
lsst.ip.diffim.getTemplate.patchPolygon = afwGeom.Polygon(wcs.skyToPixel(patchCorners)) |
Definition at line 188 of file getTemplate.py.
Definition at line 185 of file getTemplate.py.
lsst.ip.diffim.getTemplate.skymap = inputs['skyMap'] |
Definition at line 182 of file getTemplate.py.