23
23
class MiriadeClass (BaseQuery ):
24
24
"""
25
25
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.
27
27
"""
28
28
29
29
_query_uri = None # uri used in query
@@ -49,8 +49,8 @@ def get_ephemerides_async(self, targetname, *, objtype='asteroid',
49
49
get_raw_response = False , cache = True ):
50
50
"""
51
51
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>`_
54
54
service.
55
55
56
56
@@ -85,7 +85,7 @@ def get_ephemerides_async(self, targetname, *, objtype='asteroid',
85
85
location : str, optional
86
86
Location of the observer on Earth as a code or a set of
87
87
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>`_
89
89
for details. Default: geocentric location (``'500'``)
90
90
91
91
coordtype : int, optional
@@ -299,17 +299,27 @@ def _parse_result(self, response, *, verbose=None):
299
299
votable = parse (voraw )
300
300
data = votable .get_first_table ().to_table ()
301
301
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
303
311
data ['epoch' ].unit = u .d
304
312
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
308
318
309
319
if 'dec' in data .columns :
310
- data ['dec' ] = Angle (data ['dec' ], unit = u .deg ).deg * u .deg
311
320
data .rename_column ('dec' , 'DEC' )
312
321
322
+ # These don't seem to be returned with the new API/url, as of 2025-04-07
313
323
if 'raJ2000' in data .columns and 'decJ2000' in data .columns :
314
324
data ['raJ2000' ] = Angle (
315
325
data ['raJ2000' ], unit = u .hourangle ).deg * u .deg
0 commit comments