lsst.meas.base  14.0-9-g876143c+2
Public Member Functions | Public Attributes | List of all members
lsst.meas.base.tests.BlendContext Class Reference

A Python context manager used to add multiple overlapping sources along with a parent source that represents all of them together. More...

Inheritance diagram for lsst.meas.base.tests.BlendContext:

Public Member Functions

def __init__ (self, owner)
 
def __enter__ (self)
 
def addChild (self, flux, centroid, shape=None)
 Add a child source to the blend, and return the truth catalog record that corresponds to it. More...
 
def __exit__ (self, type_, value, tb)
 

Public Attributes

 owner
 
 parentRecord
 
 parentImage
 
 children
 

Detailed Description

A Python context manager used to add multiple overlapping sources along with a parent source that represents all of them together.

This is used as the return value for TestDataset.addBlend(), and this is the only way it should be used. The only public method is addChild().

Definition at line 45 of file tests.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.meas.base.tests.BlendContext.__init__ (   self,
  owner 
)

Definition at line 54 of file tests.py.

Member Function Documentation

◆ __enter__()

def lsst.meas.base.tests.BlendContext.__enter__ (   self)

Definition at line 60 of file tests.py.

◆ __exit__()

def lsst.meas.base.tests.BlendContext.__exit__ (   self,
  type_,
  value,
  tb 
)

Definition at line 80 of file tests.py.

◆ addChild()

def lsst.meas.base.tests.BlendContext.addChild (   self,
  flux,
  centroid,
  shape = None 
)

Add a child source to the blend, and return the truth catalog record that corresponds to it.

Parameters
[in]fluxTotal flux of the source to be added.
[in]centroidPosition of the source to be added (lsst.afw.geom.Point2D).
[in]shape2nd moments of the source before PSF convolution (lsst.afw.geom.ellipses.Quadrupole). Note that the truth catalog records post-convolution moments)

Definition at line 64 of file tests.py.

Member Data Documentation

◆ children

lsst.meas.base.tests.BlendContext.children

Definition at line 58 of file tests.py.

◆ owner

lsst.meas.base.tests.BlendContext.owner

Definition at line 55 of file tests.py.

◆ parentImage

lsst.meas.base.tests.BlendContext.parentImage

Definition at line 57 of file tests.py.

◆ parentRecord

lsst.meas.base.tests.BlendContext.parentRecord

Definition at line 56 of file tests.py.


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