MangoObject¶
- class pyvo.mivot.writer.MangoObject(table, *, dmid=None)[source]¶
Bases:
object- This class handles all the components of a MangoObject (properties, origin, instance identifier).
It is meant to be used by
pyvo.mivot.writer.InstancesFromModelsbut not by end users.
There is one specific method for each supported property (EpochPosition, photometry and QueryOrigin).
The internal structure of the classes is hard-coded in the class logic.
Constructor parameters:
- Parameters:
- tableastropy.io.votable.tree.TableElement
VOTable table which data is mapped on Mango
- dmid: stringn optional (default as None)
Reference of the column to be used as a MangoObject identifier
Methods Summary
add_brightness_property(filter_id, mapping)Add a
Brightnessinstance to the properties of the currentMangoObject.add_color_instance(filter_low_id, ...[, ...])Add an
Colorinstance to the properties of the currentMangoObject.add_epoch_position(space_frame_id, ...)Add an
EpochPositioninstance to the properties of the currentMangoObject.get_mango_object([with_origin])Make and return the XML serialization of the MangoObject.
Methods Documentation
- add_brightness_property(filter_id, mapping, semantics={})[source]¶
Add a
Brightnessinstance to the properties of the currentMangoObject. Both mapping and semantics arguments inherit frompyvo.mivot.writer.InstancesFromModels.add_mango_brightness.- Parameters:
- filter_idstring
Identifier (dmid) of the PhotCal INSTANCE located in the GLOBALS
- mappingdict
Mapping of the EpochPosition fields
- semanticsdict
Mapping of the MangoObject property
- Returns:
PropertyThe Brightness instance
- add_color_instance(filter_low_id, filter_high_id, mapping, semantics={})[source]¶
Add an
Colorinstance to the properties of the currentMangoObject. Both mapping and semantics arguments inherit frompyvo.mivot.writer.InstancesFromModels.add_mango_color.- Parameters:
- filter_low_idstring
Identifier (dmid) of the low energy Photfilter INSTANCE located in the GLOBALS
- filter_high_idstring
Identifier (dmid) of the high energy Photfilter INSTANCE located in the GLOBALS
- mappingdict
Mapping of the EpochPosition fields
- semanticsdict
Mapping of the MangoObject property
- Returns:
PropertyThe Color instance
- add_epoch_position(space_frame_id, time_frame_id, mapping, semantics)[source]¶
Add an
EpochPositioninstance to the properties of the currentMangoObject. Both mapping and semantics arguments inherit frompyvo.mivot.writer.InstancesFromModels.add_mango_epoch_position.- Parameters:
- space_frame_idstring
Identifier (dmid) of space system INSTANCE located in the GLOBALS
- time_frame_idstring
Identifier (dmid) of time system INSTANCE located in the GLOBALS
- mappingdict
Mapping of the EpochPosition fields
- semanticsdict
Mapping of the MangoObject property
- Returns:
PropertyThe EpochPosition instance