19
19
20
20
class DESILegacySurveyClass (BaseQuery ):
21
21
22
- def query_region (self , coordinates , radius = None , * , data_release = 9 ):
22
+ def query_region (self , coordinates , radius = 0.5 * u . arcmin , * , data_release = 9 ):
23
23
"""
24
24
Queries a region around the specified coordinates.
25
25
@@ -38,17 +38,13 @@ def query_region(self, coordinates, radius=None, *, data_release=9):
38
38
response : `~astropy.table.Table`
39
39
"""
40
40
41
- if radius is None :
42
- radius = Quantity (0.5 , unit = 'arcmin' )
43
-
44
41
tap_service = vo .dal .TAPService (conf .tap_service_url )
45
42
coordinates_transformed = coordinates .transform_to (coord .ICRS )
46
43
47
44
qstr = (f"SELECT all * FROM ls_dr{ data_release } .tractor WHERE "
48
- f"dec>{ (coordinates_transformed .dec - radius ).to (u .deg ).value } and "
49
- f"dec<{ (coordinates_transformed .dec + radius ).to (u .deg ).value } and "
50
- f"ra>{ coordinates_transformed .ra .to (u .deg ).value - radius .to (u .deg ).value / np .cos (coordinates_transformed .dec .to (u .deg ).value * np .pi / 180. )} and "
51
- f"ra<{ coordinates_transformed .ra .to (u .deg ).value + radius .to (u .deg ).value / np .cos (coordinates_transformed .dec .to (u .deg ).value * np .pi / 180 )} " )
45
+ f"dec<{ (coordinates_transformed .dec + radius ).to_value (u .deg )} and "
46
+ f"ra>{ coordinates_transformed .ra .to_value (u .deg ) - radius .to_value (u .deg ) / np .cos (coordinates_transformed .dec )} and "
47
+ f"ra<{ coordinates_transformed .ra .to_value (u .deg ) + radius .to_value (u .deg ) / np .cos (coordinates_transformed .dec )} " )
52
48
53
49
tap_result = tap_service .run_sync (qstr )
54
50
tap_result = tap_result .to_table ()
@@ -58,7 +54,7 @@ def query_region(self, coordinates, radius=None, *, data_release=9):
58
54
59
55
return filtered_table
60
56
61
- def get_images (self , position , pixels , radius = None , * , data_release = 9 , show_progress = True , image_band = 'g' ):
57
+ def get_images (self , position , pixels = None , radius = 0.5 * u . arcmin , * , data_release = 9 , show_progress = True , image_band = 'g' ):
62
58
"""
63
59
Downloads the images for a certain region of interest.
64
60
@@ -81,9 +77,6 @@ def get_images(self, position, pixels, radius=None, *, data_release=9, show_prog
81
77
list: A list of `~astropy.io.fits.HDUList` objects.
82
78
"""
83
79
84
- if radius is None :
85
- radius = Quantity (0.5 , u .arcmin )
86
-
87
80
position_transformed = position .transform_to (coord .ICRS )
88
81
89
82
image_size_arcsec = radius .arcsec
0 commit comments