lsst.pipe.tasks  16.0-13-g1e751bcc+5
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
lsst.pipe.tasks.objectMasks.ObjectMaskCatalog Class Reference

Public Member Functions

def __init__ (self)
 
def __len__ (self)
 
def __iter__ (self)
 
def __getitem__ (self, i)
 
def __setitem__ (self, i, v)
 

Static Public Member Functions

def readFits (fileName, hdu=0, flags=0)
 

Public Attributes

 table
 
 addNew
 

Detailed Description

Class to support bright object masks

N.b. I/O is done by providing a readFits method which fools the butler.

Definition at line 8 of file objectMasks.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.pipe.tasks.objectMasks.ObjectMaskCatalog.__init__ (   self)

Definition at line 14 of file objectMasks.py.

Member Function Documentation

◆ __getitem__()

def lsst.pipe.tasks.objectMasks.ObjectMaskCatalog.__getitem__ (   self,
  i 
)

Definition at line 35 of file objectMasks.py.

◆ __iter__()

def lsst.pipe.tasks.objectMasks.ObjectMaskCatalog.__iter__ (   self)

Definition at line 32 of file objectMasks.py.

◆ __len__()

def lsst.pipe.tasks.objectMasks.ObjectMaskCatalog.__len__ (   self)

Definition at line 29 of file objectMasks.py.

◆ __setitem__()

def lsst.pipe.tasks.objectMasks.ObjectMaskCatalog.__setitem__ (   self,
  i,
  v 
)

Definition at line 38 of file objectMasks.py.

◆ readFits()

def lsst.pipe.tasks.objectMasks.ObjectMaskCatalog.readFits (   fileName,
  hdu = 0,
  flags = 0 
)
static
Read a ds9 region file, returning a ObjectMaskCatalog object

This method is called "readFits" to fool the butler. The corresponding mapper entry looks like
brightObjectMask: {
    template:      "deepCoadd/BrightObjectMasks/%(tract)d/BrightObjectMask-%(tract)d-%(patch)s-%(filter)s.reg"  # noqa E501
    python:        "lsst.obs.subaru.objectMasks.ObjectMaskCatalog"
    persistable:   "PurePythonClass"
    storage:       "FitsCatalogStorage"
}
and this is the only way I know to get it to read a random file type, in this case a ds9 region file.

This method expects to find files named as BrightObjectMask-%(tract)d-%(patch)s-%(filter)s.reg
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 42 of file objectMasks.py.

Member Data Documentation

◆ addNew

lsst.pipe.tasks.objectMasks.ObjectMaskCatalog.addNew

Definition at line 27 of file objectMasks.py.

◆ table

lsst.pipe.tasks.objectMasks.ObjectMaskCatalog.table

Definition at line 26 of file objectMasks.py.


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