lsst.pipe.tasks gcf790cdeb6+f6e4da7c1c
Loading...
Searching...
No Matches
lsst.pipe.tasks.tractBackground.TractBackground Class Reference

Public Member Functions

 __init__ (self, config, skymap, tract, values=None, numbers=None, variances=None)
 
 __reduce__ (self)
 
 clone (self)
 
 addWarp (self, warp)
 
 __iadd__ (self, other)
 
 toWarpBackground (self, warp)
 
 getStatsImage (self)
 
 getVarianceImage (self)
 

Public Attributes

 config = config
 
 skymap = skymap
 
 tract = tract
 
 tractInfo = self.skymap[tract]
 
 dims = geom.Extent2I(tractDimX / self.config.xBin, tractDimY / self.config.yBin)
 

Protected Attributes

 _values = values
 
 _numbers = numbers
 
 _variances = variances
 

Detailed Description

Background model for a tract, comprised of warped exposures.

Similar to lsst.pipe.background.FocalPlaneBackground class, in that we
model the background using the "superpixel" method, measuring the
background in each superpixel and interpolating between them.

There is one use pattern for building a background model: create a
`TractBackground`, then `addWarp` for each of the patches in a tract.

Once you've built the background model, you can apply it to individual
warps with the `toWarpBackground` method.

Parameters
----------
config : `TractBackgroundConfig`
    Configuration for measuring tract backgrounds.
skymap : `lsst.skymap.ringsSkyMap.RingsSkyMap`
    Skymap object
tract : `int`
    Working Tract ID.
transform : `lsst.afw.geom.TransformPoint2ToPoint2`
    Transformation from tract coordinates to warp coordinates.
values : `lsst.afw.image.ImageF`
    Measured background values.
numbers : `lsst.afw.image.ImageF`
    Number of pixels in each background measurement.
variances : `lsst.afw.image.ImageF`
    Measured background variances.

Definition at line 75 of file tractBackground.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.pipe.tasks.tractBackground.TractBackground.__init__ ( self,
config,
skymap,
tract,
values = None,
numbers = None,
variances = None )

Definition at line 106 of file tractBackground.py.

Member Function Documentation

◆ __iadd__()

lsst.pipe.tasks.tractBackground.TractBackground.__iadd__ ( self,
other )
Merges with another TractBackground

This allows multiple background models to be constructed from
different warps, and then merged to form a single consistent
background model for the entire tract.

Parameters
----------
other : `TractBackground`
    Another background model to merge.

Returns
-------
self : `TractBackground`
    The merged background model.

Definition at line 206 of file tractBackground.py.

◆ __reduce__()

lsst.pipe.tasks.tractBackground.TractBackground.__reduce__ ( self)

Definition at line 138 of file tractBackground.py.

◆ addWarp()

lsst.pipe.tasks.tractBackground.TractBackground.addWarp ( self,
warp )
Bins masked images of warps and adds these values into a blank image
with the binned tract dimensions at the location of the warp in the
tract.

Parameters
----------
warp : `lsst.afw.image.ExposureF`
    Warped image corresponding to a single patch in a single visit.

Definition at line 153 of file tractBackground.py.

◆ clone()

lsst.pipe.tasks.tractBackground.TractBackground.clone ( self)

Definition at line 148 of file tractBackground.py.

◆ getStatsImage()

lsst.pipe.tasks.tractBackground.TractBackground.getStatsImage ( self)
Return the background model data

This is the measurement of the background for each of the superpixels.

Definition at line 314 of file tractBackground.py.

◆ getVarianceImage()

lsst.pipe.tasks.tractBackground.TractBackground.getVarianceImage ( self)
Return a variance image with the background model dimensions

Notes
-----
Does not interpolate or extrapolate over bad values.

Definition at line 334 of file tractBackground.py.

◆ toWarpBackground()

lsst.pipe.tasks.tractBackground.TractBackground.toWarpBackground ( self,
warp )
Produce a background model for a warp

The superpixel model is transformed back to the native pixel
resolution, for application to the background of an individual warp.

Parameters
----------
warp : `lsst.afw.image.ExposureF`
    Warped image corresponding to a single patch in a single visit.

Returns
-------
bg : `lsst.afw.math.BackgroundList`
    Background model for warp.

Definition at line 235 of file tractBackground.py.

Member Data Documentation

◆ _numbers

lsst.pipe.tasks.tractBackground.TractBackground._numbers = numbers
protected

Definition at line 129 of file tractBackground.py.

◆ _values

lsst.pipe.tasks.tractBackground.TractBackground._values = values
protected

Definition at line 122 of file tractBackground.py.

◆ _variances

lsst.pipe.tasks.tractBackground.TractBackground._variances = variances
protected

Definition at line 136 of file tractBackground.py.

◆ config

lsst.pipe.tasks.tractBackground.TractBackground.config = config

Definition at line 109 of file tractBackground.py.

◆ dims

lsst.pipe.tasks.tractBackground.TractBackground.dims = geom.Extent2I(tractDimX / self.config.xBin, tractDimY / self.config.yBin)

Definition at line 114 of file tractBackground.py.

◆ skymap

lsst.pipe.tasks.tractBackground.TractBackground.skymap = skymap

Definition at line 110 of file tractBackground.py.

◆ tract

lsst.pipe.tasks.tractBackground.TractBackground.tract = tract

Definition at line 111 of file tractBackground.py.

◆ tractInfo

lsst.pipe.tasks.tractBackground.TractBackground.tractInfo = self.skymap[tract]

Definition at line 112 of file tractBackground.py.


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