@@ -48,7 +48,7 @@ class IrsaDustClass(BaseQuery):
48
48
'100um' : 'e'
49
49
}
50
50
51
- def get_images (self , coordinate , radius = None ,
51
+ def get_images (self , coordinate , * , radius = None ,
52
52
image_type = None , timeout = TIMEOUT , get_query_payload = False ,
53
53
show_progress = True ):
54
54
"""
@@ -91,7 +91,7 @@ def get_images(self, coordinate, radius=None,
91
91
get_query_payload = get_query_payload , show_progress = show_progress )
92
92
return [obj .get_fits () for obj in readable_objs ]
93
93
94
- def get_images_async (self , coordinate , radius = None , image_type = None ,
94
+ def get_images_async (self , coordinate , * , radius = None , image_type = None ,
95
95
timeout = TIMEOUT , get_query_payload = False ,
96
96
show_progress = True ):
97
97
"""
@@ -141,7 +141,7 @@ def get_images_async(self, coordinate, radius=None, image_type=None,
141
141
show_progress = show_progress )
142
142
for U in image_urls ]
143
143
144
- def get_image_list (self , coordinate , radius = None , image_type = None ,
144
+ def get_image_list (self , coordinate , * , radius = None , image_type = None ,
145
145
timeout = TIMEOUT ):
146
146
"""
147
147
Query function that performs coordinate-based query and returns a list
@@ -182,7 +182,7 @@ def get_image_list(self, coordinate, radius=None, image_type=None,
182
182
timeout = timeout )
183
183
return self .extract_image_urls (response .text , image_type = image_type )
184
184
185
- def get_extinction_table (self , coordinate , radius = None , timeout = TIMEOUT ,
185
+ def get_extinction_table (self , coordinate , * , radius = None , timeout = TIMEOUT ,
186
186
show_progress = True ):
187
187
"""
188
188
Query function that fetches the extinction table from the query
@@ -220,7 +220,7 @@ def get_extinction_table(self, coordinate, radius=None, timeout=TIMEOUT,
220
220
column .unit = str (column .unit )[:- 1 ]
221
221
return table
222
222
223
- def get_extinction_table_async (self , coordinate , radius = None ,
223
+ def get_extinction_table_async (self , coordinate , * , radius = None ,
224
224
timeout = TIMEOUT , show_progress = True ):
225
225
"""
226
226
A query function similar to
@@ -253,11 +253,11 @@ def get_extinction_table_async(self, coordinate, radius=None,
253
253
response = self ._request ("POST" , url , data = request_payload ,
254
254
timeout = timeout )
255
255
xml_tree = utils .xml (response .text )
256
- result = SingleDustResult (xml_tree , coordinate )
256
+ result = SingleDustResult (xml_tree , query_loc = coordinate )
257
257
return commons .FileContainer (result .ext_detail_table (),
258
258
show_progress = show_progress )
259
259
260
- def get_query_table (self , coordinate , radius = None ,
260
+ def get_query_table (self , coordinate , * , radius = None ,
261
261
section = None , timeout = TIMEOUT , url = DUST_SERVICE_URL ):
262
262
"""
263
263
Create and return an `~astropy.table.Table` representing the query
@@ -299,7 +299,7 @@ def get_query_table(self, coordinate, radius=None,
299
299
response = self ._request ("POST" , url , data = request_payload ,
300
300
timeout = timeout )
301
301
xml_tree = utils .xml (response .text )
302
- result = SingleDustResult (xml_tree , coordinate )
302
+ result = SingleDustResult (xml_tree , query_loc = coordinate )
303
303
if section is None or section in ["location" , "loc" , "l" ]:
304
304
return result .table (section = section )
305
305
try :
@@ -310,7 +310,7 @@ def get_query_table(self, coordinate, radius=None,
310
310
'ebv, temperature, location or 100um.' )
311
311
raise ValueError (msg )
312
312
313
- def _args_to_payload (self , coordinate , radius = None ):
313
+ def _args_to_payload (self , coordinate , * , radius = None ):
314
314
"""
315
315
Accepts the query parameters and returns a dictionary
316
316
suitable to be sent as data via a HTTP POST request.
@@ -357,7 +357,7 @@ def _args_to_payload(self, coordinate, radius=None):
357
357
payload ["regSize" ] = reg_size
358
358
return payload
359
359
360
- def extract_image_urls (self , raw_xml , image_type = None ):
360
+ def extract_image_urls (self , raw_xml , * , image_type = None ):
361
361
"""
362
362
Extracts the image URLs from the query results and
363
363
returns these as a list. If section is missing or
@@ -414,7 +414,7 @@ class SingleDustResult:
414
414
initial response. Not intended to be instantiated by the end user.
415
415
"""
416
416
417
- def __init__ (self , xml_tree , query_loc = None ):
417
+ def __init__ (self , xml_tree , * , query_loc = None ):
418
418
"""
419
419
Parameters
420
420
----------
@@ -450,7 +450,7 @@ def xml(self):
450
450
"""Return the raw xml underlying this SingleDustResult."""
451
451
return self ._xml
452
452
453
- def table (self , section = None ):
453
+ def table (self , * , section = None ):
454
454
"""
455
455
Create and return a `~astropy.table.Table` representing the query
456
456
response.
@@ -467,7 +467,7 @@ def table(self, section=None):
467
467
else :
468
468
return self ._table (code )
469
469
470
- def values (self , section = None ):
470
+ def values (self , * , section = None ):
471
471
"""
472
472
Return the data values contained in the query response,
473
473
i.e. the list of values corresponding to a row in the result table.
@@ -733,7 +733,7 @@ class NumberNode(BaseDustNode):
733
733
number.
734
734
"""
735
735
736
- def __init__ (self , xml_node , col_name , units = None ):
736
+ def __init__ (self , xml_node , col_name , * , units = None ):
737
737
"""
738
738
Parameters
739
739
----------
@@ -881,7 +881,7 @@ def __init__(self, xml_root):
881
881
# Create the section's DustNodes
882
882
self ._dust_nodes = [CoordNode (
883
883
xml_nodes [OBJ_NAME ], col_names = ["RA" , "Dec" , "coord sys" ]),
884
- NumberNode (xml_nodes [REG_SIZE ], REG_SIZE , u .deg )]
884
+ NumberNode (xml_nodes [REG_SIZE ], REG_SIZE , units = u .deg )]
885
885
886
886
self .create_columns ()
887
887
@@ -899,7 +899,7 @@ class StatsSection(BaseResultSection):
899
899
section.
900
900
"""
901
901
902
- def __init__ (self , xml_root , col_prefix , suffix = "" ):
902
+ def __init__ (self , xml_root , col_prefix , * , suffix = "" ):
903
903
"""
904
904
Parameters
905
905
----------
@@ -984,8 +984,8 @@ def __init__(self, xml_root):
984
984
985
985
# Create statistics subsections
986
986
self ._stats_sandf = StatsSection (xml_nodes [STATISTICS ],
987
- "ext SandF" , "SandF" )
988
- self ._stats_sfd = StatsSection (xml_nodes [STATISTICS ], "ext SFD" , "SFD" )
987
+ "ext SandF" , suffix = "SandF" )
988
+ self ._stats_sfd = StatsSection (xml_nodes [STATISTICS ], "ext SFD" , suffix = "SFD" )
989
989
990
990
self .create_columns ()
991
991
0 commit comments