Skip to content

Commit 27ce5ce

Browse files
authored
Merge pull request #1977 from tinumide/sdss-doc-cleanup
Sdss documentaion cleanup
2 parents 5e9b817 + 9472e6a commit 27ce5ce

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

docs/sdss/sdss.rst

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. doctest-skip-all
2-
31
.. _astroquery.sdss:
42

53
********************************
@@ -15,16 +13,16 @@ arcsecond radius for optical counterparts in SDSS. Note use of the keyword
1513
argument spectro, which requires matches to have spectroscopy, not just
1614
photometry:
1715

18-
.. code-block:: python
16+
.. doctest-remote-data::
1917

2018
>>> from astroquery.sdss import SDSS
2119
>>> from astropy import coordinates as coords
2220
>>> pos = coords.SkyCoord('0h8m05.63s +14d50m23.3s', frame='icrs')
2321
>>> xid = SDSS.query_region(pos, spectro=True)
2422
>>> 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
2826

2927
The result is an astropy.Table.
3028

@@ -33,7 +31,7 @@ Downloading data
3331
If we'd like to download spectra and/or images for our match, we have all
3432
the information we need in the elements of "xid" from the above example.
3533

36-
.. code-block:: python
34+
.. doctest-remote-data::
3735

3836
>>> sp = SDSS.get_spectra(matches=xid)
3937
>>> im = SDSS.get_images(matches=xid, band='g')
@@ -58,16 +56,21 @@ Spectral templates
5856
It is also possible to download spectral templates from SDSS. To see what is
5957
available, do
6058

61-
.. code-block:: python
59+
.. doctest-remote-data::
6260

6361
>>> 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}
6568

6669
Then, to download your favorite template, do something like
6770

6871
.. code-block:: python
6972
70-
>>> template = SDSS.get_spectral_template('qso')
73+
>>> template = SDSS.get_spectral_template('qso') # doctest: +REMOTE_DATA
7174
7275
The variable "template" is a list of `~astropy.io.fits.HDUList` objects
7376
(same object as "sp" in the above example). In this case there is only one

0 commit comments

Comments
 (0)