2323class MiriadeClass (BaseQuery ):
2424 """
2525 A class for querying the
26- `IMCCE/Miriade <http ://vo .imcce.fr/webservices/miriade/>`_ service.
26+ `IMCCE/Miriade <https ://ssp .imcce.fr/webservices/miriade/>`_ service.
2727 """
2828
2929 _query_uri = None # uri used in query
@@ -49,8 +49,8 @@ def get_ephemerides_async(self, targetname, *, objtype='asteroid',
4949 get_raw_response = False , cache = True ):
5050 """
5151 Query the
52- `IMCCE Miriade <http ://vo .imcce.fr/webservices/miriade/>`_
53- `ephemcc <http ://vo .imcce.fr/webservices/miriade/? ephemcc>`_
52+ `IMCCE Miriade <https ://ssp .imcce.fr/webservices/miriade/>`_
53+ `ephemcc <https ://ssp .imcce.fr/webservices/miriade/api/ ephemcc>`_
5454 service.
5555
5656
@@ -85,7 +85,7 @@ def get_ephemerides_async(self, targetname, *, objtype='asteroid',
8585 location : str, optional
8686 Location of the observer on Earth as a code or a set of
8787 coordinates. See the
88- `Miriade manual <http ://vo .imcce.fr/webservices/miriade/?documentation#field_7>`_
88+ `Miriade manual <https ://ssp .imcce.fr/webservices/miriade/?documentation#field_7>`_
8989 for details. Default: geocentric location (``'500'``)
9090
9191 coordtype : int, optional
@@ -299,17 +299,27 @@ def _parse_result(self, response, *, verbose=None):
299299 votable = parse (voraw )
300300 data = votable .get_first_table ().to_table ()
301301
302- # modify table columns
302+ # modify table columns. This is an ugly hack as astropy's votable parser
303+ # is not yet capable of parsing some of these properly.
304+ # Also, not clear why some of the columns are now parsed as object as
305+ # opposed to strings, workaround here is to do .astype()
306+
307+ data ['date' ] = Time (data ['date' ].astype ('str' ), format = 'isot' )
308+
309+ # Adding for backwards compatibility
310+ data ['epoch' ] = data ['date' ].jd
303311 data ['epoch' ].unit = u .d
304312
305- if 'ra' in data .columns :
306- data ['ra' ] = Angle (data ['ra' ], unit = u .hourangle ).deg * u .deg
307- data .rename_column ('ra' , 'RA' )
313+ if 'RA' in data .columns :
314+ data ['RA' ] = Angle (data ['RA' ].astype ('str' ), unit = u .hourangle ).deg * u .deg
315+
316+ if 'DEC' in data .columns :
317+ data ['DEC' ] = Angle (data ['DEC' ], unit = u .deg ).deg * u .deg
308318
309319 if 'dec' in data .columns :
310- data ['dec' ] = Angle (data ['dec' ], unit = u .deg ).deg * u .deg
311320 data .rename_column ('dec' , 'DEC' )
312321
322+ # These don't seem to be returned with the new API/url, as of 2025-04-07
313323 if 'raJ2000' in data .columns and 'decJ2000' in data .columns :
314324 data ['raJ2000' ] = Angle (
315325 data ['raJ2000' ], unit = u .hourangle ).deg * u .deg
0 commit comments