lsst.pipe.tasks g35da1f9f46+84867af7b4
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Attributes | Static Protected Attributes | List of all members
lsst.pipe.tasks.characterizeImage.CharacterizeImageTask Class Reference
Inheritance diagram for lsst.pipe.tasks.characterizeImage.CharacterizeImageTask:

Public Member Functions

 __init__ (self, butler=None, refObjLoader=None, schema=None, **kwargs)
 
 runQuantum (self, butlerQC, inputRefs, outputRefs)
 
 run (self, exposure, exposureIdInfo=None, background=None, idGenerator=None)
 
 detectMeasureAndEstimatePsf (self, exposure, idGenerator, background)
 
 display (self, itemName, exposure, sourceCat=None)
 

Public Attributes

 schema
 
 algMetadata
 
 outputSchema
 

Static Public Attributes

 ConfigClass = CharacterizeImageConfig
 

Protected Attributes

 _initialFrame
 
 _frame
 

Static Protected Attributes

str _DefaultName = "characterizeImage"
 

Detailed Description

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 268 of file characterizeImage.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.__init__ (   self,
  butler = None,
  refObjLoader = None,
  schema = None,
**  kwargs 
)

Definition at line 316 of file characterizeImage.py.

Member Function Documentation

◆ detectMeasureAndEstimatePsf()

lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.detectMeasureAndEstimatePsf (   self,
  exposure,
  idGenerator,
  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.
idGenerator : `lsst.meas.base.IdGenerator`
    Object that generates source IDs and provides RNG seeds.
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 476 of file characterizeImage.py.

◆ display()

lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.display (   self,
  itemName,
  exposure,
  sourceCat = None 
)
Display exposure and sources on next frame (for debugging).

Parameters
----------
itemName : `str`
    Name of item in ``debugInfo``.
exposure : `lsst.afw.image.ExposureF`
    Exposure to display.
sourceCat : `lsst.afw.table.SourceCatalog`, optional
    Catalog of sources detected on the exposure.

Definition at line 575 of file characterizeImage.py.

◆ run()

lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.run (   self,
  exposure,
  exposureIdInfo = None,
  background = None,
  idGenerator = 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.base.ExposureIdInfo`, optional
    Exposure ID info. Deprecated in favor of ``idGenerator``, and
    ignored if that is provided.
background : `lsst.afw.math.BackgroundList`, optional
    Initial model of background already subtracted from exposure.
idGenerator : `lsst.meas.base.IdGenerator`, optional
    Object that generates source IDs and provides RNG seeds.

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 356 of file characterizeImage.py.

◆ runQuantum()

lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.runQuantum (   self,
  butlerQC,
  inputRefs,
  outputRefs 
)

Definition at line 348 of file characterizeImage.py.

Member Data Documentation

◆ _DefaultName

str lsst.pipe.tasks.characterizeImage.CharacterizeImageTask._DefaultName = "characterizeImage"
staticprotected

Definition at line 314 of file characterizeImage.py.

◆ _frame

lsst.pipe.tasks.characterizeImage.CharacterizeImageTask._frame
protected

Definition at line 344 of file characterizeImage.py.

◆ _initialFrame

lsst.pipe.tasks.characterizeImage.CharacterizeImageTask._initialFrame
protected

Definition at line 343 of file characterizeImage.py.

◆ algMetadata

lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.algMetadata

Definition at line 334 of file characterizeImage.py.

◆ ConfigClass

lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.ConfigClass = CharacterizeImageConfig
static

Definition at line 313 of file characterizeImage.py.

◆ outputSchema

lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.outputSchema

Definition at line 346 of file characterizeImage.py.

◆ schema

lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.schema

Definition at line 326 of file characterizeImage.py.


The documentation for this class was generated from the following file: