astropy / pyvo

An Astropy affiliated package providing access to remote data and services of the Virtual Observatory (VO) using Python.
https://pyvo.readthedocs.io/en/latest
BSD 3-Clause "New" or "Revised" License
74 stars 50 forks source link

MIVOT: automatically generate SkyCoord instances #532

Open lmichel opened 3 months ago

lmichel commented 3 months ago

As PR #497 is very large, we have decided not to overload it with advanced features. The reason for this is both to limit the review task, and to ensure that the deep layers are valid before moving on.

This issue proposes a feature that could be implemented once #497 is merged. We could add a module (in the features package) able to automatically generate Astropy@SkyCoord instances from the MIVOT annotations. This would be a 2 step process:

The code below illustrates how this new module could be used:

scs_srv = SCSService(vizier_url)
m_viewer = MivotViewer(
        scs_srv.search(
            pos=SkyCoord(ra=52.26708 * easting, dec=59.94027 * easting, frame='icrs'),
            radius=0.05
        )
    )
while m_viewer.next():
    sky_coord = m_viewer.sky_coord()

This approach is meant to be extended to other quantities such as Timeor Photometric data.