LSST Applications
21.0.0-147-g0e635eb1+1acddb5be5,22.0.0+052faf71bd,22.0.0+1ea9a8b2b2,22.0.0+6312710a6c,22.0.0+729191ecac,22.0.0+7589c3a021,22.0.0+9f079a9461,22.0.1-1-g7d6de66+b8044ec9de,22.0.1-1-g87000a6+536b1ee016,22.0.1-1-g8e32f31+6312710a6c,22.0.1-10-gd060f87+016f7cdc03,22.0.1-12-g9c3108e+df145f6f68,22.0.1-16-g314fa6d+c825727ab8,22.0.1-19-g93a5c75+d23f2fb6d8,22.0.1-19-gb93eaa13+aab3ef7709,22.0.1-2-g8ef0a89+b8044ec9de,22.0.1-2-g92698f7+9f079a9461,22.0.1-2-ga9b0f51+052faf71bd,22.0.1-2-gac51dbf+052faf71bd,22.0.1-2-gb66926d+6312710a6c,22.0.1-2-gcb770ba+09e3807989,22.0.1-20-g32debb5+b8044ec9de,22.0.1-23-gc2439a9a+fb0756638e,22.0.1-3-g496fd5d+09117f784f,22.0.1-3-g59f966b+1e6ba2c031,22.0.1-3-g849a1b8+f8b568069f,22.0.1-3-gaaec9c0+c5c846a8b1,22.0.1-32-g5ddfab5d3+60ce4897b0,22.0.1-4-g037fbe1+64e601228d,22.0.1-4-g8623105+b8044ec9de,22.0.1-5-g096abc9+d18c45d440,22.0.1-5-g15c806e+57f5c03693,22.0.1-7-gba73697+57f5c03693,master-g6e05de7fdc+c1283a92b8,master-g72cdda8301+729191ecac,w.2021.39
LSST Data Management Base Package
|
Public Member Functions | |
def | runQuantum (self, butlerQC, inputRefs, outputRefs) |
def | __init__ (self, *args, **kwargs) |
def | batchWallTime (cls, time, parsedCmd, numCores) |
def | runDataRef (self, expRef) |
def | focalPlaneBackground (self, camera, pool, dataIdList, config) |
def | focalPlaneBackgroundRun (self, camera, cacheExposures, idList, config) |
def | run (self, calExpArray, calBkgArray, skyCalibs, camera) |
def | loadImage (self, cache, dataId) |
def | loadImageRun (self, calExp, calExpBkg) |
def | measureSkyFrame (self, cache, dataId) |
def | subtractSkyFrame (self, cache, dataId, scale) |
def | accumulateModel (self, cache, data) |
def | subtractModel (self, cache, dataId, bgModel) |
def | subtractModelRun (self, exposure, bgModel) |
def | realiseModel (self, cache, dataId, bgModel) |
def | collectBinnedImage (self, exposure, image) |
def | collect (self, cache) |
def | collectOriginal (self, cache, dataId) |
def | collectSky (self, cache, dataId) |
def | collectMask (self, cache, dataId) |
def | write (self, cache, dataId) |
def | parseAndRun (cls, *args, **kwargs) |
def | parseAndSubmit (cls, args=None, **kwargs) |
def | batchCommand (cls, args) |
Return command to run CmdLineTask. More... | |
def | logOperation (self, operation, catch=False, trace=True) |
Provide a context manager for logging an operation. More... | |
Static Public Attributes | |
ConfigClass = SkyCorrectionConfig | |
Correct sky over entire focal plane
Definition at line 197 of file skyCorrection.py.
def lsst.pipe.drivers.skyCorrection.SkyCorrectionTask.__init__ | ( | self, | |
* | args, | ||
** | kwargs | ||
) |
Definition at line 220 of file skyCorrection.py.
def lsst.pipe.drivers.skyCorrection.SkyCorrectionTask.accumulateModel | ( | self, | |
cache, | |||
data | |||
) |
Fit background model for CCD This method runs on the slave nodes. Parameters ---------- cache : `lsst.pipe.base.Struct` Process pool cache. data : `lsst.pipe.base.Struct` Data identifier, with `dataId` (data identifier) and `bgModel` (background model) elements. Returns ------- bgModel : `lsst.pipe.drivers.background.FocalPlaneBackground` Background model.
Definition at line 621 of file skyCorrection.py.
|
inherited |
Return command to run CmdLineTask.
@param cls: Class @param args: Parsed batch job arguments (from BatchArgumentParser)
Definition at line 476 of file parallel.py.
def lsst.pipe.drivers.skyCorrection.SkyCorrectionTask.batchWallTime | ( | cls, | |
time, | |||
parsedCmd, | |||
numCores | |||
) |
Return walltime request for batch job Subclasses should override if the walltime should be calculated differently (e.g., addition of some serial time). Parameters ---------- time : `float` Requested time per iteration. parsedCmd : `argparse.Namespace` Results of argument parsing. numCores : `int` Number of cores.
Reimplemented from lsst.ctrl.pool.parallel.BatchCmdLineTask.
Definition at line 236 of file skyCorrection.py.
def lsst.pipe.drivers.skyCorrection.SkyCorrectionTask.collect | ( | self, | |
cache | |||
) |
Collect exposure for potential visualisation This method runs on the slave nodes. Parameters ---------- cache : `lsst.pipe.base.Struct` Process pool cache. Returns ------- detId : `int` Detector identifier. image : `lsst.afw.image.MaskedImage` Binned image.
Definition at line 752 of file skyCorrection.py.
def lsst.pipe.drivers.skyCorrection.SkyCorrectionTask.collectBinnedImage | ( | self, | |
exposure, | |||
image | |||
) |
Return the binned image required for visualization This method just helps to cut down on boilerplate. Parameters ---------- image : `lsst.afw.image.MaskedImage` Image to go into visualisation. Returns ------- detId : `int` Detector identifier. image : `lsst.afw.image.MaskedImage` Binned image.
Definition at line 733 of file skyCorrection.py.
def lsst.pipe.drivers.skyCorrection.SkyCorrectionTask.collectMask | ( | self, | |
cache, | |||
dataId | |||
) |
Collect mask for visualisation This method runs on the slave nodes. Parameters ---------- cache : `lsst.pipe.base.Struct` Process pool cache. dataId : `dict` Data identifier. Returns ------- detId : `int` Detector identifier. image : `lsst.afw.image.Image` Binned image.
Definition at line 814 of file skyCorrection.py.
def lsst.pipe.drivers.skyCorrection.SkyCorrectionTask.collectOriginal | ( | self, | |
cache, | |||
dataId | |||
) |
Collect original image for visualisation This method runs on the slave nodes. Parameters ---------- cache : `lsst.pipe.base.Struct` Process pool cache. dataId : `dict` Data identifier. Returns ------- detId : `int` Detector identifier. image : `lsst.afw.image.MaskedImage` Binned image.
Definition at line 771 of file skyCorrection.py.
def lsst.pipe.drivers.skyCorrection.SkyCorrectionTask.collectSky | ( | self, | |
cache, | |||
dataId | |||
) |
Collect original image for visualisation This method runs on the slave nodes. Parameters ---------- cache : `lsst.pipe.base.Struct` Process pool cache. dataId : `dict` Data identifier. Returns ------- detId : `int` Detector identifier. image : `lsst.afw.image.MaskedImage` Binned image.
Definition at line 793 of file skyCorrection.py.
def lsst.pipe.drivers.skyCorrection.SkyCorrectionTask.focalPlaneBackground | ( | self, | |
camera, | |||
pool, | |||
dataIdList, | |||
config | |||
) |
Perform full focal-plane background subtraction This method runs on the master node. Parameters ---------- camera : `lsst.afw.cameraGeom.Camera` Camera description. pool : `lsst.ctrl.pool.Pool` Process pool. dataIdList : iterable of `dict` List of data identifiers for the CCDs. config : `lsst.pipe.drivers.background.FocalPlaneBackgroundConfig` Configuration to use for background subtraction. Returns ------- exposures : `list` of `lsst.afw.image.Image` List of binned images, for creating focal plane image.
Definition at line 321 of file skyCorrection.py.
def lsst.pipe.drivers.skyCorrection.SkyCorrectionTask.focalPlaneBackgroundRun | ( | self, | |
camera, | |||
cacheExposures, | |||
idList, | |||
config | |||
) |
Perform full focal-plane background subtraction This method runs on the master node. Parameters ---------- camera : `lsst.afw.cameraGeom.Camera` Camera description. cacheExposures : `list` of `lsst.afw.image.Exposures` List of loaded and processed input calExp. idList : `list` of `int` List of detector ids to iterate over. config : `lsst.pipe.drivers.background.FocalPlaneBackgroundConfig` Configuration to use for background subtraction. Returns ------- exposures : `list` of `lsst.afw.image.Image` List of binned images, for creating focal plane image. newCacheBgList : `list` of `lsst.afwMath.backgroundList` Background lists generated. cacheBgModel : `FocalPlaneBackground` Full focal plane background model.
Definition at line 350 of file skyCorrection.py.
def lsst.pipe.drivers.skyCorrection.SkyCorrectionTask.loadImage | ( | self, | |
cache, | |||
dataId | |||
) |
Load original image and restore the sky This method runs on the slave nodes. Parameters ---------- cache : `lsst.pipe.base.Struct` Process pool cache. dataId : `dict` Data identifier. Returns ------- exposure : `lsst.afw.image.Exposure` Resultant exposure.
Definition at line 504 of file skyCorrection.py.
def lsst.pipe.drivers.skyCorrection.SkyCorrectionTask.loadImageRun | ( | self, | |
calExp, | |||
calExpBkg | |||
) |
Serial implementation of self.loadImage() for Gen3. Load and restore background to calExp and calExpBkg. Parameters ---------- calExp : `lsst.afw.image.Exposure` Detector level calExp image to process. calExpBkg : `lsst.afw.math.BackgroundList` Detector level background list associated with the calExp. Returns ------- calExp : `lsst.afw.image.Exposure` Background restored calExp. bgList : `lsst.afw.math.BackgroundList` New background list containing the restoration background.
Definition at line 541 of file skyCorrection.py.
|
inherited |
Provide a context manager for logging an operation.
@param operation: description of operation (string) @param catch: Catch all exceptions? @param trace: Log a traceback of caught exception? Note that if 'catch' is True, all exceptions are swallowed, but there may be other side-effects such as undefined variables.
Definition at line 502 of file parallel.py.
def lsst.pipe.drivers.skyCorrection.SkyCorrectionTask.measureSkyFrame | ( | self, | |
cache, | |||
dataId | |||
) |
Measure scale for sky frame This method runs on the slave nodes. Parameters ---------- cache : `lsst.pipe.base.Struct` Process pool cache. dataId : `dict` Data identifier. Returns ------- scale : `float` Scale for sky frame.
Definition at line 576 of file skyCorrection.py.
|
inherited |
Run with a MPI process pool
Definition at line 534 of file parallel.py.
|
inherited |
Definition at line 435 of file parallel.py.
def lsst.pipe.drivers.skyCorrection.SkyCorrectionTask.realiseModel | ( | self, | |
cache, | |||
dataId, | |||
bgModel | |||
) |
Generate an image of the background model for visualisation Useful for debugging. Parameters ---------- cache : `lsst.pipe.base.Struct` Process pool cache. dataId : `dict` Data identifier. bgModel : `lsst.pipe.drivers.background.FocalPlaneBackround` Background model. Returns ------- detId : `int` Detector identifier. image : `lsst.afw.image.MaskedImage` Binned background model image.
Definition at line 705 of file skyCorrection.py.
def lsst.pipe.drivers.skyCorrection.SkyCorrectionTask.run | ( | self, | |
calExpArray, | |||
calBkgArray, | |||
skyCalibs, | |||
camera | |||
) |
Duplicate runDataRef method without ctrl_pool for Gen3. Parameters ---------- calExpArray : `list` of `lsst.afw.image.Exposure` Array of detector input calExp images for the exposure to process. calBkgArray : `list` of `lsst.afw.math.BackgroundList` Array of detector input background lists matching the calExps to process. skyCalibs : `list` of `lsst.afw.image.Exposure` Array of SKY calibrations for the input detectors to be processed. camera : `lsst.afw.cameraGeom.Camera` Camera matching the input data to process. Returns ------- results : `pipeBase.Struct` containing calExpCamera : `lsst.afw.image.Exposure` Full camera image of the sky-corrected data. skyCorr : `list` of `lsst.afw.math.BackgroundList` Detector-level sky-corrected background lists. See Also -------- ~lsst.pipe.drivers.SkyCorrectionTask.runDataRef()
Definition at line 398 of file skyCorrection.py.
def lsst.pipe.drivers.skyCorrection.SkyCorrectionTask.runDataRef | ( | self, | |
expRef | |||
) |
Perform sky correction on an exposure We restore the original sky, and remove it again using multiple algorithms. We optionally apply: 1. A large-scale background model. This step removes very-large-scale sky such as moonlight. 2. A sky frame. 3. A medium-scale background model. This step removes residual sky (This is smooth on the focal plane). Only the master node executes this method. The data is held on the slave nodes, which do all the hard work. Parameters ---------- expRef : `lsst.daf.persistence.ButlerDataRef` Data reference for exposure. See Also -------- ~lsst.pipe.drivers.SkyCorrectionTask.run
Definition at line 254 of file skyCorrection.py.
def lsst.pipe.drivers.skyCorrection.SkyCorrectionTask.runQuantum | ( | self, | |
butlerQC, | |||
inputRefs, | |||
outputRefs | |||
) |
Definition at line 202 of file skyCorrection.py.
def lsst.pipe.drivers.skyCorrection.SkyCorrectionTask.subtractModel | ( | self, | |
cache, | |||
dataId, | |||
bgModel | |||
) |
Subtract background model This method runs on the slave nodes. Parameters ---------- cache : `lsst.pipe.base.Struct` Process pool cache. dataId : `dict` Data identifier. bgModel : `lsst.pipe.drivers.background.FocalPlaneBackround` Background model. Returns ------- exposure : `lsst.afw.image.Exposure` Resultant exposure.
Definition at line 643 of file skyCorrection.py.
def lsst.pipe.drivers.skyCorrection.SkyCorrectionTask.subtractModelRun | ( | self, | |
exposure, | |||
bgModel | |||
) |
Serial implementation of self.subtractModel() for Gen3. Load and restore background to calExp and calExpBkg. Parameters ---------- exposure : `lsst.afw.image.Exposure` Exposure to subtract the background model from. bgModel : `lsst.pipe.drivers.background.FocalPlaneBackground` Full camera level background model. Returns ------- exposure : `lsst.afw.image.Exposure` Background subtracted input exposure. bgModelCcd : `lsst.afw.math.BackgroundList` Detector level realization of the full background model. bgModelMaskedImage : `lsst.afw.image.MaskedImage` Background model from the bgModelCcd realization.
Definition at line 676 of file skyCorrection.py.
def lsst.pipe.drivers.skyCorrection.SkyCorrectionTask.subtractSkyFrame | ( | self, | |
cache, | |||
dataId, | |||
scale | |||
) |
Subtract sky frame This method runs on the slave nodes. Parameters ---------- cache : `lsst.pipe.base.Struct` Process pool cache. dataId : `dict` Data identifier. scale : `float` Scale for sky frame. Returns ------- exposure : `lsst.afw.image.Exposure` Resultant exposure.
Definition at line 598 of file skyCorrection.py.
def lsst.pipe.drivers.skyCorrection.SkyCorrectionTask.write | ( | self, | |
cache, | |||
dataId | |||
) |
Write resultant background list This method runs on the slave nodes. Parameters ---------- cache : `lsst.pipe.base.Struct` Process pool cache. dataId : `dict` Data identifier.
Definition at line 838 of file skyCorrection.py.
|
static |
Definition at line 199 of file skyCorrection.py.