MivotInstance

class pyvo.mivot.viewer.MivotInstance(**instance_dict)[source]

Bases: object

MivotInstance holds the dictionary (__dict__) similar with the mapped model structure where the references have been resolved. The dictionary keeps the hierarchy of the XML : “key” : {not a leaf} means key is the dmtype of an INSTANCE “key” : {leaf} means key is the dmrole of an ATTRIBUTE “key” : “value” means key is an element of ATTRIBUTE “key” : [] means key is the dmtype of a COLLECTION

Constructor of the MIVOT class.

Parameters:
kwargs (dict): Dictionary of the XML object.

Methods Summary

get_SkyCoord()

to_dict()

return a human readable (dict) representation of object

to_hk_dict()

return a human readable (dict) representation of object with a few housekeeping data such as column references.

update(row[, ref])

Update the MIVOT class with the new data row.

Methods Documentation

get_SkyCoord()[source]
Returns:
  • a SkyCoord instance or None
to_dict()[source]

return a human readable (dict) representation of object

to_hk_dict()[source]

return a human readable (dict) representation of object with a few housekeeping data such as column references. This might be used to apply the mapping out of the MivotViewer context

update(row, ref=None)[source]

Update the MIVOT class with the new data row. For each leaf of the MIVOT class, we update the value with the new data row.

Parameters:
row (astropy.table.row.Row): The new data row.
ref (str, optional):The reference of the data row, default is None.