lsst.afw g47a37159df+45adbcf3d0
Loading...
Searching...
No Matches
lsst.afw.detection.utils Namespace Reference

Functions

 writeFootprintAsDefects (fd, foot)
 
np.ndarray footprintsToNumpy (SourceCatalog catalog, geom.Box2I|None bbox=None, tuple[int, int]|None shape=None, tuple[int, int]|None xy0=None, bool asBool=True)
 

Function Documentation

◆ footprintsToNumpy()

np.ndarray lsst.afw.detection.utils.footprintsToNumpy ( SourceCatalog catalog,
geom.Box2I | None bbox = None,
tuple[int, int] | None shape = None,
tuple[int, int] | None xy0 = None,
bool asBool = True )
Convert all of the footprints in a catalog into a boolean array.

Parameters
----------
catalog:
    The source catalog containing the footprints.
    This is typically a mergeDet catalog, or a full source catalog
    with the parents removed.
shape:
    The final shape of the output array.
xy0:
    The lower-left corner of the array that will contain the spans.

Returns
-------
result:
    The array with pixels contained in `spans` marked as `True`.

Definition at line 59 of file utils.py.

◆ writeFootprintAsDefects()

lsst.afw.detection.utils.writeFootprintAsDefects ( fd,
foot )
Write foot as a set of Defects to fd

Given a detection footprint, convert it to a BBoxList and write the output to the file object fd.

Parameters
----------
fd : `typing.TextIO`
foot : `lsst.afw.detection.Footprint`

See Also
--------
lsst.afw.detection.footprintToBBoxList

Definition at line 32 of file utils.py.