|
def | __init__ (self, butler=None, refObjLoader=None, schema=None, **kwargs) |
|
def | runQuantum (self, butlerQC, inputRefs, outputRefs) |
|
def | run (self, exposure, exposureIdInfo=None, background=None) |
|
def | detectMeasureAndEstimatePsf (self, exposure, exposureIdInfo, background) |
|
def | display (self, itemName, exposure, sourceCat=None) |
|
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 `~lsst.ip.isr.IsrTask`):
- detect and measure bright sources
- repair cosmic rays
- measure and subtract background
- measure PSF
Parameters
----------
butler : `None`
Compatibility parameter. Should always be `None`.
refObjLoader : `lsst.meas.algorithms.ReferenceObjectLoader`, optional
Reference object loader if using a catalog-based star-selector.
schema : `lsst.afw.table.Schema`, optional
Initial schema for icSrc catalog.
**kwargs
Additional keyword arguments.
Notes
-----
Debugging:
CharacterizeImageTask has a debug dictionary with the following keys:
frame
int: if specified, the frame of first debug image displayed (defaults to 1)
repair_iter
bool; if True display image after each repair in the measure PSF loop
background_iter
bool; if True display image after each background subtraction in the measure PSF loop
measure_iter
bool; if True display image and sources at the end of each iteration of the measure PSF loop
See `~lsst.meas.astrom.displayAstrometry` for the meaning of the various symbols.
psf
bool; if True display image and sources after PSF is measured;
this will be identical to the final image displayed by measure_iter if measure_iter is true
repair
bool; if True display image and sources after final repair
measure
bool; if True display image and sources after final measurement
Definition at line 249 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:
- if config.doMeasurePsf or not exposure.hasPsf():
- install a simple PSF model (replacing the existing one, if need be)
- interpolate over cosmic rays with keepCRs=True
- estimate background and subtract it from the exposure
- detect, deblend and measure sources, and subtract a refined background model;
- if config.doMeasurePsf:
- measure PSF
Parameters
----------
exposure : `lsst.afw.image.ExposureF`
Exposure to characterize.
exposureIdInfo : `lsst.obs.baseExposureIdInfo`
Exposure ID info.
background : `lsst.afw.math.BackgroundList`, optional
Initial model of background already subtracted from exposure.
Returns
-------
result : `lsst.pipe.base.Struct`
Results as a struct with attributes:
``exposure``
Characterized exposure (`lsst.afw.image.ExposureF`).
``sourceCat``
Detected sources (`lsst.afw.table.SourceCatalog`).
``background``
Model of subtracted background (`lsst.afw.math.BackgroundList`).
``psfCellSet``
Spatial cells of PSF candidates (`lsst.afw.math.SpatialCellSet`).
Raises
------
LengthError
Raised if there are too many CR pixels.
Definition at line 439 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:
- Iterate the following config.psfIterations times, or once if config.doMeasurePsf false:
- detect and measure sources and estimate PSF (see detectMeasureAndEstimatePsf for details)
- interpolate over cosmic rays
- perform final measurement
Parameters
----------
exposure : `lsst.afw.image.ExposureF`
Exposure to characterize.
exposureIdInfo : `lsst.obs.baseExposureIdInfo`, optional
Exposure ID info. If not provided, returned SourceCatalog IDs will not
be globally unique.
background : `lsst.afw.math.BackgroundList`, optional
Initial model of background already subtracted from exposure.
Returns
-------
result : `lsst.pipe.base.Struct`
Results as a struct with attributes:
``exposure``
Characterized exposure (`lsst.afw.image.ExposureF`).
``sourceCat``
Detected sources (`lsst.afw.table.SourceCatalog`).
``background``
Model of subtracted background (`lsst.afw.math.BackgroundList`).
``psfCellSet``
Spatial cells of PSF candidates (`lsst.afw.math.SpatialCellSet`).
``characterized``
Another reference to ``exposure`` for compatibility.
``backgroundModel``
Another reference to ``background`` for compatibility.
Raises
------
RuntimeError
Raised if PSF sigma is NaN.
Definition at line 337 of file characterizeImage.py.