lsst.meas.deblender  20.0.0-1-g4d801e7+0c5478f517
Public Member Functions | Public Attributes | List of all members
lsst.meas.deblender.plugins.DeblenderPlugin Class Reference

Public Member Functions

def __init__ (self, func, onReset=None, maxIterations=50, **kwargs)
 
def run (self, debResult, log)
 
def __str__ (self)
 
def __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 63 of file plugins.py.

Constructor & Destructor Documentation

◆ __init__()

def 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 71 of file plugins.py.

Member Function Documentation

◆ __repr__()

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

Definition at line 115 of file plugins.py.

◆ __str__()

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

Definition at line 112 of file plugins.py.

◆ run()

def 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 99 of file plugins.py.

Member Data Documentation

◆ func

lsst.meas.deblender.plugins.DeblenderPlugin.func

Definition at line 92 of file plugins.py.

◆ iterations

lsst.meas.deblender.plugins.DeblenderPlugin.iterations

Definition at line 97 of file plugins.py.

◆ kwargs

lsst.meas.deblender.plugins.DeblenderPlugin.kwargs

Definition at line 93 of file plugins.py.

◆ maxIterations

lsst.meas.deblender.plugins.DeblenderPlugin.maxIterations

Definition at line 95 of file plugins.py.

◆ onReset

lsst.meas.deblender.plugins.DeblenderPlugin.onReset

Definition at line 94 of file plugins.py.


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