lsst.meas.base  16.0-13-gd9b1b71+13
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...

Public Member Functions

def __init__ (self, owner)
 
def __enter__ (self)
 
def addChild (self, instFlux, 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 42 of file tests.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 51 of file tests.py.

Member Function Documentation

◆ __enter__()

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

Definition at line 57 of file tests.py.

◆ __exit__()

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

Definition at line 77 of file tests.py.

◆ addChild()

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

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

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

Definition at line 61 of file tests.py.

Member Data Documentation

◆ children

lsst.meas.base.tests.BlendContext.children

Definition at line 55 of file tests.py.

◆ owner

lsst.meas.base.tests.BlendContext.owner

Definition at line 52 of file tests.py.

◆ parentImage

lsst.meas.base.tests.BlendContext.parentImage

Definition at line 54 of file tests.py.

◆ parentRecord

lsst.meas.base.tests.BlendContext.parentRecord

Definition at line 53 of file tests.py.


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