Details
-
Type:
Story
-
Status: Invalid
-
Priority:
Minor
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: meas_base
-
Labels:None
-
Templates:customfield_11800 22375
-
Story Points:2
-
Team:Data Release Production
Description
The meas_base framework includes SafeCentroidExtractor, a convenience routine for extracting a centroid from a source record, setting a consistent set of flags if that's not possible or if the centroid is in some way compromised. This consistent flag handling is made possible by the use of the FlagHandler class.
Unfortunately, FlagHandler is not meaningfully usable from Python, not least because it's impossible to define flags:
>>> import lsst.meas.base as measBase |
>>> measBase.FlagDefinition("flag", "doc") |
[...]
|
TypeError: __init__() takes exactly 1 argument (3 given) |
>>> fd = measBase.FlagDefinition() |
>>> fd.name = "flag" |
[...]
|
AttributeError: You cannot add attributes to <lsst.meas.base.baseLib.FlagDefinition; proxy of <Swig Object of type 'lsst::meas::base::FlagDefinition *' at 0x10a82b900> > |
Looking further, even were we able to create FlagDefinitions, the FlagHandler is initialized with pointers to the beginning/end of a container of them, which seems like a stretch for Python code.
Please add Python support for these routines.