LSST Applications 27.0.0,g0265f82a02+469cd937ee,g02d81e74bb+21ad69e7e1,g1470d8bcf6+cbe83ee85a,g2079a07aa2+e67c6346a6,g212a7c68fe+04a9158687,g2305ad1205+94392ce272,g295015adf3+81dd352a9d,g2bbee38e9b+469cd937ee,g337abbeb29+469cd937ee,g3939d97d7f+72a9f7b576,g487adcacf7+71499e7cba,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+df404f777f,g5a732f18d5+be83d3ecdb,g64a986408d+21ad69e7e1,g858d7b2824+21ad69e7e1,g8a8a8dda67+a6fc98d2e7,g99cad8db69+f62e5b0af5,g9ddcbc5298+d4bad12328,ga1e77700b3+9c366c4306,ga8c6da7877+71e4819109,gb0e22166c9+25ba2f69a1,gb6a65358fc+469cd937ee,gbb8dafda3b+69d3c0e320,gc07e1c2157+a98bf949bb,gc120e1dc64+615ec43309,gc28159a63d+469cd937ee,gcf0d15dbbd+72a9f7b576,gdaeeff99f8+a38ce5ea23,ge6526c86ff+3a7c1ac5f1,ge79ae78c31+469cd937ee,gee10cc3b42+a6fc98d2e7,gf1cff7945b+21ad69e7e1,gfbcc870c63+9a11dc8c8f
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
lsst.meas.base.catalogCalculation.CCContext Class Reference

Public Member Functions

 __init__ (self, plugin, cat, log)
 
 __enter__ (self)
 
 __exit__ (self, exc_type, exc_value, traceback)
 

Public Attributes

 plugin
 
 cat
 
 log
 

Detailed Description

Handle errors that are thrown by catalog calculation plugins.

This is a context manager.

Parameters
----------
plugin : `CatalogCalculationPlugin`
    The plugin that is to be run.
cat : `lsst.afw.table.SourceCatalog` or `lsst.afw.table.SourceRecord`
    May either be a `~lsst.afw.table.SourceCatalog` or a single
    `~lsst.afw.table.SourceRecord`, depending on the plugin type.
log : `lsst.log.Log` or `logging.Logger`
    A logger. Generally, this should be the logger of the object in which
    the context manager is being used.

Definition at line 120 of file catalogCalculation.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.meas.base.catalogCalculation.CCContext.__init__ ( self,
plugin,
cat,
log )

Definition at line 136 of file catalogCalculation.py.

136 def __init__(self, plugin, cat, log):
137 self.plugin = plugin
138 self.cat = cat
139 self.log = log
140

Member Function Documentation

◆ __enter__()

lsst.meas.base.catalogCalculation.CCContext.__enter__ ( self)

Definition at line 141 of file catalogCalculation.py.

141 def __enter__(self):
142 return
143

◆ __exit__()

lsst.meas.base.catalogCalculation.CCContext.__exit__ ( self,
exc_type,
exc_value,
traceback )

Definition at line 144 of file catalogCalculation.py.

144 def __exit__(self, exc_type, exc_value, traceback):
145 if exc_type is None:
146 return True
147 if exc_type in FATAL_EXCEPTIONS:
148 raise exc_value
149 elif exc_type is MeasurementError:
150 self.plugin.fail(self.cat, exc_value)
151 else:
152 self.log.warning("Error in %s.calculate: %s", self.plugin.name, exc_value)
153 return True
154
155

Member Data Documentation

◆ cat

lsst.meas.base.catalogCalculation.CCContext.cat

Definition at line 138 of file catalogCalculation.py.

◆ log

lsst.meas.base.catalogCalculation.CCContext.log

Definition at line 139 of file catalogCalculation.py.

◆ plugin

lsst.meas.base.catalogCalculation.CCContext.plugin

Definition at line 137 of file catalogCalculation.py.


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