1
1
.. _astroquery.desi :
2
2
3
- ************************************
3
+ *********************************************
4
4
DESI LegacySurvey Queries (`astroquery.desi `)
5
- ************************************
5
+ *********************************************
6
6
7
7
Getting started
8
8
===============
@@ -12,13 +12,13 @@ Presented below are examples that illustrate the different types of queries
12
12
that can be formulated.
13
13
14
14
Query a region
15
- ===============
15
+ ==============
16
16
17
17
This example shows how to query a certain region with DesiLegacySurvey.
18
18
We'll use a set of coordinates that define the region of interest,
19
19
and search within a 5 arcmin radius.
20
20
21
- .. code-block :: python
21
+ .. doctest-remote-data ::
22
22
23
23
>>> from astroquery.desi import DESILegacySurvey
24
24
>>> from astropy.coordinates import Angle, SkyCoord
@@ -28,41 +28,43 @@ and search within a 5 arcmin radius.
28
28
>>> radius = Angle(5 , unit = ' arcmin' )
29
29
>>> table_out = DESILegacySurvey.query_region(coordinates, radius, data_release = 9 )
30
30
>>> print (table_out[:5 ])
31
-
32
- ls_id dec ra ... type wise_coadd_id
33
- ---------------- ------------------ ------------------ ... ---- ------------ -
31
+ ls_id dec ra ... type wise_coadd_id
32
+ ...
33
+ ---------------- ----------------- ------------------ ... ---- -------------
34
34
9907734382838387 38.12628495570797 166.0838654387131 ... PSF 1667p378
35
35
9907734382838488 38.12798336424771 166.0922968862182 ... PSF 1667p378
36
36
9907734382838554 38.12858283671958 166.0980673954384 ... REX 1667p378
37
- 9907734382838564 38.12840803351445 166.09921863682337 ... EXP 1667p378
38
- 9907734382838584 38.12836885301038 166.10070750146636 ... REX 1667p378
37
+ 9907734382838564 38.12840803351445 166.09921863682337 ... EXP 1667p378
38
+ 9907734382838584 38.12836885301038 166.10070750146636 ... REX 1667p378
39
39
40
40
The result is an astropy.Table.
41
41
42
42
Get images
43
- ===============
43
+ ==========
44
44
45
45
To download images for a certain region of interest,
46
46
we can define our region in the same way used in the example above.
47
47
48
- .. code-block :: python
48
+ .. doctest-remote-data ::
49
49
50
50
>>> from astroquery.desi import DESILegacySurvey
51
51
>>> from astropy.coordinates import Angle, SkyCoord
52
+ >>>
52
53
>>> ra = Angle(' 11h04m27s' , unit = ' hourangle' ).degree
53
54
>>> dec = Angle(' +38d12m32s' , unit = ' hourangle' ).degree
54
- >> > pos = SkyCoord(ra, dec, unit = ' degree' )
55
- >> > radius = Angle(0.5 , unit = ' arcmin' )
55
+ >>> radius_input = 0.5
56
56
>>> pixels = 60
57
- >> > im = DESILegacySurvey.get_images(pos, data_release = 9 , radius = radius, pixels = pixels)
57
+ >>>
58
+ >>> pos = SkyCoord(ra, dec, unit = ' degree' )
59
+ >>> radius = Angle(radius_input, unit = ' arcmin' )
60
+ >>> im = DESILegacySurvey.get_images(pos, pixels, radius, data_release = 9 )
58
61
59
62
All the information we need can be found within the object "im".
60
63
61
- .. code-block :: python
64
+ .. doctest-remote-data ::
62
65
63
66
>>> hdul = im[0 ]
64
67
>>> hdul[0 ].header
65
-
66
68
SIMPLE = T / file does conform to FITS standard
67
69
BITPIX = -32 / number of bits per data pixel
68
70
NAXIS = 2 / number of data axes
@@ -88,24 +90,3 @@ All the information we need can be found within the object "im".
88
90
89
91
The variable "im" is a list of `~astropy.io.fits.HDUList ` objects, one entry for
90
92
each corresponding object.
91
-
92
- In case a set of not valid coordinates is provided, then a `astroquery.exceptions.NoResultsWarning `
93
- exception is raised, as shown in the example below.
94
-
95
- .. code-block :: python
96
-
97
- >> > from astroquery.desi import DESILegacySurvey
98
- >> > from astropy.coordinates import Angle, SkyCoord
99
- >> > ra = Angle(' 86.633212' , unit = ' degree' ).degree
100
- >> > dec = Angle(' 22.01446' , unit = ' degree' ).degree
101
- >> > radius_input = 3
102
- >> > pixels = 1296000
103
-
104
- >> > pos = SkyCoord(ra, dec, unit = ' degree' )
105
- >> > radius = Angle(radius_input, unit = ' arcmin' )
106
- >> > pixels = 60
107
- >> > im = DESILegacySurvey.get_images(pos, data_release = 9 , radius = radius, pixels = pixels)
108
-
109
- .. code-block :: python
110
-
111
- astroquery.exceptions.NoResultsWarning: HTTP Error 500 : Internal Server Error - Problem retrieving the file at the url: https:// www.legacysurvey.org/ viewer/ fits- cutout? ra= 86.633212 & dec= 22.01446 & size= 1296000 & layer= ls- dr9& pixscale= 0.0002777777777777778 & bands= g
0 commit comments