lsst.ip.diffim g4a458ce6a7+eee19971e7
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
lsst.ip.diffim.modelPsfMatch.ModelPsfMatchTask Class Reference
Inheritance diagram for lsst.ip.diffim.modelPsfMatch.ModelPsfMatchTask:
lsst.ip.diffim.psfMatch.PsfMatchTask

Public Member Functions

 __init__ (self, *args, **kwargs)
 
 run (self, exposure, referencePsfModel, kernelSum=1.0)
 

Public Attributes

 kConfig
 
 log
 

Static Public Attributes

 ConfigClass = ModelPsfMatchConfig
 

Protected Member Functions

 _diagnostic (self, kernelCellSet, spatialSolution, spatialKernel, spatialBg)
 
 _buildCellSet (self, exposure, referencePsfModel)
 
 _makePsfMaskedImage (self, psfModel, posX, posY, dimensions=None)
 

Detailed Description

Matching of two model Psfs, and application of the Psf-matching kernel to an input Exposure

Definition at line 94 of file modelPsfMatch.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.ip.diffim.modelPsfMatch.ModelPsfMatchTask.__init__ ( self,
* args,
** kwargs )
Create a ModelPsfMatchTask

Parameters
----------
*args
    arguments to be passed to lsst.ip.diffim.PsfMatchTask.__init__
**kwargs
    keyword arguments to be passed to lsst.ip.diffim.PsfMatchTask.__init__

Notes
-----
Upon initialization, the kernel configuration is defined by self.config.kernel.active.  This Task
does have a run() method, which is the default way to call the Task.

Reimplemented from lsst.ip.diffim.psfMatch.PsfMatchTask.

Definition at line 100 of file modelPsfMatch.py.

Member Function Documentation

◆ _buildCellSet()

lsst.ip.diffim.modelPsfMatch.ModelPsfMatchTask._buildCellSet ( self,
exposure,
referencePsfModel )
protected
Build a SpatialCellSet for use with the solve method

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    The science exposure that will be convolved; must contain a Psf
referencePsfModel : `lsst.afw.detection.Psf`
    Psf model to match to

Returns
-------
result : `struct`
    - ``kernelCellSet`` : a SpatialCellSet to be used by self._solve
    - ``referencePsfModel`` : Validated and/or modified
        reference model used to populate the SpatialCellSet

Notes
-----
If the reference Psf model and science Psf model have different dimensions,
adjust the referencePsfModel (the model to which the exposure PSF will be matched)
to match that of the science Psf. If the science Psf dimensions vary across the image,
as is common with a WarpedPsf, either pad or clip (depending on config.padPsf)
the dimensions to be constant.

Reimplemented from lsst.ip.diffim.psfMatch.PsfMatchTask.

Definition at line 206 of file modelPsfMatch.py.

◆ _diagnostic()

lsst.ip.diffim.modelPsfMatch.ModelPsfMatchTask._diagnostic ( self,
kernelCellSet,
spatialSolution,
spatialKernel,
spatialBg )
protected
Print diagnostic information on spatial kernel and background fit

The debugging diagnostics are not really useful here, since the images we are matching have
no variance.  Thus override the _diagnostic method to generate no logging information

Reimplemented from lsst.ip.diffim.psfMatch.PsfMatchTask.

Definition at line 199 of file modelPsfMatch.py.

◆ _makePsfMaskedImage()

lsst.ip.diffim.modelPsfMatch.ModelPsfMatchTask._makePsfMaskedImage ( self,
psfModel,
posX,
posY,
dimensions = None )
protected
Return a MaskedImage of the a PSF Model of specified dimensions

Definition at line 348 of file modelPsfMatch.py.

◆ run()

lsst.ip.diffim.modelPsfMatch.ModelPsfMatchTask.run ( self,
exposure,
referencePsfModel,
kernelSum = 1.0 )
Psf-match an exposure to a model Psf

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Exposure to Psf-match to the reference Psf model;
    it must return a valid PSF model via exposure.getPsf()
referencePsfModel : `lsst.afw.detection.Psf`
    The Psf model to match to
kernelSum : `float`, optional
    A multipicative factor to apply to the kernel sum (default=1.0)

Returns
-------
result : `struct`
    - ``psfMatchedExposure`` : the Psf-matched Exposure.
        This has the same parent bbox, Wcs, PhotoCalib and
        Filter as the input Exposure but no Psf.
        In theory the Psf should equal referencePsfModel but
        the match is likely not exact.
    - ``psfMatchingKernel`` : the spatially varying Psf-matching kernel
    - ``kernelCellSet`` : SpatialCellSet used to solve for the Psf-matching kernel
    - ``referencePsfModel`` : Validated and/or modified reference model used

Raises
------
RuntimeError
    if the Exposure does not contain a Psf model

Definition at line 119 of file modelPsfMatch.py.

Member Data Documentation

◆ ConfigClass

lsst.ip.diffim.modelPsfMatch.ModelPsfMatchTask.ConfigClass = ModelPsfMatchConfig
static

Definition at line 98 of file modelPsfMatch.py.

◆ kConfig

lsst.ip.diffim.modelPsfMatch.ModelPsfMatchTask.kConfig

Definition at line 116 of file modelPsfMatch.py.

◆ log

lsst.ip.diffim.modelPsfMatch.ModelPsfMatchTask.log

Definition at line 318 of file modelPsfMatch.py.


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