Skip to content

Commit b4ce0ff

Browse files
tinuademargaretceb8
authored andcommitted
added remote data directive
1 parent 5e9b817 commit b4ce0ff

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

docs/sdss/sdss.rst

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

53
********************************
@@ -16,15 +14,16 @@ argument spectro, which requires matches to have spectroscopy, not just
1614
photometry:
1715

1816
.. code-block:: python
17+
.. doctest-remote-data::
1918

2019
>>> from astroquery.sdss import SDSS
2120
>>> from astropy import coordinates as coords
2221
>>> pos = coords.SkyCoord('0h8m05.63s +14d50m23.3s', frame='icrs')
2322
>>> xid = SDSS.query_region(pos, spectro=True)
2423
>>> 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
24+
ra dec objid ... run2d instrument
25+
---------------- ---------------- ------------------- ... ----- ----------
26+
2.02344596573482 14.8398237551311 1237652943176138868 ... 26 SDSS
2827

2928
The result is an astropy.Table.
3029

@@ -34,6 +33,7 @@ If we'd like to download spectra and/or images for our match, we have all
3433
the information we need in the elements of "xid" from the above example.
3534

3635
.. code-block:: python
36+
.. doctest-remote-data::
3737

3838
>>> sp = SDSS.get_spectra(matches=xid)
3939
>>> im = SDSS.get_images(matches=xid, band='g')
@@ -59,15 +59,21 @@ It is also possible to download spectral templates from SDSS. To see what is
5959
available, do
6060

6161
.. code-block:: python
62+
.. doctest-remote-data::
6263

6364
>>> from astroquery.sdss import SDSS
64-
>>> print(SDSS.AVAILABLE_TEMPLATES)
65+
>>> print(SDSS.AVAILABLE_TEMPLATES) # doctest: +IGNORE_OUTPUT
66+
{'star_O': 0, 'star_OB': 1, 'star_B': 2, 'star_A': [3, 4], 'star_FA': 5,
67+
'star_F': [6, 7], 'star_G': [8, 9], 'star_K': 10, 'star_M1': 11, 'star_M3': 12,
68+
'star_M5': 13, 'star_M8': 14, 'star_L1': 15, 'star_wd': [16, 20, 21], 'star_carbon': [17, 18, 19],
69+
'star_Ksubdwarf': 22, 'galaxy_early': 23, 'galaxy': [24, 25, 26], 'galaxy_late': 27, 'galaxy_lrg': 28,
70+
'qso': 29, 'qso_bal': [30, 31], 'qso_bright': 32}
6571

6672
Then, to download your favorite template, do something like
6773

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

0 commit comments

Comments
 (0)