@@ -40,7 +40,7 @@ class NedClass(BaseQuery):
40
40
2 : Options ('Data as Published' , 'pub' ),
41
41
3 : Options ('Homogenized Units (mJy)' , 'mjy' )}
42
42
43
- def query_object (self , object_name , get_query_payload = False ,
43
+ def query_object (self , object_name , * , get_query_payload = False ,
44
44
verbose = False ):
45
45
"""
46
46
Queries objects by name from the NED Service and returns the Main
@@ -71,7 +71,7 @@ def query_object(self, object_name, get_query_payload=False,
71
71
result = self ._parse_result (response , verbose = verbose )
72
72
return result
73
73
74
- def query_object_async (self , object_name , get_query_payload = False ):
74
+ def query_object_async (self , object_name , * , get_query_payload = False ):
75
75
"""
76
76
Serves the same purpose as `~NedClass.query_object` but returns the
77
77
raw HTTP response rather than the `astropy.table.Table` object.
@@ -101,7 +101,7 @@ def query_object_async(self, object_name, get_query_payload=False):
101
101
102
102
return response
103
103
104
- def query_region (self , coordinates , radius = 1 * u .arcmin , equinox = 'J2000.0' ,
104
+ def query_region (self , coordinates , * , radius = 1 * u .arcmin , equinox = 'J2000.0' ,
105
105
get_query_payload = False , verbose = False ):
106
106
"""
107
107
Used to query a region around a known identifier or given
@@ -144,7 +144,7 @@ def query_region(self, coordinates, radius=1 * u.arcmin, equinox='J2000.0',
144
144
result = self ._parse_result (response , verbose = verbose )
145
145
return result
146
146
147
- def query_region_async (self , coordinates , radius = 1 * u .arcmin ,
147
+ def query_region_async (self , coordinates , * , radius = 1 * u .arcmin ,
148
148
equinox = 'J2000.0' , get_query_payload = False ):
149
149
"""
150
150
Serves the same purpose as `~NedClass.query_region` but returns the
@@ -206,7 +206,7 @@ def query_region_async(self, coordinates, radius=1 * u.arcmin,
206
206
params = request_payload , timeout = Ned .TIMEOUT )
207
207
return response
208
208
209
- def query_region_iau (self , iau_name , frame = 'Equatorial' , equinox = 'B1950.0' ,
209
+ def query_region_iau (self , iau_name , * , frame = 'Equatorial' , equinox = 'B1950.0' ,
210
210
get_query_payload = False , verbose = False ):
211
211
"""
212
212
Used to query the Ned service via the IAU name. Equivalent to the
@@ -245,7 +245,7 @@ def query_region_iau(self, iau_name, frame='Equatorial', equinox='B1950.0',
245
245
result = self ._parse_result (response , verbose = verbose )
246
246
return result
247
247
248
- def query_region_iau_async (self , iau_name , frame = 'Equatorial' ,
248
+ def query_region_iau_async (self , iau_name , * , frame = 'Equatorial' ,
249
249
equinox = 'B1950.0' , get_query_payload = False ):
250
250
"""
251
251
Serves the same purpose as `~NedClass.query_region_iau` but returns
@@ -285,7 +285,7 @@ def query_region_iau_async(self, iau_name, frame='Equatorial',
285
285
params = request_payload , timeout = Ned .TIMEOUT )
286
286
return response
287
287
288
- def query_refcode (self , refcode , get_query_payload = False , verbose = False ):
288
+ def query_refcode (self , refcode , * , get_query_payload = False , verbose = False ):
289
289
"""
290
290
Used to retrieve all objects contained in a particular
291
291
reference. Equivalent to by refcode queries of the web interface.
@@ -314,7 +314,7 @@ def query_refcode(self, refcode, get_query_payload=False, verbose=False):
314
314
result = self ._parse_result (response , verbose = verbose )
315
315
return result
316
316
317
- def query_refcode_async (self , refcode , get_query_payload = False ):
317
+ def query_refcode_async (self , refcode , * , get_query_payload = False ):
318
318
"""
319
319
Serves the same purpose as `~NedClass.query_region` but returns the
320
320
raw HTTP response rather than the `astropy.table.Table` object.
@@ -344,7 +344,7 @@ def query_refcode_async(self, refcode, get_query_payload=False):
344
344
params = request_payload , timeout = Ned .TIMEOUT )
345
345
return response
346
346
347
- def get_images (self , object_name , get_query_payload = False ,
347
+ def get_images (self , object_name , * , get_query_payload = False ,
348
348
show_progress = True ):
349
349
"""
350
350
Query function to fetch FITS images for a given identifier.
@@ -370,7 +370,7 @@ def get_images(self, object_name, get_query_payload=False,
370
370
return readable_objs
371
371
return [obj .get_fits () for obj in readable_objs ]
372
372
373
- def get_images_async (self , object_name , get_query_payload = False ,
373
+ def get_images_async (self , object_name , * , get_query_payload = False ,
374
374
show_progress = True ):
375
375
"""
376
376
Serves the same purpose as `~NedClass.get_images` but returns
@@ -397,7 +397,7 @@ def get_images_async(self, object_name, get_query_payload=False,
397
397
show_progress = show_progress )
398
398
for U in image_urls ]
399
399
400
- def get_spectra (self , object_name , get_query_payload = False ,
400
+ def get_spectra (self , object_name , * , get_query_payload = False ,
401
401
show_progress = True ):
402
402
"""
403
403
Query function to fetch FITS files of spectra for a given identifier.
@@ -423,7 +423,7 @@ def get_spectra(self, object_name, get_query_payload=False,
423
423
return readable_objs
424
424
return [obj .get_fits () for obj in readable_objs ]
425
425
426
- def get_spectra_async (self , object_name , get_query_payload = False ,
426
+ def get_spectra_async (self , object_name , * , get_query_payload = False ,
427
427
show_progress = True ):
428
428
"""
429
429
Serves the same purpose as `~NedClass.get_spectra` but returns
@@ -490,7 +490,7 @@ def get_image_list(self, object_name, *, item='image', file_format='fits',
490
490
timeout = Ned .TIMEOUT )
491
491
return self ._extract_image_urls (response .text , file_format = file_format )
492
492
493
- def _extract_image_urls (self , html_in , file_format = 'fits' ):
493
+ def _extract_image_urls (self , html_in , * , file_format = 'fits' ):
494
494
"""
495
495
Helper function that uses regexps to extract the image urls from the
496
496
given HTML.
@@ -524,7 +524,7 @@ def _extract_image_urls(self, html_in, file_format='fits'):
524
524
url_list = [base_url + img_url for img_url in matched_urls ]
525
525
return url_list
526
526
527
- def get_table (self , object_name , table = 'photometry' ,
527
+ def get_table (self , object_name , * , table = 'photometry' ,
528
528
get_query_payload = False , verbose = False , ** kwargs ):
529
529
"""
530
530
Fetches the specified data table for the object from NED and returns
@@ -574,7 +574,7 @@ def get_table(self, object_name, table='photometry',
574
574
result = self ._parse_result (response , verbose = verbose )
575
575
return result
576
576
577
- def get_table_async (self , object_name , table = 'photometry' ,
577
+ def get_table_async (self , object_name , * , table = 'photometry' ,
578
578
get_query_payload = False , ** kwargs ):
579
579
"""
580
580
Serves the same purpose as `~NedClass.query_region` but returns the
@@ -678,7 +678,7 @@ def _set_output_options(self, request_payload):
678
678
request_payload ['out_equinox' ] = conf .output_equinox
679
679
request_payload ['obj_sort' ] = conf .sort_output_by
680
680
681
- def _parse_result (self , response , verbose = False ):
681
+ def _parse_result (self , response , * , verbose = False ):
682
682
"""
683
683
Parses the raw HTTP response and returns it as an
684
684
`astropy.table.Table`.
0 commit comments