@@ -36,7 +36,7 @@ class BaseWFAUClass(QueryWithLogin):
36
36
CROSSID_URL = BASE_URL + "CrossID"
37
37
TIMEOUT = ""
38
38
39
- def __init__ (self , username = None , password = None , community = None ,
39
+ def __init__ (self , * , username = None , password = None , community = None ,
40
40
database = '' , programme_id = 'all' ):
41
41
"""
42
42
The BaseWFAUClass __init__ is meant to be overwritten
@@ -108,7 +108,7 @@ def _args_to_payload(self, *args, **kwargs):
108
108
request_payload ['dec' ] = C .b .degree
109
109
return request_payload
110
110
111
- def _verify_programme_id (self , pid , query_type = 'catalog' ):
111
+ def _verify_programme_id (self , pid , * , query_type = 'catalog' ):
112
112
"""
113
113
Verify the programme ID is valid for the query being executed.
114
114
@@ -152,7 +152,7 @@ def _parse_system(self, system):
152
152
elif system .lower () in ('j' , 'j2000' , 'celestical' , 'radec' ):
153
153
return 'J'
154
154
155
- def get_images (self , coordinates , waveband = 'all' , frame_type = 'stack' ,
155
+ def get_images (self , coordinates , * , waveband = 'all' , frame_type = 'stack' ,
156
156
image_width = 1 * u .arcmin , image_height = None , radius = None ,
157
157
database = None , programme_id = None ,
158
158
verbose = True , get_query_payload = False ,
@@ -212,7 +212,7 @@ def get_images(self, coordinates, waveband='all', frame_type='stack',
212
212
return readable_objs
213
213
return [obj .get_fits () for obj in readable_objs ]
214
214
215
- def get_images_async (self , coordinates , waveband = 'all' , frame_type = 'stack' ,
215
+ def get_images_async (self , coordinates , * , waveband = 'all' , frame_type = 'stack' ,
216
216
image_width = 1 * u .arcmin , image_height = None ,
217
217
radius = None , database = None ,
218
218
programme_id = None , verbose = True ,
@@ -290,7 +290,7 @@ def get_images_async(self, coordinates, waveband='all', frame_type='stack',
290
290
show_progress = show_progress )
291
291
for url in image_urls ]
292
292
293
- def get_image_list (self , coordinates , waveband = 'all' , frame_type = 'stack' ,
293
+ def get_image_list (self , coordinates , * , waveband = 'all' , frame_type = 'stack' ,
294
294
image_width = 1 * u .arcmin , image_height = None ,
295
295
radius = None , database = None ,
296
296
programme_id = None , get_query_payload = False ):
@@ -433,7 +433,7 @@ def extract_urls(self, html_in):
433
433
links = ahref .findall (html_in )
434
434
return links
435
435
436
- def query_region (self , coordinates , radius = 1 * u .arcmin ,
436
+ def query_region (self , coordinates , * , radius = 1 * u .arcmin ,
437
437
programme_id = None , database = None ,
438
438
verbose = False , get_query_payload = False , system = 'J2000' ,
439
439
attributes = ['default' ], constraints = '' ):
@@ -502,7 +502,7 @@ def query_region(self, coordinates, radius=1 * u.arcmin,
502
502
result = self ._parse_result (response , verbose = verbose )
503
503
return result
504
504
505
- def query_region_async (self , coordinates , radius = 1 * u .arcmin ,
505
+ def query_region_async (self , coordinates , * , radius = 1 * u .arcmin ,
506
506
programme_id = None ,
507
507
database = None , get_query_payload = False ,
508
508
system = 'J2000' , attributes = ['default' ],
@@ -584,7 +584,7 @@ def query_region_async(self, coordinates, radius=1 * u.arcmin,
584
584
585
585
return response
586
586
587
- def _parse_result (self , response , verbose = False ):
587
+ def _parse_result (self , response , * , verbose = False ):
588
588
"""
589
589
Parses the raw HTTP response and returns it as a
590
590
`~astropy.table.Table`.
@@ -630,7 +630,7 @@ def _parse_result(self, response, verbose=False):
630
630
"and the error in self.table_parse_error. "
631
631
"Exception: " + str (self .table_parse_error ))
632
632
633
- def list_catalogs (self , style = 'short' ):
633
+ def list_catalogs (self , * , style = 'short' ):
634
634
"""
635
635
Returns a list of available catalogs in WFAU.
636
636
These can be used as ``programme_id`` in queries.
@@ -700,7 +700,7 @@ def _wfau_send_request(self, url, request_payload):
700
700
timeout = self .TIMEOUT )
701
701
return response
702
702
703
- def _check_page (self , url , keyword , wait_time = 1 , max_attempts = 30 ):
703
+ def _check_page (self , url , keyword , * , wait_time = 1 , max_attempts = 30 ):
704
704
page_loaded = False
705
705
while not page_loaded and max_attempts > 0 :
706
706
if self .logged_in ():
@@ -722,7 +722,7 @@ def _check_page(self, url, keyword, wait_time=1, max_attempts=30):
722
722
raise TimeoutError ("Page did not load." )
723
723
return response
724
724
725
- def query_cross_id_async (self , coordinates , radius = 1 * u .arcsec ,
725
+ def query_cross_id_async (self , coordinates , * , radius = 1 * u .arcsec ,
726
726
programme_id = None , database = None , table = "source" ,
727
727
constraints = "" , attributes = 'default' ,
728
728
pairing = 'all' , system = 'J2000' ,
@@ -847,7 +847,7 @@ def query_cross_id(self, *args, **kwargs):
847
847
return result
848
848
849
849
850
- def clean_catalog (wfau_catalog , clean_band = 'K_1' , badclass = - 9999 ,
850
+ def clean_catalog (wfau_catalog , * , clean_band = 'K_1' , badclass = - 9999 ,
851
851
maxerrbits = 41 , minerrbits = 0 , maxpperrbits = 60 ):
852
852
"""
853
853
Attempt to remove 'bad' entries in a catalog.
0 commit comments