1818
1919class DESILegacySurveyClass (BaseQuery ):
2020
21- def query_region (self , coordinates , radius = 0.5 * u .arcmin , * , data_release = 9 ):
21+ def query_region (self , coordinates , * , width = 0.5 * u .arcmin , data_release = 9 ):
2222 """
2323 Queries a region around the specified coordinates.
2424
2525 Parameters
2626 ----------
2727 coordinates : `~astropy.coordinates.SkyCoord`
2828 coordinates around which to query.
29- radius : `~astropy.units.Quantity`, optional
30- the radius of the region. If missing, set to default
29+ width : `~astropy.units.Quantity`, optional
30+ the width of the region. If missing, set to default
3131 value of 0.5 arcmin.
32- data_release: int
32+ data_release : int
3333 the data release of the LegacySurvey to use.
3434
3535 Returns
@@ -41,9 +41,9 @@ def query_region(self, coordinates, radius=0.5*u.arcmin, *, data_release=9):
4141 coordinates_transformed = coordinates .transform_to (coord .ICRS )
4242
4343 qstr = (f"SELECT all * FROM ls_dr{ data_release } .tractor WHERE "
44- f"dec<{ (coordinates_transformed .dec + radius ).to_value (u .deg )} and "
45- f"ra>{ coordinates_transformed .ra .to_value (u .deg ) - radius .to_value (u .deg ) / np .cos (coordinates_transformed .dec )} and "
46- f"ra<{ coordinates_transformed .ra .to_value (u .deg ) + radius .to_value (u .deg ) / np .cos (coordinates_transformed .dec )} " )
44+ f"dec<{ (coordinates_transformed .dec + width ).to_value (u .deg )} and "
45+ f"ra>{ coordinates_transformed .ra .to_value (u .deg ) - width .to_value (u .deg ) / np .cos (coordinates_transformed .dec )} and "
46+ f"ra<{ coordinates_transformed .ra .to_value (u .deg ) + width .to_value (u .deg ) / np .cos (coordinates_transformed .dec )} " )
4747
4848 tap_result = tap_service .run_sync (qstr )
4949 tap_result = tap_result .to_table ()
@@ -53,32 +53,32 @@ def query_region(self, coordinates, radius=0.5*u.arcmin, *, data_release=9):
5353
5454 return filtered_table
5555
56- def get_images (self , position , pixels = None , radius = 0.5 * u .arcmin , * , data_release = 9 , show_progress = True , image_band = 'g' ):
56+ def get_images (self , position , * , pixels = None , width = 0.5 * u .arcmin , data_release = 9 , show_progress = True , image_band = 'g' ):
5757 """
5858 Downloads the images for a certain region of interest.
5959
6060 Parameters
61- -------
62- position: `astropy.coordinates`.
61+ ----------
62+ position : `astropy.coordinates`.
6363 coordinates around which we define our region of interest.
64- radius : `~astropy.units.Quantity`, optional
65- the radius of our region of interest.
66- data_release: int, optional
64+ width : `~astropy.units.Quantity`, optional
65+ the width of our region of interest.
66+ data_release : int, optional
6767 the data release of the LegacySurvey to use.
68- show_progress: bool, optional
68+ show_progress : bool, optional
6969 Whether to display a progress bar if the file is downloaded
7070 from a remote server. Default is True.
71- image_band: str, optional
71+ image_band : str, optional
7272 Default to 'g'
7373
7474 Returns
7575 -------
76- list: A list of `~astropy.io.fits.HDUList` objects.
76+ list : A list of `~astropy.io.fits.HDUList` objects.
7777 """
7878
7979 position_transformed = position .transform_to (coord .ICRS )
8080
81- image_size_arcsec = radius .arcsec
81+ image_size_arcsec = width .arcsec
8282 pixsize = 2 * image_size_arcsec / pixels
8383
8484 image_url = (f"{ conf .legacysurvey_service_url } ?"
0 commit comments