LSST Applications 27.0.0,g0265f82a02+469cd937ee,g02d81e74bb+21ad69e7e1,g1470d8bcf6+cbe83ee85a,g2079a07aa2+e67c6346a6,g212a7c68fe+04a9158687,g2305ad1205+94392ce272,g295015adf3+81dd352a9d,g2bbee38e9b+469cd937ee,g337abbeb29+469cd937ee,g3939d97d7f+72a9f7b576,g487adcacf7+71499e7cba,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+df404f777f,g5a732f18d5+be83d3ecdb,g64a986408d+21ad69e7e1,g858d7b2824+21ad69e7e1,g8a8a8dda67+a6fc98d2e7,g99cad8db69+f62e5b0af5,g9ddcbc5298+d4bad12328,ga1e77700b3+9c366c4306,ga8c6da7877+71e4819109,gb0e22166c9+25ba2f69a1,gb6a65358fc+469cd937ee,gbb8dafda3b+69d3c0e320,gc07e1c2157+a98bf949bb,gc120e1dc64+615ec43309,gc28159a63d+469cd937ee,gcf0d15dbbd+72a9f7b576,gdaeeff99f8+a38ce5ea23,ge6526c86ff+3a7c1ac5f1,ge79ae78c31+469cd937ee,gee10cc3b42+a6fc98d2e7,gf1cff7945b+21ad69e7e1,gfbcc870c63+9a11dc8c8f
LSST Data Management Base Package
|
Public Member Functions | |
__init__ (self, initInputs=None, *args, **kwargs) | |
runQuantum (self, butlerQC, inputRefs, outputRefs) | |
run (self, inputExposure, refObjLoader=None, dataId=None, skyCorr=None) | |
applySkyCorr (self, calexp, skyCorr) | |
extractStamps (self, inputExposure, filterName="phot_g_mean", refObjLoader=None, inputBrightStarStamps=None) | |
warpStamps (self, stamps, pixCenters) | |
setModelStamp (self) | |
Public Attributes | |
modelStampSize | |
modelCenter | |
Static Public Attributes | |
ConfigClass = ProcessBrightStarsConfig | |
Protected Member Functions | |
_getCutout (self, inputExposure, Point2D coordPix, list[int] stampSize) | |
_replaceSecondaryFootprints (self, stamp, coordPix, objectId, find="DETECTED", replace="BAD") | |
Static Protected Attributes | |
str | _DefaultName = "processBrightStars" |
Extract bright star cutouts; normalize and warp to the same pixel grid. This task is used to extract, process, and store small image cut-outs (or "postage stamps") around bright stars. It relies on three methods, called in succession: `extractStamps` Find bright stars within the exposure using a reference catalog and extract a stamp centered on each. `warpStamps` Shift and warp each stamp to remove optical distortions and sample all stars on the same pixel grid. `measureAndNormalize` Compute the flux of an object in an annulus and normalize it. This is required to normalize each bright star stamp as their central pixels are likely saturated and/or contain ghosts, and cannot be used.
Definition at line 165 of file processBrightStars.py.
lsst.pipe.tasks.processBrightStars.ProcessBrightStarsTask.__init__ | ( | self, | |
initInputs = None, | |||
* | args, | ||
** | kwargs ) |
Definition at line 187 of file processBrightStars.py.
|
protected |
Get a cutout from an input exposure, handling edge cases. Generate a cutout from an input exposure centered on a given position and with a given size. If any part of the cutout is outside the input exposure bounding box, the cutout is padded with NaNs. Parameters ---------- inputExposure : `~lsst.afw.image.ExposureF` The image to extract bright star stamps from. coordPix : `~lsst.geom.Point2D` Center of the cutout in pixel space. stampSize : `list` [`int`] Size of the cutout, in pixels. Returns ------- stamp : `~lsst.afw.image.ExposureF` or `None` The cutout, or `None` if the cutout is entirely outside the input exposure bounding box. Notes ----- This method is a short-term workaround until DM-40042 is implemented. At that point, it should be replaced by a call to the Exposure method ``getCutout``, which will handle edge cases automatically.
Definition at line 415 of file processBrightStars.py.
|
protected |
Replace all secondary footprints in a stamp with another mask flag. This method identifies all secondary footprints in a stamp as those whose ``find`` footprints do not overlap the given pixel coordinates. If then sets these secondary footprints to the ``replace`` flag. Parameters ---------- stamp : `~lsst.afw.image.ExposureF` The postage stamp to modify. coordPix : `~lsst.geom.Point2D` The pixel coordinates of the central primary object. objectId : `int` The unique identifier of the central primary object. find : `str`, optional The mask plane to use to identify secondary footprints. replace : `str`, optional The mask plane to set secondary footprints to. Notes ----- This method modifies the input ``stamp`` in-place.
Definition at line 466 of file processBrightStars.py.
lsst.pipe.tasks.processBrightStars.ProcessBrightStarsTask.applySkyCorr | ( | self, | |
calexp, | |||
skyCorr ) |
Apply sky correction to the input exposure. Sky corrections can be generated using the `~lsst.pipe.tasks.skyCorrection.SkyCorrectionTask`. As the sky model generated via that task extends over the full focal plane, this should produce a more optimal sky subtraction solution. Parameters ---------- calexp : `~lsst.afw.image.Exposure` or `~lsst.afw.image.MaskedImage` Calibrated exposure to correct. skyCorr : `~lsst.afw.math.backgroundList.BackgroundList` Full focal plane sky correction from ``SkyCorrectionTask``. Notes ----- This method modifies the input ``calexp`` in-place.
Definition at line 298 of file processBrightStars.py.
lsst.pipe.tasks.processBrightStars.ProcessBrightStarsTask.extractStamps | ( | self, | |
inputExposure, | |||
filterName = "phot_g_mean", | |||
refObjLoader = None, | |||
inputBrightStarStamps = None ) |
Identify the positions of bright stars within an input exposure using a reference catalog and extract them. Parameters ---------- inputExposure : `~lsst.afw.image.ExposureF` The image to extract bright star stamps from. filterName : `str`, optional Name of the camera filter to use for reference catalog filtering. refObjLoader : `~lsst.meas.algorithms.ReferenceObjectLoader`, optional Loader to find objects within a reference catalog. inputBrightStarStamps: `~lsst.meas.algorithms.brightStarStamps.BrightStarStamps`, optional Provides information about the stars that have already been extracted from the inputExposure in other steps of the pipeline. For example, this is used in the `SubtractBrightStarsTask` to avoid extracting stars that already have been extracted when running `ProcessBrightStarsTask` to produce brightStarStamps. Returns ------- result : `~lsst.pipe.base.Struct` Results as a struct with attributes: ``starStamps`` Postage stamps (`list`). ``pixCenters`` Corresponding coords to each star's center, in pixels (`list`). ``gMags`` Corresponding (Gaia) G magnitudes (`list`). ``gaiaIds`` Corresponding unique Gaia identifiers (`np.ndarray`).
Definition at line 321 of file processBrightStars.py.
lsst.pipe.tasks.processBrightStars.ProcessBrightStarsTask.run | ( | self, | |
inputExposure, | |||
refObjLoader = None, | |||
dataId = None, | |||
skyCorr = None ) |
Identify bright stars within an exposure using a reference catalog, extract stamps around each, then preprocess them. Bright star preprocessing steps are: shifting, warping and potentially rotating them to the same pixel grid; computing their annular flux, and; normalizing them. Parameters ---------- inputExposure : `~lsst.afw.image.ExposureF` The image from which bright star stamps should be extracted. refObjLoader : `~lsst.meas.algorithms.ReferenceObjectLoader`, optional Loader to find objects within a reference catalog. dataId : `dict` or `~lsst.daf.butler.DataCoordinate` The dataId of the exposure (including detector) that bright stars should be extracted from. skyCorr : `~lsst.afw.math.backgroundList.BackgroundList`, optional Full focal plane sky correction obtained by `SkyCorrectionTask`. Returns ------- brightStarResults : `~lsst.pipe.base.Struct` Results as a struct with attributes: ``brightStarStamps`` (`~lsst.meas.algorithms.brightStarStamps.BrightStarStamps`)
Definition at line 206 of file processBrightStars.py.
lsst.pipe.tasks.processBrightStars.ProcessBrightStarsTask.runQuantum | ( | self, | |
butlerQC, | |||
inputRefs, | |||
outputRefs ) |
Definition at line 191 of file processBrightStars.py.
lsst.pipe.tasks.processBrightStars.ProcessBrightStarsTask.setModelStamp | ( | self | ) |
Compute (model) stamp size depending on provided buffer value.
Definition at line 611 of file processBrightStars.py.
lsst.pipe.tasks.processBrightStars.ProcessBrightStarsTask.warpStamps | ( | self, | |
stamps, | |||
pixCenters ) |
Warps and shifts all given stamps so they are sampled on the same pixel grid and centered on the central pixel. This includes rotating the stamp depending on detector orientation. Parameters ---------- stamps : `Sequence` [`~lsst.afw.image.ExposureF`] Image cutouts centered on a single object. pixCenters : `Sequence` [`~lsst.geom.Point2D`] Positions of each object's center (from the refCat) in pixels. Returns ------- result : `~lsst.pipe.base.Struct` Results as a struct with attributes: ``warpedStars`` Stamps of warped stars. (`list` [`~lsst.afw.image.MaskedImage`]) ``warpTransforms`` The corresponding Transform from the initial star stamp to the common model grid. (`list` [`~lsst.afw.geom.TransformPoint2ToPoint2`]) ``xy0s`` Coordinates of the bottom-left pixels of each stamp, before rotation. (`list` [`~lsst.geom.Point2I`]) ``nb90Rots`` The number of 90 degrees rotations required to compensate for detector orientation. (`int`)
Definition at line 515 of file processBrightStars.py.
|
staticprotected |
Definition at line 185 of file processBrightStars.py.
|
static |
Definition at line 184 of file processBrightStars.py.
lsst.pipe.tasks.processBrightStars.ProcessBrightStarsTask.modelCenter |
Definition at line 623 of file processBrightStars.py.
lsst.pipe.tasks.processBrightStars.ProcessBrightStarsTask.modelStampSize |
Definition at line 613 of file processBrightStars.py.