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

Public Member Functions

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)
 

Public Attributes

 schema
 
 algMetadata
 
 outputSchema
 

Static Public Attributes

 ConfigClass = CharacterizeImageConfig
 

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

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 297 of file characterizeImage.py.

Member Function Documentation

◆ detectMeasureAndEstimatePsf()

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.

◆ display()

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

◆ run()

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.

◆ runQuantum()

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

Definition at line 329 of file characterizeImage.py.

Member Data Documentation

◆ algMetadata

lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.algMetadata

Definition at line 315 of file characterizeImage.py.

◆ ConfigClass

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

Definition at line 294 of file characterizeImage.py.

◆ outputSchema

lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.outputSchema

Definition at line 327 of file characterizeImage.py.

◆ schema

lsst.pipe.tasks.characterizeImage.CharacterizeImageTask.schema

Definition at line 307 of file characterizeImage.py.


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