LSST Applications
21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
|
Calibrate an exposure: measure sources and perform astrometric and photometric calibration. More...
Public Member Functions | |
def | __init__ (self, butler=None, astromRefObjLoader=None, photoRefObjLoader=None, icSourceSchema=None, initInputs=None, **kwargs) |
Construct a CalibrateTask. More... | |
def | runDataRef (self, dataRef, exposure=None, background=None, icSourceCat=None, doUnpersist=True) |
Calibrate an exposure, optionally unpersisting inputs and persisting outputs. More... | |
def | runQuantum (self, butlerQC, inputRefs, outputRefs) |
def | run (self, exposure, exposureIdInfo=None, background=None, icSourceCat=None) |
Calibrate an exposure (science image or coadd) More... | |
def | writeOutputs (self, dataRef, exposure, background, sourceCat, astromMatches, matchMeta) |
def | getSchemaCatalogs (self) |
def | setMetadata (self, exposure, photoRes=None) |
Set task and exposure metadata. More... | |
def | copyIcSourceFields (self, icSourceCat, sourceCat) |
Match sources in icSourceCat and sourceCat and copy the specified fields. More... | |
Public Attributes | |
schemaMapper | |
calibSourceKey | |
schema | |
algMetadata | |
skySourceKey | |
outputSchema | |
Static Public Attributes | |
ConfigClass = CalibrateConfig | |
RunnerClass = pipeBase.ButlerInitializedTaskRunner | |
Calibrate an exposure: measure sources and perform astrometric and photometric calibration.
@section pipe_tasks_calibrate_Purpose Description Given an exposure with a good PSF model and aperture correction map (e.g. as provided by @ref CharacterizeImageTask), perform the following operations: - Run detection and measurement - Run astrometry subtask to fit an improved WCS - Run photoCal subtask to fit the exposure's photometric zero-point @section pipe_tasks_calibrate_Initialize Task initialisation @copydoc \_\_init\_\_ @section pipe_tasks_calibrate_IO Invoking the Task If you want this task to unpersist inputs or persist outputs, then call the `runDataRef` method (a wrapper around the `run` method). If you already have the inputs unpersisted and do not want to persist the output then it is more direct to call the `run` method: @section pipe_tasks_calibrate_Config Configuration parameters See @ref CalibrateConfig @section pipe_tasks_calibrate_Metadata Quantities set in exposure Metadata Exposure metadata <dl> <dt>MAGZERO_RMS <dd>MAGZERO's RMS == sigma reported by photoCal task <dt>MAGZERO_NOBJ <dd>Number of stars used == ngood reported by photoCal task <dt>COLORTERM1 <dd>?? (always 0.0) <dt>COLORTERM2 <dd>?? (always 0.0) <dt>COLORTERM3 <dd>?? (always 0.0) </dl> @section pipe_tasks_calibrate_Debug Debug variables The @link lsst.pipe.base.cmdLineTask.CmdLineTask command line task@endlink interface supports a flag `--debug` to import `debug.py` from your `$PYTHONPATH`; see @ref baseDebug for more about `debug.py`. CalibrateTask has a debug dictionary containing one key: <dl> <dt>calibrate <dd>frame (an int; <= 0 to not display) in which to display the exposure, sources and matches. See @ref lsst.meas.astrom.displayAstrometry for the meaning of the various symbols. </dl> For example, put something like: @code{.py} import lsstDebug def DebugInfo(name): di = lsstDebug.getInfo(name) # N.b. lsstDebug.Info(name) would # call us recursively if name == "lsst.pipe.tasks.calibrate": di.display = dict( calibrate = 1, ) return di lsstDebug.Info = DebugInfo @endcode into your `debug.py` file and run `calibrateTask.py` with the `--debug` flag. Some subtasks may have their own debug variables; see individual Task documentation.
Definition at line 337 of file calibrate.py.
def lsst.pipe.tasks.calibrate.CalibrateTask.__init__ | ( | self, | |
butler = None , |
|||
astromRefObjLoader = None , |
|||
photoRefObjLoader = None , |
|||
icSourceSchema = None , |
|||
initInputs = None , |
|||
** | kwargs | ||
) |
Construct a CalibrateTask.
@param[in] butler The butler is passed to the refObjLoader constructor in case it is needed. Ignored if the refObjLoader argument provides a loader directly. @param[in] astromRefObjLoader An instance of LoadReferenceObjectsTasks that supplies an external reference catalog for astrometric calibration. May be None if the desired loader can be constructed from the butler argument or all steps requiring a reference catalog are disabled. @param[in] photoRefObjLoader An instance of LoadReferenceObjectsTasks that supplies an external reference catalog for photometric calibration. May be None if the desired loader can be constructed from the butler argument or all steps requiring a reference catalog are disabled. @param[in] icSourceSchema schema for icSource catalog, or None. Schema values specified in config.icSourceFieldsToCopy will be taken from this schema. If set to None, no values will be propagated from the icSourceCatalog @param[in,out] kwargs other keyword arguments for lsst.pipe.base.CmdLineTask
Definition at line 434 of file calibrate.py.
def lsst.pipe.tasks.calibrate.CalibrateTask.copyIcSourceFields | ( | self, | |
icSourceCat, | |||
sourceCat | |||
) |
Match sources in icSourceCat and sourceCat and copy the specified fields.
@param[in] icSourceCat catalog from which to copy fields @param[in,out] sourceCat catalog to which to copy fields The fields copied are those specified by `config.icSourceFieldsToCopy` that actually exist in the schema. This was set up by the constructor using self.schemaMapper.
Definition at line 888 of file calibrate.py.
def lsst.pipe.tasks.calibrate.CalibrateTask.getSchemaCatalogs | ( | self | ) |
Return a dict of empty catalogs for each catalog dataset produced by this task.
Definition at line 847 of file calibrate.py.
def lsst.pipe.tasks.calibrate.CalibrateTask.run | ( | self, | |
exposure, | |||
exposureIdInfo = None , |
|||
background = None , |
|||
icSourceCat = None |
|||
) |
Calibrate an exposure (science image or coadd)
@param[in,out] exposure exposure to calibrate (an lsst.afw.image.ExposureF or similar); in: - MaskedImage - Psf out: - MaskedImage has background subtracted - Wcs is replaced - PhotoCalib is replaced @param[in] exposureIdInfo ID info for exposure (an lsst.obs.base.ExposureIdInfo) If not provided, returned SourceCatalog IDs will not be globally unique. @param[in,out] background background model already subtracted from exposure (an lsst.afw.math.BackgroundList). May be None if no background has been subtracted, though that is unusual for calibration. A refined background model is output. @param[in] icSourceCat A SourceCatalog from CharacterizeImageTask from which we can copy some fields. @return pipe_base Struct containing these fields: - exposure calibrate science exposure with refined WCS and PhotoCalib - background model of background subtracted from exposure (an lsst.afw.math.BackgroundList) - sourceCat catalog of measured sources - astromMatches list of source/refObj matches from the astrometry solver
Definition at line 648 of file calibrate.py.
def lsst.pipe.tasks.calibrate.CalibrateTask.runDataRef | ( | self, | |
dataRef, | |||
exposure = None , |
|||
background = None , |
|||
icSourceCat = None , |
|||
doUnpersist = True |
|||
) |
Calibrate an exposure, optionally unpersisting inputs and persisting outputs.
This is a wrapper around the run
method that unpersists inputs (if doUnpersist
true) and persists outputs (if config.doWrite
true)
[in] | dataRef | butler data reference corresponding to a science image |
[in,out] | exposure | characterized exposure (an lsst.afw.image.ExposureF or similar), or None to unpersist existing icExp and icBackground. See run method for details of what is read and written. |
[in,out] | background | initial model of background already subtracted from exposure (an lsst.afw.math.BackgroundList). May be None if no background has been subtracted, though that is unusual for calibration. A refined background model is output. Ignored if exposure is None. |
[in] | icSourceCat | catalog from which to copy the fields specified by icSourceKeys, or None; |
[in] | doUnpersist | unpersist data:
|
Definition at line 554 of file calibrate.py.
def lsst.pipe.tasks.calibrate.CalibrateTask.runQuantum | ( | self, | |
butlerQC, | |||
inputRefs, | |||
outputRefs | |||
) |
Definition at line 617 of file calibrate.py.
def lsst.pipe.tasks.calibrate.CalibrateTask.setMetadata | ( | self, | |
exposure, | |||
photoRes = None |
|||
) |
Set task and exposure metadata.
Logs a warning and continues if needed data is missing. @param[in,out] exposure exposure whose metadata is to be set @param[in] photoRes results of running photoCal; if None then it was not run
Definition at line 855 of file calibrate.py.
def lsst.pipe.tasks.calibrate.CalibrateTask.writeOutputs | ( | self, | |
dataRef, | |||
exposure, | |||
background, | |||
sourceCat, | |||
astromMatches, | |||
matchMeta | |||
) |
Write output data to the output repository @param[in] dataRef butler data reference corresponding to a science image @param[in] exposure exposure to write @param[in] background background model for exposure @param[in] sourceCat catalog of measured sources @param[in] astromMatches list of source/refObj matches from the astrometry solver
Definition at line 823 of file calibrate.py.
lsst.pipe.tasks.calibrate.CalibrateTask.algMetadata |
Definition at line 505 of file calibrate.py.
lsst.pipe.tasks.calibrate.CalibrateTask.calibSourceKey |
Definition at line 479 of file calibrate.py.
|
static |
Definition at line 430 of file calibrate.py.
lsst.pipe.tasks.calibrate.CalibrateTask.outputSchema |
Definition at line 551 of file calibrate.py.
|
static |
Definition at line 432 of file calibrate.py.
lsst.pipe.tasks.calibrate.CalibrateTask.schema |
Definition at line 499 of file calibrate.py.
lsst.pipe.tasks.calibrate.CalibrateTask.schemaMapper |
Definition at line 470 of file calibrate.py.
lsst.pipe.tasks.calibrate.CalibrateTask.skySourceKey |
Definition at line 517 of file calibrate.py.