pyvo icon indicating copy to clipboard operation
pyvo copied to clipboard

MIVOT: making the descripton of the model elements available through the API

Open lmichel opened this issue 11 months ago • 0 comments

As PR #497 is very large, we have decided not to overload it with advanced features (see #532). This issue (suggested by @gilleslandais) proposes a feature that could be implemented once #497 is merged.

The MIVOT <MODEL> element provides access to the VO-DML file associated with the referenced model. These files contain a free text description of each model element. These descriptive items are part of the standard.

It would be valuable to make these descriptions available for the end users.

scs_srv = SCSService(viewer_url)
m_viewer = MivotViewer()
    scs_srv.search(
        pos=SkyCoord(ra=52.26708 * u.degree, dec=59.94027 * u.degree, frame='icrs'),
        radius=0.05
    )
)
mivot_instance = m_viewer.instance
while m_viewer.next():
    print(mivot_instance.latitude.value)
    >>> 59.94033461
    print(mivot_instance.latitude.description)
    >>> Right Ascension as defined in the Coords model (foo description).
    print(mivot_instance.longitude.value)
    >>> 52.26722684
    print(mivot_instance.longitude.description)
    >>> Declination as defined in the Coords model (foo description).

lmichel avatar Mar 18 '24 11:03 lmichel