@@ -96,14 +96,16 @@ def ephemeris_async(self, planet, *, epoch=None, location=None, neptune_arcmodel
96
96
epoch : `~astropy.time.Time` object, or str in format YYYY-MM-DD hh:mm, optional.
97
97
If str is provided then UTC is assumed.
98
98
If no epoch is provided, the current time is used.
99
- location : array-like, or `~astropy.coordinates.EarthLocation`, optional
100
- Observer's location as a
101
- 3-element array of Earth longitude, latitude, altitude, or
99
+ location : str, or array-like, or `~astropy.coordinates.EarthLocation`, optional
100
+ If str, named observeratory supported by the ring node, e.g. JWST.
101
+ If array-like, observer's location as a
102
+ 3-element array of Earth longitude, latitude, altitude
103
+ that istantiates an
102
104
`~astropy.coordinates.EarthLocation`. Longitude and
103
105
latitude should be anything that initializes an
104
106
`~astropy.coordinates.Angle` object, and altitude should
105
107
initialize an `~astropy.units.Quantity` object (with units
106
- of length). If ``None``, then the geocenter is used.
108
+ of length). If ``None``, then the geofocus is used.
107
109
neptune_arcmodel : float, optional. which ephemeris to assume for Neptune's ring arcs
108
110
must be one of 1, 2, or 3 (see https://pds-rings.seti.org/tools/viewer3_nep.shtml for details)
109
111
has no effect if planet != 'Neptune'
@@ -158,9 +160,15 @@ def ephemeris_async(self, planet, *, epoch=None, location=None, neptune_arcmodel
158
160
159
161
if location is None :
160
162
viewpoint = "observatory"
163
+ observatory = "Earth's center"
164
+ latitude , longitude , altitude = "" , "" , ""
165
+ elif isinstance (location , str ):
166
+ viewpoint = "observatory"
167
+ observatory = location
161
168
latitude , longitude , altitude = "" , "" , ""
162
169
else :
163
170
viewpoint = "latlon"
171
+ observatory = "Earth's center"
164
172
if isinstance (location , EarthLocation ):
165
173
loc = location .geodetic
166
174
longitude = loc [0 ].deg
@@ -194,7 +202,7 @@ def ephemeris_async(self, planet, *, epoch=None, location=None, neptune_arcmodel
194
202
("center_dec" , "" ),
195
203
("center_star" , "" ),
196
204
("viewpoint" , viewpoint ),
197
- ("observatory" , "Earth's center" ), # has no effect if viewpoint != observatory so can hardcode. no plans to implement calling observatories by name since ring node only names like 8 observatories
205
+ ("observatory" , observatory ), # has no effect if viewpoint != observatory so can hardcode. no plans to implement calling observatories by name since ring node only names like 8 observatories
198
206
("latitude" , latitude ),
199
207
("longitude" , longitude ),
200
208
("lon_dir" , "east" ),
@@ -255,6 +263,10 @@ def _parse_result(self, response, verbose=None):
255
263
256
264
soup = BeautifulSoup (response .text , "html.parser" )
257
265
text = soup .get_text ()
266
+ if "\n " in text :
267
+ text = text .replace ("\r " , "" )
268
+ else :
269
+ text = text .replace ("\r " , "\n " )
258
270
textgroups = re .split ("\n \n |\n \n " , text )
259
271
ringtable = None
260
272
for group in textgroups :
0 commit comments