LSST Applications g044012fb7c+6976b5ec80,g04a91732dc+88a5fc122b,g07dc498a13+7e3c5f68a2,g114c6a66ad+09472d7a76,g1409bbee79+7e3c5f68a2,g1a7e361dbc+7e3c5f68a2,g1fd858c14a+3a43eabc0e,g35bb328faa+fcb1d3bbc8,g3bd4b5ce2c+2647bb081c,g4e0f332c67+5d362be553,g53246c7159+fcb1d3bbc8,g5477a8d5ce+b19c77c7ae,g58d0cdf3ff+4a2e102ff8,g60b5630c4e+09472d7a76,g623d845a50+09472d7a76,g6f0c2978f1+fcf1c0bcd6,g71fabbc107+09472d7a76,g75b6c65c88+d0b1dc44cc,g78460c75b0+2f9a1b4bcd,g786e29fd12+cf7ec2a62a,g7b71ed6315+fcb1d3bbc8,g8852436030+349c7e81d4,g89139ef638+7e3c5f68a2,g9125e01d80+fcb1d3bbc8,g95236ca021+f7a31438ed,g989de1cb63+7e3c5f68a2,g9f33ca652e+f17d666fbc,gaaedd4e678+7e3c5f68a2,gabe3b4be73+1e0a283bba,gb1101e3267+f870f33517,gb58c049af0+f03b321e39,gc99c83e5f0+76d20ab76d,gcf25f946ba+349c7e81d4,gd0fa69b896+f3a65fa83c,gd6cbbdb0b4+c8606af20c,gde0f65d7ad+5bd27d919f,ge278dab8ac+932305ba37,gfba249425e+fcb1d3bbc8,w.2025.07
LSST Data Management Base Package
|
Public Member Functions | |
__init__ (self, *args, **kwargs) | |
runQuantum (self, butlerQC, inputRefs, outputRefs) | |
run (self, calExps, calBkgs, skyFrames, camera) | |
Static Public Attributes | |
ConfigClass = SkyCorrectionConfig | |
Protected Member Functions | |
_restoreOriginalBackgroundRefineMask (self, calExps, calBkgs) | |
_undoInitialBackground (self, calExps, calBkgs, initialBackgroundIndex) | |
_subtractVisitBackground (self, calExps, calBkgs, camera, config) | |
_subtractDetectorBackground (self, calExp, bgModel) | |
_subtractSkyFrame (self, calExps, skyFrames, calBkgs) | |
_binAndMosaic (self, exposures, camera, binning, ids=None, refExps=None) | |
Static Protected Attributes | |
str | _DefaultName = "skyCorr" |
Perform a full focal plane sky correction.
Definition at line 224 of file skyCorrection.py.
lsst.pipe.tasks.skyCorrection.SkyCorrectionTask.__init__ | ( | self, | |
* | args, | ||
** | kwargs ) |
Definition at line 230 of file skyCorrection.py.
|
protected |
Bin input exposures and mosaic across the entire focal plane. Input exposures are binned and then mosaicked at the position of the detector in the focal plane of the camera. Parameters ---------- exposures : `list` Detector level list of either calexp `ExposureF` types or calexpBackground `BackgroundList` types. camera : `lsst.afw.cameraGeom.Camera` Camera matching the input data to process. binning : `int` Binning size to be applied to input images. ids : `list` [`int`], optional List of detector ids to iterate over. refExps : `list` [`lsst.afw.image.ExposureF`], optional If supplied, mask planes from these reference images will be used. Returns ------- mosaicImage : `lsst.afw.image.ExposureF` Mosaicked full focal plane image.
Definition at line 592 of file skyCorrection.py.
|
protected |
Restore original background to each calexp and invert the related background model; optionally refine the mask plane. The original visit-level background is restored to each calibrated exposure and the existing background model is inverted in-place. If doMaskObjects is True, the mask map associated with the exposure will be iteratively updated (over nIter loops) by re-estimating the background each iteration and redetecting footprints. The background model modified in-place in this method will comprise the first N elements of the skyCorr dataset type, i.e., these N elements are the inverse of the calexpBackground model. All subsequent elements appended to skyCorr will be additive such that, when skyCorr is subtracted from a calexp, the net result will be to undo the initial per-detector background solution and then apply the skyCorr model thereafter. Adding skyCorr to a calexpBackground will effectively negate the calexpBackground, returning only the additive background components of the skyCorr background model. Parameters ---------- calExps : `lsst.afw.image.ExposureF` Detector level calexp images to process. calBkgs : `lsst.afw.math.BackgroundList` Detector level background lists associated with the calexps. Returns ------- calExps : `lsst.afw.image.ExposureF` The calexps with the originally subtracted background restored. skyCorrBases : `lsst.afw.math.BackgroundList` The inverted original background models; the genesis for skyCorrs.
Definition at line 351 of file skyCorrection.py.
|
protected |
Generate CCD background model and subtract from image. Translate the full focal plane background into CCD coordinates and subtract from the original science exposure image. Parameters ---------- calExp : `lsst.afw.image.ExposureF` Exposure to subtract the background model from. bgModel : `lsst.pipe.tasks.background.FocalPlaneBackground` Full focal plane camera-level background model. Returns ------- calExp : `lsst.afw.image.ExposureF` Background subtracted input exposure. calBkgElement : `lsst.afw.math.BackgroundList` Detector level realization of the full focal plane bg model.
Definition at line 524 of file skyCorrection.py.
|
protected |
Determine the full focal plane sky frame scale factor relative to an input list of calibrated exposures and subtract. This method measures the sky frame scale on all inputs, resulting in values equal to the background method solveScales(). The sky frame is then subtracted as in subtractSkyFrame() using the appropriate scale. Input calExps and calBkgs are updated in-place, returning sky frame subtracted calExps and sky frame updated calBkgs, respectively. Parameters ---------- calExps : `list` [`lsst.afw.image.ExposureF`] Calibrated exposures to be background subtracted. skyFrames : `list` [`lsst.afw.image.ExposureF`] Sky frame calibration data for the input detectors. calBkgs : `list` [`lsst.afw.math.BackgroundList`] Background lists associated with the input calibrated exposures. Returns ------- scale : `float` Scale factor applied to the sky frame.
Definition at line 551 of file skyCorrection.py.
|
protected |
Perform a full focal-plane background subtraction for a visit. Generate a full focal plane background model, binning all masked detectors into bins of [bgModelN.xSize, bgModelN.ySize]. After, subtract the resultant background model (translated back into CCD coordinates) from the original detector exposure. Return a list of background subtracted images and a list of full focal plane background parameters. Parameters ---------- calExps : `list` [`lsst.afw.image.ExposureF`] Calibrated exposures to be background subtracted. calBkgs : `list` [`lsst.afw.math.BackgroundList`] Background lists associated with the input calibrated exposures. camera : `lsst.afw.cameraGeom.Camera` Camera description. config : `lsst.pipe.tasks.background.FocalPlaneBackgroundConfig` Configuration to use for background subtraction. Returns ------- calExps : `list` [`lsst.afw.image.maskedImage.MaskedImageF`] Background subtracted exposures for creating a focal plane image. calBkgs : `list` [`lsst.afw.math.BackgroundList`] Updated background lists with a visit-level model appended.
Definition at line 441 of file skyCorrection.py.
|
protected |
Undo the initial background subtraction (bgModel1) after sky frame subtraction. Parameters ---------- calExps : `list` [`lsst.afw.image.ExposureF`] Calibrated exposures to be background subtracted. calBkgs : `list` [`lsst.afw.math.BackgroundList`] Background lists associated with the input calibrated exposures. initialBackgroundIndex : `int` Index of the initial background (bgModel1) in the background list. Notes ----- Inputs are modified in-place.
Definition at line 410 of file skyCorrection.py.
lsst.pipe.tasks.skyCorrection.SkyCorrectionTask.run | ( | self, | |
calExps, | |||
calBkgs, | |||
skyFrames, | |||
camera ) |
Perform sky correction on a visit. The original visit-level background is first restored to the calibrated exposure and the existing background model is inverted in-place. If doMaskObjects is True, the mask map associated with this exposure will be iteratively updated (over nIter loops) by re-estimating the background each iteration and redetecting footprints. An initial full focal plane sky subtraction (bgModel1) will take place prior to scaling and subtracting the sky frame. If doSky is True, the sky frame will be scaled to the flux in the input visit. If doBgModel2 is True, a final full focal plane sky subtraction will take place after the sky frame has been subtracted. The first N elements of the returned skyCorr will consist of inverted elements of the calexpBackground model (i.e., subtractive). All subsequent elements appended to skyCorr thereafter will be additive such that, when skyCorr is subtracted from a calexp, the net result will be to undo the initial per-detector background solution and then apply the skyCorr model thereafter. Adding skyCorr to a calexpBackground will effectively negate the calexpBackground, returning only the additive background components of the skyCorr background model. Parameters ---------- calExps : `list` [`lsst.afw.image.ExposureF`] Detector calibrated exposure images for the visit. calBkgs : `list` [`lsst.afw.math.BackgroundList`] Detector background lists matching the calibrated exposures. skyFrames : `list` [`lsst.afw.image.ExposureF`] Sky frame calibration data for the input detectors. camera : `lsst.afw.cameraGeom.Camera` Camera matching the input data to process. Returns ------- results : `Struct` containing: skyFrameScale : `float` Scale factor applied to the sky frame. skyCorr : `list` [`lsst.afw.math.BackgroundList`] Detector-level sky correction background lists. calExpMosaic : `lsst.afw.image.ExposureF` Visit-level mosaic of the sky corrected data, binned. Analogous to `calexp - skyCorr`. calBkgMosaic : `lsst.afw.image.ExposureF` Visit-level mosaic of the sky correction background, binned. Analogous to `calexpBackground + skyCorr`.
Definition at line 261 of file skyCorrection.py.
lsst.pipe.tasks.skyCorrection.SkyCorrectionTask.runQuantum | ( | self, | |
butlerQC, | |||
inputRefs, | |||
outputRefs ) |
Definition at line 235 of file skyCorrection.py.
|
staticprotected |
Definition at line 228 of file skyCorrection.py.
|
static |
Definition at line 227 of file skyCorrection.py.