lsst.meas.base g51c93253c0+9731be2fa5
Loading...
Searching...
No Matches
lsst.meas.base.tests.BlendContext Class Reference

Public Member Functions

 __init__ (self, owner)
 
 __enter__ (self)
 
 addChild (self, instFlux, centroid, shape=None)
 
 __exit__ (self, type_, value, tb)
 

Public Attributes

 owner = owner
 
 parentRecord = self.owner.catalog.addNew()
 
 parentImage = lsst.afw.image.ImageF(self.owner.exposure.getBBox())
 
list children = []
 

Detailed Description

Context manager which adds multiple overlapping sources and a parent.

Notes
-----
This is used as the return value for `TestDataset.addBlend`, and this is
the only way it should be used.

Definition at line 45 of file tests.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 54 of file tests.py.

Member Function Documentation

◆ __enter__()

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

Definition at line 60 of file tests.py.

◆ __exit__()

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

Definition at line 81 of file tests.py.

◆ addChild()

lsst.meas.base.tests.BlendContext.addChild ( self,
instFlux,
centroid,
shape = None )
Add a child to the blend; return corresponding truth catalog record.

instFlux : `float`
    Total instFlux of the source to be added.
centroid : `lsst.geom.Point2D`
    Position of the source to be added.
shape : `lsst.afw.geom.Quadrupole`
    Second moments of the source before PSF convolution.  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 = owner

Definition at line 55 of file tests.py.

◆ parentImage

lsst.meas.base.tests.BlendContext.parentImage = lsst.afw.image.ImageF(self.owner.exposure.getBBox())

Definition at line 57 of file tests.py.

◆ parentRecord

lsst.meas.base.tests.BlendContext.parentRecord = self.owner.catalog.addNew()

Definition at line 56 of file tests.py.


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