Class to support bright object masks
N.b. I/O is done by providing a readFits method which fools the butler.
Definition at line 31 of file objectMasks.py.
◆ __init__()
def lsst.pipe.tasks.objectMasks.ObjectMaskCatalog.__init__ |
( |
|
self | ) |
|
◆ __getitem__()
def lsst.pipe.tasks.objectMasks.ObjectMaskCatalog.__getitem__ |
( |
|
self, |
|
|
|
i |
|
) |
| |
◆ __iter__()
def lsst.pipe.tasks.objectMasks.ObjectMaskCatalog.__iter__ |
( |
|
self | ) |
|
◆ __len__()
def lsst.pipe.tasks.objectMasks.ObjectMaskCatalog.__len__ |
( |
|
self | ) |
|
◆ __setitem__()
def lsst.pipe.tasks.objectMasks.ObjectMaskCatalog.__setitem__ |
( |
|
self, |
|
|
|
i, |
|
|
|
v |
|
) |
| |
◆ read()
def lsst.pipe.tasks.objectMasks.ObjectMaskCatalog.read |
( |
|
fileName | ) |
|
|
static |
Read a ds9 region file, returning a ObjectMaskCatalog object
The files should be structured as follows:
# Description of catalogue as a comment
# CATALOG: catalog-id-string
# TRACT: 0
# PATCH: 5,4
# FILTER: HSC-I
wcs; fk5
circle(RA, DEC, RADIUS) # ID: 1, mag: 12.34
box(RA, DEC, XSIZE, YSIZE, THETA) # ID: 2, mag: 23.45
...
The ", mag: XX.YY" is optional
The commented lines must be present, with the relevant fields such as
tract patch and filter filled in. The coordinate system must be listed
as above. Each patch is specified as a box or circle, with RA, DEC,
and dimensions specified in decimal degrees (with or without an
explicit "d").
Only (axis-aligned) boxes and circles are currently supported as
region definitions.
Definition at line 92 of file objectMasks.py.
◆ readFits()
def lsst.pipe.tasks.objectMasks.ObjectMaskCatalog.readFits |
( |
|
cls, |
|
|
|
fileName, |
|
|
|
hdu = 0 , |
|
|
|
flags = 0 |
|
) |
| |
FitsCatalogStorage facade for `read`.
This method is intended for use by the Gen2 Butler only.
Parameters
----------
fileName : `str`
Name of the file to read.
hdu : `int`
Provided for compatibility with the "FitsCatalogStorage" read API
defined in `lsst.daf.persistence`, and ignored here.
flags : `int`
Provided for compatibility with the "FitsCatalogStorage" read API
defined in `lsst.daf.persistence`, and ignored here.
Notes
-----
Having a `readFits` method makes the `ObjectCatalogMask` class
duck-type compatible with `lsst.afw.table` catalogs, to the extent
needed to support reading by the Gen2 Butler with no specialized code
in `lsst.daf.persistence`. The on-disk type should actually be an
ASCII ds9 region file, typically with a ".reg" suffix.
Definition at line 65 of file objectMasks.py.
◆ _catalog
lsst.pipe.tasks.objectMasks.ObjectMaskCatalog._catalog |
|
protected |
◆ addNew
lsst.pipe.tasks.objectMasks.ObjectMaskCatalog.addNew |
◆ table
lsst.pipe.tasks.objectMasks.ObjectMaskCatalog.table |
The documentation for this class was generated from the following file: