lsst.meas.deblender g99cad8db69+1747e75aa3
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
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
 
 kwargs
 
 onReset
 
 maxIterations
 
 iterations
 

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`, 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 125 of file plugins.py.

◆ __str__()

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

Definition at line 122 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 108 of file plugins.py.

Member Data Documentation

◆ func

lsst.meas.deblender.plugins.DeblenderPlugin.func

Definition at line 101 of file plugins.py.

◆ iterations

lsst.meas.deblender.plugins.DeblenderPlugin.iterations

Definition at line 106 of file plugins.py.

◆ kwargs

lsst.meas.deblender.plugins.DeblenderPlugin.kwargs

Definition at line 102 of file plugins.py.

◆ maxIterations

lsst.meas.deblender.plugins.DeblenderPlugin.maxIterations

Definition at line 104 of file plugins.py.

◆ onReset

lsst.meas.deblender.plugins.DeblenderPlugin.onReset

Definition at line 103 of file plugins.py.


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