lsst.pipe.tasks
19.0.0-61-gec4c6e08
|
Measure bright sources and use this to estimate background and PSF of an exposure. More...
Public Member Functions | |
def | runQuantum (self, butlerQC, inputRefs, outputRefs) |
def | __init__ (self, butler=None, refObjLoader=None, schema=None, **kwargs) |
Construct a CharacterizeImageTask. More... | |
def | getInitOutputDatasets (self) |
def | runDataRef (self, dataRef, exposure=None, background=None, doUnpersist=True) |
Characterize a science image and, if wanted, persist the results. More... | |
def | run (self, exposure, exposureIdInfo=None, background=None) |
Characterize a science image. More... | |
def | detectMeasureAndEstimatePsf (self, exposure, exposureIdInfo, background) |
Perform one iteration of detect, measure and estimate PSF. More... | |
def | getSchemaCatalogs (self) |
def | display (self, itemName, exposure, sourceCat=None) |
Public Attributes | |
schema | |
algMetadata | |
outputSchema | |
Static Public Attributes | |
ConfigClass | |
RunnerClass | |
Measure bright sources and use this to estimate background and PSF of an exposure.
Given an exposure with defects repaired (masked and interpolated over, e.g. as output by IsrTask):
Construct a CharacterizeImageTask.
[in] | butler | A butler object is passed to the refObjLoader constructor in case it is needed to load catalogs. May be None if a catalog-based star selector is not used, if the reference object loader constructor does not require a butler, or if a reference object loader is passed directly via the refObjLoader argument. |
[in] | refObjLoader | An instance of LoadReferenceObjectsTasks that supplies an external reference catalog to a catalog-based star selector. May be None if a catalog star selector is not used or the loader can be constructed from the butler argument. |
[in,out] | schema | initial schema (an lsst.afw.table.SourceTable), or None |
[in,out] | kwargs | other keyword arguments for lsst.pipe.base.CmdLineTask |
If you want this task to unpersist inputs or persist outputs, then call the runDataRef
method (a thin 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:
The command line task interface supports a flag --debug
to import debug.py
from your $PYTHONPATH
; see Using lsstDebug to control debugging output for more about debug.py
.
CharacterizeImageTask has a debug dictionary with the following keys:
For example, put something like:
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 230 of file characterizeImage.py.
def lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.__init__ | ( | self, | |
butler = None , |
|||
refObjLoader = None , |
|||
schema = None , |
|||
** | kwargs | ||
) |
Construct a CharacterizeImageTask.
[in] | butler | A butler object is passed to the refObjLoader constructor in case it is needed to load catalogs. May be None if a catalog-based star selector is not used, if the reference object loader constructor does not require a butler, or if a reference object loader is passed directly via the refObjLoader argument. |
[in] | refObjLoader | An instance of LoadReferenceObjectsTasks that supplies an external reference catalog to a catalog-based star selector. May be None if a catalog star selector is not used or the loader can be constructed from the butler argument. |
[in,out] | schema | initial schema (an lsst.afw.table.SourceTable), or None |
[in,out] | kwargs | other keyword arguments for lsst.pipe.base.CmdLineTask |
Definition at line 328 of file characterizeImage.py.
def lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.detectMeasureAndEstimatePsf | ( | self, | |
exposure, | |||
exposureIdInfo, | |||
background | |||
) |
Perform one iteration of detect, measure and estimate PSF.
Performs the following operations:
[in,out] | exposure | exposure to characterize (an lsst.afw.image.ExposureF or similar) The following changes are made:
|
[in] | exposureIdInfo | ID info for exposure (an lsst.obs_base.ExposureIdInfo) |
[in,out] | background | initial model of background already subtracted from exposure (an lsst.afw.math.BackgroundList). |
Definition at line 513 of file characterizeImage.py.
def lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.display | ( | self, | |
itemName, | |||
exposure, | |||
sourceCat = None |
|||
) |
Display exposure and sources on next frame, if display of itemName has been requested @param[in] itemName name of item in debugInfo @param[in] exposure exposure to display @param[in] sourceCat source catalog to display
Definition at line 593 of file characterizeImage.py.
def lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.getInitOutputDatasets | ( | self | ) |
Definition at line 370 of file characterizeImage.py.
def lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.getSchemaCatalogs | ( | self | ) |
Return a dict of empty catalogs for each catalog dataset produced by this task.
Definition at line 586 of file characterizeImage.py.
def lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.run | ( | self, | |
exposure, | |||
exposureIdInfo = None , |
|||
background = None |
|||
) |
Characterize a science image.
Peforms the following operations:
[in,out] | exposure | exposure to characterize (an lsst.afw.image.ExposureF or similar). The following changes are made:
|
[in] | exposureIdInfo | ID info for exposure (an lsst.obs.base.ExposureIdInfo). If not provided, returned SourceCatalog IDs will not be globally unique. |
[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, which is typical for image characterization. |
Definition at line 428 of file characterizeImage.py.
def lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.runDataRef | ( | self, | |
dataRef, | |||
exposure = None , |
|||
background = None , |
|||
doUnpersist = True |
|||
) |
Characterize a science image and, if wanted, persist the results.
This simply unpacks the exposure and passes it to the characterize method to do the work.
[in] | dataRef | butler data reference for science exposure |
[in,out] | exposure | exposure to characterize (an lsst.afw.image.ExposureF or similar). If None then unpersist from "postISRCCD". The following changes are made, depending on the config:
|
[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, which is typical for image characterization. A refined background model is output. |
[in] | doUnpersist | if True the exposure is read from the repository and the exposure and background arguments must be None; if False the exposure must be provided. True is intended for running as a command-line task, False for running as a subtask |
Definition at line 376 of file characterizeImage.py.
def lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.runQuantum | ( | self, | |
butlerQC, | |||
inputRefs, | |||
outputRefs | |||
) |
Definition at line 318 of file characterizeImage.py.
lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.algMetadata |
Definition at line 356 of file characterizeImage.py.
|
static |
Definition at line 314 of file characterizeImage.py.
lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.outputSchema |
Definition at line 368 of file characterizeImage.py.
|
static |
Definition at line 316 of file characterizeImage.py.
lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.schema |
Definition at line 346 of file characterizeImage.py.