LSST Applications g0265f82a02+d6b5cd48b5,g02d81e74bb+a41d3748ce,g1470d8bcf6+6be6c9203b,g2079a07aa2+14824f138e,g212a7c68fe+a4f2ea4efa,g2305ad1205+72971fe858,g295015adf3+ab2c85acae,g2bbee38e9b+d6b5cd48b5,g337abbeb29+d6b5cd48b5,g3ddfee87b4+31b3a28dff,g487adcacf7+082e807817,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+b2918d57ae,g5a732f18d5+66d966b544,g64a986408d+a41d3748ce,g858d7b2824+a41d3748ce,g8a8a8dda67+a6fc98d2e7,g99cad8db69+7fe4acdf18,g9ddcbc5298+d4bad12328,ga1e77700b3+246acaaf9c,ga8c6da7877+84af8b3ff8,gb0e22166c9+3863383f4c,gb6a65358fc+d6b5cd48b5,gba4ed39666+9664299f35,gbb8dafda3b+d8d527deb2,gc07e1c2157+b2dbe6b631,gc120e1dc64+61440b2abb,gc28159a63d+d6b5cd48b5,gcf0d15dbbd+31b3a28dff,gdaeeff99f8+a38ce5ea23,ge6526c86ff+39927bb362,ge79ae78c31+d6b5cd48b5,gee10cc3b42+a6fc98d2e7,gf1cff7945b+a41d3748ce,v24.1.5.rc1
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Static Protected Attributes | List of all members
lsst.ip.diffim.imageDecorrelation.DecorrelateALKernelMapper Class Reference
Inheritance diagram for lsst.ip.diffim.imageDecorrelation.DecorrelateALKernelMapper:
lsst.ip.diffim.imageDecorrelation.DecorrelateALKernelTask lsst.ip.diffim.imageMapReduce.ImageMapper

Public Member Functions

 __init__ (self, *args, **kwargs)
 
 run (self, subExposure, expandedSubExposure, fullBBox, template, science, alTaskResult=None, psfMatchingKernel=None, preConvKernel=None, **kwargs)
 

Static Public Attributes

 ConfigClass = DecorrelateALKernelConfig
 

Static Protected Attributes

str _DefaultName = 'ip_diffim_decorrelateALKernelMapper'
 

Detailed Description

Task to be used as an ImageMapper for performing
A&L decorrelation on subimages on a grid across a A&L difference image.

This task subclasses DecorrelateALKernelTask in order to implement
all of that task's configuration parameters, as well as its `run` method.

Definition at line 649 of file imageDecorrelation.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.ip.diffim.imageDecorrelation.DecorrelateALKernelMapper.__init__ ( self,
* args,
** kwargs )
Create the image decorrelation Task

Parameters
----------
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__``

Reimplemented from lsst.ip.diffim.imageDecorrelation.DecorrelateALKernelTask.

Definition at line 660 of file imageDecorrelation.py.

660 def __init__(self, *args, **kwargs):
661 DecorrelateALKernelTask.__init__(self, *args, **kwargs)
662

Member Function Documentation

◆ run()

lsst.ip.diffim.imageDecorrelation.DecorrelateALKernelMapper.run ( self,
subExposure,
expandedSubExposure,
fullBBox,
template,
science,
alTaskResult = None,
psfMatchingKernel = None,
preConvKernel = None,
** kwargs )
Perform decorrelation operation on `subExposure`, using
`expandedSubExposure` to allow for invalid edge pixels arising from
convolutions.

This method performs A&L decorrelation on `subExposure` using
local measures for image variances and PSF. `subExposure` is a
sub-exposure of the non-decorrelated A&L diffim. It also
requires the corresponding sub-exposures of the template
(`template`) and science (`science`) exposures.

Parameters
----------
subExposure : `lsst.afw.image.Exposure`
    the sub-exposure of the diffim
expandedSubExposure : `lsst.afw.image.Exposure`
    the expanded sub-exposure upon which to operate
fullBBox : `lsst.geom.Box2I`
    the bounding box of the original exposure
template : `lsst.afw.image.Exposure`
    the corresponding sub-exposure of the template exposure
science : `lsst.afw.image.Exposure`
    the corresponding sub-exposure of the science exposure
alTaskResult : `lsst.pipe.base.Struct`
    the result of A&L image differencing on `science` and
    `template`, importantly containing the resulting
    `psfMatchingKernel`. Can be `None`, only if
    `psfMatchingKernel` is not `None`.
psfMatchingKernel : Alternative parameter for passing the
    A&L `psfMatchingKernel` directly.
preConvKernel : If not None, then pre-filtering was applied
    to science exposure, and this is the pre-convolution
    kernel.
kwargs :
    additional keyword arguments propagated from
    `ImageMapReduceTask.run`.

Returns
-------
A `pipeBase.Struct` containing:

    - ``subExposure`` : the result of the `subExposure` processing.
    - ``decorrelationKernel`` : the decorrelation kernel, currently
        not used.

Notes
-----
This `run` method accepts parameters identical to those of
`ImageMapper.run`, since it is called from the
`ImageMapperTask`. See that class for more information.

Reimplemented from lsst.ip.diffim.imageDecorrelation.DecorrelateALKernelTask.

Definition at line 663 of file imageDecorrelation.py.

665 preConvKernel=None, **kwargs):
666 """Perform decorrelation operation on `subExposure`, using
667 `expandedSubExposure` to allow for invalid edge pixels arising from
668 convolutions.
669
670 This method performs A&L decorrelation on `subExposure` using
671 local measures for image variances and PSF. `subExposure` is a
672 sub-exposure of the non-decorrelated A&L diffim. It also
673 requires the corresponding sub-exposures of the template
674 (`template`) and science (`science`) exposures.
675
676 Parameters
677 ----------
678 subExposure : `lsst.afw.image.Exposure`
679 the sub-exposure of the diffim
680 expandedSubExposure : `lsst.afw.image.Exposure`
681 the expanded sub-exposure upon which to operate
682 fullBBox : `lsst.geom.Box2I`
683 the bounding box of the original exposure
684 template : `lsst.afw.image.Exposure`
685 the corresponding sub-exposure of the template exposure
686 science : `lsst.afw.image.Exposure`
687 the corresponding sub-exposure of the science exposure
688 alTaskResult : `lsst.pipe.base.Struct`
689 the result of A&L image differencing on `science` and
690 `template`, importantly containing the resulting
691 `psfMatchingKernel`. Can be `None`, only if
692 `psfMatchingKernel` is not `None`.
693 psfMatchingKernel : Alternative parameter for passing the
694 A&L `psfMatchingKernel` directly.
695 preConvKernel : If not None, then pre-filtering was applied
696 to science exposure, and this is the pre-convolution
697 kernel.
698 kwargs :
699 additional keyword arguments propagated from
700 `ImageMapReduceTask.run`.
701
702 Returns
703 -------
704 A `pipeBase.Struct` containing:
705
706 - ``subExposure`` : the result of the `subExposure` processing.
707 - ``decorrelationKernel`` : the decorrelation kernel, currently
708 not used.
709
710 Notes
711 -----
712 This `run` method accepts parameters identical to those of
713 `ImageMapper.run`, since it is called from the
714 `ImageMapperTask`. See that class for more information.
715 """
716 templateExposure = template # input template
717 scienceExposure = science # input science image
718 if alTaskResult is None and psfMatchingKernel is None:
719 raise RuntimeError('Both alTaskResult and psfMatchingKernel cannot be None')
720 psfMatchingKernel = alTaskResult.psfMatchingKernel if alTaskResult is not None else psfMatchingKernel
721
722 # subExp and expandedSubExp are subimages of the (un-decorrelated) diffim!
723 # So here we compute corresponding subimages of templateExposure and scienceExposure
724 subExp2 = scienceExposure.Factory(scienceExposure, expandedSubExposure.getBBox())
725 subExp1 = templateExposure.Factory(templateExposure, expandedSubExposure.getBBox())
726
727 # Prevent too much log INFO verbosity from DecorrelateALKernelTask.run
728 logLevel = self.log.level
729 self.log.setLevel(self.log.WARNING)
730 res = DecorrelateALKernelTask.run(self, subExp2, subExp1, expandedSubExposure,
731 psfMatchingKernel, preConvKernel, **kwargs)
732 self.log.setLevel(logLevel) # reset the log level
733
734 diffim = res.correctedExposure.Factory(res.correctedExposure, subExposure.getBBox())
735 out = pipeBase.Struct(subExposure=diffim, )
736 return out
737
738

Member Data Documentation

◆ _DefaultName

str lsst.ip.diffim.imageDecorrelation.DecorrelateALKernelMapper._DefaultName = 'ip_diffim_decorrelateALKernelMapper'
staticprotected

Definition at line 658 of file imageDecorrelation.py.

◆ ConfigClass

lsst.ip.diffim.imageDecorrelation.DecorrelateALKernelMapper.ConfigClass = DecorrelateALKernelConfig
static

Definition at line 657 of file imageDecorrelation.py.


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