@@ -133,8 +133,8 @@ def get_sectors(self, coordinates=None, radius=0*u.deg, objectname=None, moving_
133
133
or TIC ID (objectname="TIC 141914082").
134
134
One and only one of coordinates, objectname, moving_target must be supplied.
135
135
moving_target : str, optional
136
- The name or ID (as understood by the
137
- `JPL ephemerides service <https://ssd.jpl.nasa.gov/horizons.cgi>`__)
136
+ The name or ID (as understood by the
137
+ `JPL ephemerides service <https://ssd.jpl.nasa.gov/horizons.cgi>`__)
138
138
of a moving target such as an asteroid or comet.
139
139
One and only one of coordinates, objectname, and moving_target must be supplied.
140
140
mt_type : str, optional
@@ -150,7 +150,7 @@ def get_sectors(self, coordinates=None, radius=0*u.deg, objectname=None, moving_
150
150
151
151
if moving_target :
152
152
153
- # Check only ony object designator has been passed in
153
+ # Check only ony object designator has been passed in
154
154
if objectname or coordinates :
155
155
raise InvalidQueryError ("Only one of objectname, coordinates, and moving_target may be specified." )
156
156
@@ -163,7 +163,7 @@ def get_sectors(self, coordinates=None, radius=0*u.deg, objectname=None, moving_
163
163
response = self ._service_api_connection .service_request_async ("mt_sector" , params )
164
164
165
165
else :
166
-
166
+
167
167
# Get Skycoord object for coordinates/object
168
168
coordinates = parse_input_location (coordinates , objectname )
169
169
@@ -176,8 +176,8 @@ def get_sectors(self, coordinates=None, radius=0*u.deg, objectname=None, moving_
176
176
177
177
response = self ._service_api_connection .service_request_async ("sector" , params )
178
178
179
- # Raise any errors
180
- response .raise_for_status ()
179
+ # Raise any errors
180
+ response .raise_for_status ()
181
181
182
182
sector_json = response .json ()['results' ]
183
183
sector_dict = {'sectorName' : [],
@@ -232,8 +232,8 @@ def download_cutouts(self, coordinates=None, size=5, sector=None, path=".", infl
232
232
or TIC ID (objectname="TIC 141914082").
233
233
One and only one of coordinates, objectname, and moving_target must be supplied.
234
234
moving_target : str, optional
235
- The name or ID (as understood by the
236
- `JPL ephemerides service <https://ssd.jpl.nasa.gov/horizons.cgi>`__)
235
+ The name or ID (as understood by the
236
+ `JPL ephemerides service <https://ssd.jpl.nasa.gov/horizons.cgi>`__)
237
237
of a moving target such as an asteroid or comet.
238
238
One and only one of coordinates, objectname, and moving_target must be supplied.
239
239
mt_type : str, optional
@@ -247,23 +247,23 @@ def download_cutouts(self, coordinates=None, size=5, sector=None, path=".", infl
247
247
"""
248
248
249
249
if moving_target :
250
- # Check only ony object designator has been passed in
250
+ # Check only ony object designator has been passed in
251
251
if objectname or coordinates :
252
252
raise InvalidQueryError ("Only one of objectname, coordinates, and moving_target may be specified." )
253
-
253
+
254
254
astrocut_request = f"moving_target/astrocut?obj_id={ moving_target } "
255
255
if mt_type :
256
256
astrocut_request += f"&obj_type={ mt_type } "
257
257
else :
258
258
# Get Skycoord object for coordinates/object
259
259
coordinates = parse_input_location (coordinates , objectname )
260
-
260
+
261
261
astrocut_request = f"astrocut?ra={ coordinates .ra .deg } &dec={ coordinates .dec .deg } "
262
262
263
263
# Adding the arguments that are common between moving/still astrocut requests
264
264
size_dict = _parse_cutout_size (size )
265
265
astrocut_request += f"&y={ size_dict ['y' ]} &x={ size_dict ['x' ]} &units={ size_dict ['units' ]} "
266
-
266
+
267
267
if sector :
268
268
astrocut_request += "§or={}" .format (sector )
269
269
@@ -325,8 +325,8 @@ def get_cutouts(self, coordinates=None, size=5, sector=None,
325
325
or TIC ID (objectname="TIC 141914082").
326
326
One and only one of coordinates, objectname, and moving_target must be supplied.
327
327
moving_target : str, optional
328
- The name or ID (as understood by the
329
- `JPL ephemerides service <https://ssd.jpl.nasa.gov/horizons.cgi>`__)
328
+ The name or ID (as understood by the
329
+ `JPL ephemerides service <https://ssd.jpl.nasa.gov/horizons.cgi>`__)
330
330
of a moving target such as an asteroid or comet.
331
331
One and only one of coordinates, objectname, and moving_target must be supplied.
332
332
mt_type : str, optional
@@ -345,10 +345,10 @@ def get_cutouts(self, coordinates=None, size=5, sector=None,
345
345
# Add sector if present
346
346
if sector :
347
347
param_dict ["sector" ] = sector
348
-
348
+
349
349
if moving_target :
350
350
351
- # Check only on object designator has been passed in
351
+ # Check only on object designator has been passed in
352
352
if objectname or coordinates :
353
353
raise InvalidQueryError ("Only one of objectname, coordinates, and moving_target may be specified." )
354
354
@@ -361,13 +361,13 @@ def get_cutouts(self, coordinates=None, size=5, sector=None,
361
361
response = self ._service_api_connection .service_request_async ("mt_astrocut" , param_dict )
362
362
363
363
else :
364
-
364
+
365
365
# Get Skycoord object for coordinates/object
366
366
coordinates = parse_input_location (coordinates , objectname )
367
-
367
+
368
368
param_dict ["ra" ] = coordinates .ra .deg
369
369
param_dict ["dec" ] = coordinates .dec .deg
370
-
370
+
371
371
response = self ._service_api_connection .service_request_async ("astrocut" , param_dict )
372
372
373
373
response .raise_for_status () # Raise any errors
0 commit comments