lsst.ip.diffim
16.0-12-g1dc09ba+9
|
Base class for Psf Matching; should not be called directly. More...
Public Member Functions | |
def | __init__ (self, args, kwargs) |
Create the psf-matching Task. More... | |
Public Attributes | |
kConfig | |
useRegularization | |
hMat | |
Static Public Attributes | |
ConfigClass = PsfMatchConfig | |
Base class for Psf Matching; should not be called directly.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
PsfMatchTask is a base class that implements the core functionality for matching the Psfs of two images using a spatially varying Psf-matching lsst.afw.math.LinearCombinationKernel. The Task requires the user to provide an instance of an lsst.afw.math.SpatialCellSet, filled with lsst.ip.diffim.KernelCandidate instances, and a list of lsst.afw.math.Kernels of basis shapes that will be used for the decomposition. If requested, the Task also performs background matching and returns the differential background model as an lsst.afw.math.Kernel.SpatialFunction.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ip_diffim_psfmatch_Initialize Task initialization
Create the psf-matching Task.
*args | arguments to be passed to lsst.pipe.base.task.Task.__init__ |
**kwargs | keyword arguments to be passed to lsst.pipe.base.task.Task.__init__ |
The initialization sets the Psf-matching kernel configuration using the value of self.config.kernel.active. If the kernel is requested with regularization to moderate the bias/variance tradeoff, currently only used when a delta function kernel basis is provided, it creates a regularization matrix stored as member variable self.hMat.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
As a base class, this Task is not directly invoked. However, run() methods that are implemented on derived classes will make use of the core _solve() functionality, which defines a sequence of lsst.afw.math.CandidateVisitor classes that iterate through the KernelCandidates, first building up a per-candidate solution and then building up a spatial model from the ensemble of candidates. Sigma clipping is performed using the mean and standard deviation of all kernel sums (to reject variable objects), on the per-candidate substamp diffim residuals (to indicate a bad choice of kernel basis shapes for that particular object), and on the substamp diffim residuals using the spatial kernel fit (to indicate a bad choice of spatial kernel order, or poor constraints on the spatial model). The _diagnostic() method logs information on the quality of the spatial fit, and also modifies the Task metadata.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
See PsfMatchConfig, PsfMatchConfigAL, PsfMatchConfigDF, and DetectionConfig.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Kernel sum (10^{-0.4 * Δ zeropoint}) of the spatial Psf-matching kernel; via PsfMatchTask._diagnostic
If using sum-of-Gaussian basis, the kernel size; via generateAlardLuptonBasisList
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
The command line task interface supports a flag -d/–debug
to import debug.py from your PYTHONPATH
. The relevant contents of debug.py for this Task include:
Note that if you want addional logging info, you may add to your scripts:
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
As a base class, there is no example code for PsfMatchTask. However, see ImagePsfMatchTask, SnapPsfMatchTask, and ModelPsfMatchTask.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Definition at line 529 of file psfMatch.py.
def lsst.ip.diffim.psfMatch.PsfMatchTask.__init__ | ( | self, | |
args, | |||
kwargs | |||
) |
Create the psf-matching Task.
*args | arguments to be passed to lsst.pipe.base.task.Task.__init__ |
**kwargs | keyword arguments to be passed to lsst.pipe.base.task.Task.__init__ |
The initialization sets the Psf-matching kernel configuration using the value of self.config.kernel.active. If the kernel is requested with regularization to moderate the bias/variance tradeoff, currently only used when a delta function kernel basis is provided, it creates a regularization matrix stored as member variable self.hMat.
Definition at line 680 of file psfMatch.py.
|
static |
Definition at line 677 of file psfMatch.py.
lsst.ip.diffim.psfMatch.PsfMatchTask.hMat |
Definition at line 702 of file psfMatch.py.
lsst.ip.diffim.psfMatch.PsfMatchTask.kConfig |
Definition at line 693 of file psfMatch.py.
lsst.ip.diffim.psfMatch.PsfMatchTask.useRegularization |
Definition at line 697 of file psfMatch.py.