1
- .. doctest-skip-all
2
-
3
1
.. _astroquery.sdss :
4
2
5
3
********************************
@@ -15,16 +13,16 @@ arcsecond radius for optical counterparts in SDSS. Note use of the keyword
15
13
argument spectro, which requires matches to have spectroscopy, not just
16
14
photometry:
17
15
18
- .. code-block :: python
16
+ .. doctest-remote-data ::
19
17
20
18
>>> from astroquery.sdss import SDSS
21
19
>>> from astropy import coordinates as coords
22
20
>>> pos = coords.SkyCoord(' 0h8m05.63s +14d50m23.3s' , frame = ' icrs' )
23
21
>>> xid = SDSS .query_region(pos, spectro = True )
24
22
>>> print (xid)
25
- ra dec objid run rerun camcol field z plate mjd fiberID specobjid specClass
26
- ---------- ---------- - ------------------ ---- ---- - ------ ---- - ------ - ---- - ---- - ------ - ------------------ ---- -----
27
- 2.02344483 14.83982059 587727221951234166 1739 40 3 315 0.04541 751 52251 160 211612124516974592 3
23
+ ra dec ... specobjid run2d
24
+ ---------------- ---------------- ... ------------------ -----
25
+ 2.02344596573482 14.8398237551311 ... 845594848269461504 26
28
26
29
27
The result is an astropy.Table.
30
28
@@ -33,7 +31,7 @@ Downloading data
33
31
If we'd like to download spectra and/or images for our match, we have all
34
32
the information we need in the elements of "xid" from the above example.
35
33
36
- .. code-block :: python
34
+ .. doctest-remote-data ::
37
35
38
36
>>> sp = SDSS .get_spectra(matches = xid)
39
37
>>> im = SDSS .get_images(matches = xid, band = ' g' )
@@ -58,16 +56,21 @@ Spectral templates
58
56
It is also possible to download spectral templates from SDSS. To see what is
59
57
available, do
60
58
61
- .. code-block :: python
59
+ .. doctest-remote-data ::
62
60
63
61
>>> from astroquery.sdss import SDSS
64
- >> > print (SDSS .AVAILABLE_TEMPLATES )
62
+ >>> print (SDSS .AVAILABLE_TEMPLATES ) # doctest: +IGNORE_OUTPUT
63
+ {'star_O': 0, 'star_OB': 1, 'star_B': 2, 'star_A': [3, 4], 'star_FA': 5,
64
+ 'star_F': [6, 7], 'star_G': [8, 9], 'star_K': 10, 'star_M1': 11, 'star_M3': 12,
65
+ 'star_M5': 13, 'star_M8': 14, 'star_L1': 15, 'star_wd': [16, 20, 21], 'star_carbon': [17, 18, 19],
66
+ 'star_Ksubdwarf': 22, 'galaxy_early': 23, 'galaxy': [24, 25, 26], 'galaxy_late': 27, 'galaxy_lrg': 28,
67
+ 'qso': 29, 'qso_bal': [30, 31], 'qso_bright': 32}
65
68
66
69
Then, to download your favorite template, do something like
67
70
68
71
.. code-block :: python
69
72
70
- >> > template = SDSS .get_spectral_template(' qso' )
73
+ >> > template = SDSS .get_spectral_template(' qso' ) # doctest: +REMOTE_DATA
71
74
72
75
The variable "template" is a list of `~astropy.io.fits.HDUList ` objects
73
76
(same object as "sp" in the above example). In this case there is only one
0 commit comments