lsst.meas.deblender g262e1987ae+b35e0a70f9
Loading...
Searching...
No Matches
lsst.meas.deblender.plugins.DeblenderPlugin Class Reference

Public Member Functions

 __init__ (self, func, onReset=None, maxIterations=50, **kwargs)
 
 run (self, debResult, log)
 
 __str__ (self)
 
 __repr__ (self)
 

Public Attributes

 func = func
 
 kwargs = kwargs
 
 onReset = onReset
 
 maxIterations = maxIterations
 
int iterations = 0
 

Detailed Description

Class to define plugins for the deblender.

The new deblender executes a series of plugins specified by the user.
Each plugin defines the function to be executed, the keyword arguments
required by the function, and whether or not certain portions of the
deblender might need to be rerun as a result of the function.

Definition at line 68 of file plugins.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.meas.deblender.plugins.DeblenderPlugin.__init__ ( self,
func,
onReset = None,
maxIterations = 50,
** kwargs )
Initialize a deblender plugin

Parameters
----------
func: `function`
    Function to run when the plugin is executed.
    The function should always take
    `debResult`, a `DeblenderResult` that stores the deblender result,
    and `log`, an `lsst.log.Logger` or
    `lsst.utils.logging.LsstLogAdapter`, as the first two arguments,
    as well as any additional keyword arguments (that must
    be specified in ``kwargs``). The function should also return
    ``modified``, a `bool` that tells the deblender whether
    or not any templates have been modified by the function.
    If ``modified==True``, the deblender will go back to step
    ``onReset``, unless the has already been run ``maxIterations``.
onReset: `int`
    Index of the deblender plugin to return to if ``func`` modifies
    any templates. The default is ``None``, which does not re-run
    any plugins.
maxIterations: `int`
    Maximum number of times the deblender will reset when
    the current plugin
    returns ``True``.

Definition at line 76 of file plugins.py.

Member Function Documentation

◆ __repr__()

lsst.meas.deblender.plugins.DeblenderPlugin.__repr__ ( self)

Definition at line 126 of file plugins.py.

◆ __str__()

lsst.meas.deblender.plugins.DeblenderPlugin.__str__ ( self)

Definition at line 123 of file plugins.py.

◆ run()

lsst.meas.deblender.plugins.DeblenderPlugin.run ( self,
debResult,
log )
Execute the current plugin

Once the plugin has finished, check to see if part of the deblender
must be executed again.

Definition at line 109 of file plugins.py.

Member Data Documentation

◆ func

lsst.meas.deblender.plugins.DeblenderPlugin.func = func

Definition at line 102 of file plugins.py.

◆ iterations

int lsst.meas.deblender.plugins.DeblenderPlugin.iterations = 0

Definition at line 107 of file plugins.py.

◆ kwargs

lsst.meas.deblender.plugins.DeblenderPlugin.kwargs = kwargs

Definition at line 103 of file plugins.py.

◆ maxIterations

lsst.meas.deblender.plugins.DeblenderPlugin.maxIterations = maxIterations

Definition at line 105 of file plugins.py.

◆ onReset

lsst.meas.deblender.plugins.DeblenderPlugin.onReset = onReset

Definition at line 104 of file plugins.py.


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