@@ -26,29 +26,30 @@ def query_region(self, coordinates, radius=None, *, data_release=9):
26
26
Parameters
27
27
----------
28
28
coordinates : `~astropy.coordinates.SkyCoord`
29
- coordinates around which to query .
29
+ coordinates around which we define our region of interest .
30
30
radius : `~astropy.units.Quantity`, optional
31
- the radius of the region. If missing, set to default
32
- value of 0.5 arcmin.
33
- data_release: int
31
+ the radius of the region to search.
32
+ Default to a value of 0.5 arcmin.
33
+ data_release: int, optional
34
34
the data release of the LegacySurvey to use.
35
+ Default to 9.
35
36
36
37
Returns
37
38
-------
38
39
response : `~astropy.table.Table`
39
40
"""
40
41
41
42
if radius is None :
42
- radius = Quantity (0.5 , unit = ' arcmin' )
43
+ radius = Quantity (0.5 , u . arcmin )
43
44
44
45
tap_service = vo .dal .TAPService (conf .tap_service_url )
45
46
coordinates_transformed = coordinates .transform_to (coord .ICRS )
46
47
47
48
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 )} " )
49
+ f"dec>{ (coordinates_transformed .dec - radius ).to_value (u .deg )} and "
50
+ f"dec<{ (coordinates_transformed .dec + radius ).to_value (u .deg )} and "
51
+ f"ra>{ coordinates_transformed .ra .to_value (u .deg ) - radius .to_value (u .deg ) / np .cos (coordinates_transformed .dec .to_value (u .deg ) * np .pi / 180. )} and "
52
+ f"ra<{ coordinates_transformed .ra .to_value (u .deg ) + radius .to_value (u .deg ) / np .cos (coordinates_transformed .dec .to_value (u .deg ) * np .pi / 180 )} " )
52
53
53
54
tap_result = tap_service .run_sync (qstr )
54
55
tap_result = tap_result .to_table ()
@@ -58,23 +59,29 @@ def query_region(self, coordinates, radius=None, *, data_release=9):
58
59
59
60
return filtered_table
60
61
61
- def get_images (self , position , pixels , radius = None , * , data_release = 9 , show_progress = True , image_band = 'g' ):
62
+ def get_images (self , position , pixels = None , radius = None , * , data_release = 9 , show_progress = True , image_band = 'g' ):
62
63
"""
63
64
Downloads the images for a certain region of interest.
64
65
65
66
Parameters
66
- -------
67
- position: `~astropy.coordinates`.
67
+ ----------
68
+ position: `~astropy.coordinates.SkyCoord`
68
69
coordinates around which we define our region of interest.
69
- radius: `~astropy.units.Quantity`, optional
70
+ pixels: 'int', optional
71
+ pixel dimensions of the image to be produced.
72
+ Default to 60.
73
+ radius: `~astropy.units.Quantity`, optional
70
74
the radius of our region of interest.
75
+ Default to a value of 0.5 arcmin.
71
76
data_release: int, optional
72
77
the data release of the LegacySurvey to use.
78
+ Default to 9.
73
79
show_progress: bool, optional
74
- Whether to display a progress bar if the file is downloaded
75
- from a remote server. Default is True.
80
+ whether to display a progress bar if the file is downloaded from a remote server.
81
+ Default to True.
76
82
image_band: str, optional
77
- Default to 'g'
83
+ indicates the desired band.
84
+ Default to 'g'.
78
85
79
86
Returns
80
87
-------
0 commit comments