@@ -500,7 +500,7 @@ def query_criteria_async(self, *args, **kwargs):
500
500
timeout = self .TIMEOUT , cache = cache )
501
501
return response
502
502
503
- def query_object (self , object_name , wildcard = False , verbose = False ,
503
+ def query_object (self , object_name , * , wildcard = False , verbose = False ,
504
504
get_query_payload = False ):
505
505
"""
506
506
Queries Simbad for the given object and returns the result as a
@@ -531,7 +531,7 @@ def query_object(self, object_name, wildcard=False, verbose=False,
531
531
return self ._parse_result (response , SimbadVOTableResult ,
532
532
verbose = verbose )
533
533
534
- def query_object_async (self , object_name , wildcard = False , cache = True ,
534
+ def query_object_async (self , object_name , * , wildcard = False , cache = True ,
535
535
get_query_payload = False ):
536
536
537
537
"""
@@ -564,7 +564,7 @@ def query_object_async(self, object_name, wildcard=False, cache=True,
564
564
timeout = self .TIMEOUT , cache = cache )
565
565
return response
566
566
567
- def query_objects (self , object_names , wildcard = False , verbose = False ,
567
+ def query_objects (self , object_names , * , wildcard = False , verbose = False ,
568
568
get_query_payload = False ):
569
569
"""
570
570
Queries Simbad for the specified list of objects and returns the
@@ -590,7 +590,7 @@ def query_objects(self, object_names, wildcard=False, verbose=False,
590
590
return self .query_object ('\n ' .join (object_names ), wildcard = wildcard ,
591
591
get_query_payload = get_query_payload )
592
592
593
- def query_objects_async (self , object_names , wildcard = False , cache = True ,
593
+ def query_objects_async (self , object_names , * , wildcard = False , cache = True ,
594
594
get_query_payload = False ):
595
595
"""
596
596
Same as `query_objects`, but only collects the response from the
@@ -616,7 +616,7 @@ def query_objects_async(self, object_names, wildcard=False, cache=True,
616
616
wildcard = wildcard , cache = cache ,
617
617
get_query_payload = get_query_payload )
618
618
619
- def query_region_async (self , coordinates , radius = 2 * u .arcmin ,
619
+ def query_region_async (self , coordinates , radius = 2 * u .arcmin , * ,
620
620
equinox = 2000.0 , epoch = 'J2000' , cache = True ,
621
621
get_query_payload = False ):
622
622
"""
@@ -627,9 +627,8 @@ def query_region_async(self, coordinates, radius=2*u.arcmin,
627
627
----------
628
628
coordinates : str or `astropy.coordinates` object
629
629
the identifier or coordinates around which to query.
630
- radius : str or `~astropy.units.Quantity`, optional
631
- the radius of the region. If missing, set to default
632
- value of 2 arcmin.
630
+ radius : str or `~astropy.units.Quantity`
631
+ the radius of the region. Defaults to 2 arcmin.
633
632
equinox : float, optional
634
633
the equinox of the coordinates. If missing set to
635
634
default 2000.0.
@@ -646,14 +645,15 @@ def query_region_async(self, coordinates, radius=2*u.arcmin,
646
645
Response of the query from the server.
647
646
"""
648
647
648
+ if radius is None :
649
+ # this message is specifically for deprecated use of 'None' to mean 'Default'
650
+ raise ValueError ("Radius must be specified as an angle-equivalent quantity, not None" )
651
+
649
652
equinox = validate_equinox (equinox )
650
653
epoch = validate_epoch (epoch )
651
654
652
655
base_query_str = "query coo {ra} {dec} radius={rad} frame={frame} equi={equinox}"
653
656
654
- if radius is None :
655
- radius = 2 * u .arcmin
656
-
657
657
header = self ._get_query_header ()
658
658
footer = self ._get_query_footer ()
659
659
@@ -698,7 +698,7 @@ def query_region_async(self, coordinates, radius=2*u.arcmin,
698
698
timeout = self .TIMEOUT , cache = cache )
699
699
return response
700
700
701
- def query_catalog (self , catalog , verbose = False , cache = True ,
701
+ def query_catalog (self , catalog , * , verbose = False , cache = True ,
702
702
get_query_payload = False ):
703
703
"""
704
704
Queries a whole catalog.
@@ -727,7 +727,7 @@ def query_catalog(self, catalog, verbose=False, cache=True,
727
727
return self ._parse_result (response , SimbadVOTableResult ,
728
728
verbose = verbose )
729
729
730
- def query_catalog_async (self , catalog , cache = True , get_query_payload = False ):
730
+ def query_catalog_async (self , catalog , * , cache = True , get_query_payload = False ):
731
731
"""
732
732
Serves the same function as `query_catalog`, but
733
733
only collects the response from the Simbad server and returns.
@@ -755,7 +755,7 @@ def query_catalog_async(self, catalog, cache=True, get_query_payload=False):
755
755
timeout = self .TIMEOUT , cache = cache )
756
756
return response
757
757
758
- def query_bibobj (self , bibcode , verbose = False , get_query_payload = False ):
758
+ def query_bibobj (self , bibcode , * , verbose = False , get_query_payload = False ):
759
759
"""
760
760
Query all the objects that are contained in the article specified by
761
761
the bibcode, and return results as a `~astropy.table.Table`.
@@ -781,7 +781,7 @@ def query_bibobj(self, bibcode, verbose=False, get_query_payload=False):
781
781
return self ._parse_result (response , SimbadVOTableResult ,
782
782
verbose = verbose )
783
783
784
- def query_bibobj_async (self , bibcode , cache = True , get_query_payload = False ):
784
+ def query_bibobj_async (self , bibcode , * , cache = True , get_query_payload = False ):
785
785
"""
786
786
Serves the same function as `query_bibobj`, but only collects the
787
787
response from the Simbad server and returns.
@@ -809,7 +809,7 @@ def query_bibobj_async(self, bibcode, cache=True, get_query_payload=False):
809
809
timeout = self .TIMEOUT , cache = cache )
810
810
return response
811
811
812
- def query_bibcode (self , bibcode , wildcard = False , verbose = False ,
812
+ def query_bibcode (self , bibcode , * , wildcard = False , verbose = False ,
813
813
cache = True , get_query_payload = False ):
814
814
"""
815
815
Queries the references corresponding to a given bibcode, and returns
@@ -843,7 +843,7 @@ def query_bibcode(self, bibcode, wildcard=False, verbose=False,
843
843
return self ._parse_result (response , SimbadBibcodeResult ,
844
844
verbose = verbose )
845
845
846
- def query_bibcode_async (self , bibcode , wildcard = False , cache = True ,
846
+ def query_bibcode_async (self , bibcode , * , wildcard = False , cache = True ,
847
847
get_query_payload = False ):
848
848
"""
849
849
Serves the same function as `query_bibcode`, but
@@ -878,7 +878,7 @@ def query_bibcode_async(self, bibcode, wildcard=False, cache=True,
878
878
879
879
return response
880
880
881
- def query_objectids (self , object_name , verbose = False , cache = True ,
881
+ def query_objectids (self , object_name , * , verbose = False , cache = True ,
882
882
get_query_payload = False ):
883
883
"""
884
884
Query Simbad with an object name, and return a table of all
@@ -906,7 +906,7 @@ def query_objectids(self, object_name, verbose=False, cache=True,
906
906
return self ._parse_result (response , SimbadObjectIDsResult ,
907
907
verbose = verbose )
908
908
909
- def query_objectids_async (self , object_name , cache = True ,
909
+ def query_objectids_async (self , object_name , * , cache = True ,
910
910
get_query_payload = False ):
911
911
"""
912
912
Serves the same function as `query_objectids`, but
0 commit comments