lsst.meas.algorithms gf82c78fb6f+cb2cc97428
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
lsst.meas.algorithms.subtractBackground.SubtractBackgroundTask Class Reference
Inheritance diagram for lsst.meas.algorithms.subtractBackground.SubtractBackgroundTask:

Public Member Functions

def run (self, exposure, background=None, stats=True, statsKeys=None)
 
def fitBackground (self, maskedImage, nx=0, ny=0, algorithm=None)
 

Static Public Attributes

 ConfigClass = SubtractBackgroundConfig
 

Detailed Description

Subtract the background from an exposure

Definition at line 119 of file subtractBackground.py.

Member Function Documentation

◆ fitBackground()

def lsst.meas.algorithms.subtractBackground.SubtractBackgroundTask.fitBackground (   self,
  maskedImage,
  nx = 0,
  ny = 0,
  algorithm = None 
)
Estimate the background of a masked image

Parameters
----------
maskedImage : `lsst.afw.image.maskedImage`
    Masked image whose background is to be computed
nx : 'int`
    Number of x bands; if 0 compute from width and `self.config.binSizeX`
ny : `int`
    Number of y bands; if 0 compute from height and `self.config.binSizeY`
algorithm : `str`
    Name of interpolation algorithm; if None use `self.config.algorithm`

Returns
-------
bg : `lsst.afw.math.Background`
    A fit background

Raises
------
RuntimeError
    Raised if lsst.afw.math.makeBackground returns None, an indicator
    of failure.

Definition at line 204 of file subtractBackground.py.

◆ run()

def lsst.meas.algorithms.subtractBackground.SubtractBackgroundTask.run (   self,
  exposure,
  background = None,
  stats = True,
  statsKeys = None 
)
Fit and subtract the background of an exposure.

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Exposure whose background is to be subtracted.
background : `lsst.afw.math.BackgroundList`
    Initial background model already subtracted. May be None if no background
    has been subtracted.
stats : `bool`
    If True then measure the mean and variance of the full background model and
    record the results in the exposure's metadata.
statsKeys : `tuple`
    Key names used to store the mean and variance of the background in the
    exposure's metadata (another tuple); if None then use ("BGMEAN", "BGVAR");
    ignored if stats is false.

Returns
-------
background : `lsst.afw.math.BackgroundLst`
    Full background model (initial model with changes), contained in an
    `lsst.pipe.base.Struct`.

Definition at line 125 of file subtractBackground.py.

Member Data Documentation

◆ ConfigClass

lsst.meas.algorithms.subtractBackground.SubtractBackgroundTask.ConfigClass = SubtractBackgroundConfig
static

Definition at line 122 of file subtractBackground.py.


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