Skip to content

Commit

Permalink
added remote data directive
Browse files Browse the repository at this point in the history
  • Loading branch information
tinuademargaret committed Jan 21, 2021
1 parent 2ec47b7 commit 35bc256
Showing 1 changed file with 52 additions and 58 deletions.
110 changes: 52 additions & 58 deletions docs/nist/nist.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.. doctest-skip-all
.. _astroquery.nist:

********************************
Expand All @@ -24,45 +22,37 @@ specify the spectrum you wish to fetch. By default this is set to "H I", but
you can set it to several other values like "Na;Mg", etc. Lets now see a simple example.

.. code-block:: python
.. doctest-remote-data::

>>> from astroquery.nist import Nist
>>> import astropy.units as u
>>> table = Nist.query(4000 * u.AA, 7000 * u.AA, linename="H I")
>>> print(table)
Observed Ritz Rel. Aki Acc. ... Lower level Upper level Type TP Line
------------- ------------- ------ ---------- ---- ... ------------------- ------------------- ---- ----- --------
-- 4102.85985516 -- 4287700.0 AAA ... -- -- -- -- --
-- 4102.86191086 -- 245010.0 AAA ... 2p | 2P* | 1/2 6s | 2S | 1/2 -- T8637 --
-- 4102.8632 -- -- -- ... | | | | -- -- c57
4102.86503481 4102.86503481 -- -- -- ... 2s | 2S | 1/2 6d | 2D | 5/2 E2 -- L11759
-- 4102.86579134 -- 2858300.0 AAA ... -- -- -- -- --
4102.86785074 4102.86785074 -- -- -- ... 2s | 2S | 1/2 6s | 2S | 1/2 M1 -- L11759
-- 4102.86807252 -- 2858400.0 AAA ... -- -- -- -- --
4102.892 4102.8991 70000 973200.0 AAA ... 2 | | 6 | | -- T8637 L7436c29
-- 4102.8922 -- -- -- ... | | | | -- -- c58
-- 4102.92068748 -- 5145000.0 AAA ... 2p | 2P* | 3/2 6d | 2D | 5/2 -- T8637 --
-- 4102.9208 -- -- -- ... | | | | -- -- c59
-- 4102.92144772 -- 857480.0 AAA ... -- -- -- -- --
-- 4102.92350348 -- 490060.0 AAA ... 2p | 2P* | 3/2 6s | 2S | 1/2 -- T8637 --
-- 4341.647191 -- 7854800.0 AAA ... 2p | 2P* | 1/2 5d | 2D | 3/2 -- T8637 --
-- 4341.6512 -- -- -- ... | | | | -- -- c60
... ... ... ... ... ... ... ... ... ... ...
6564.522552 6564.522555 -- 53877000.0 AAA ... 2p | 2P* | 1/2 3d | 2D | 3/2 -- T8637 L2752
-- 6564.527 -- -- -- ... | | | | -- -- c67
-- 6564.535 -- -- -- ... | | | | -- -- c68
6564.537684 6564.537684 -- 22448000.0 AAA ... 2s | 2S | 1/2 3p | 2P* | 3/2 -- T8637 L6891c38
-- 6564.564672 -- 2104600.0 AAA ... 2p | 2P* | 1/2 3s | 2S | 1/2 -- T8637 --
-- 6564.579878 -- -- -- ... 2s | 2S | 1/2 3s | 2S | 1/2 M1 -- --
-- 6564.583 -- -- -- ... | | | | -- -- c66
6564.584404 6564.584403 -- 22449000.0 AAA ... 2s | 2S | 1/2 3p | 2P* | 1/2 -- T8637 L6891c38
6564.6 6564.632 500000 44101000.0 AAA ... 2 | | 3 | | -- T8637 L7400c29
-- 6564.608 -- -- -- ... | | | | -- -- c69
6564.66464 6564.66466 -- 64651000.0 AAA ... 2p | 2P* | 3/2 3d | 2D | 5/2 -- T8637 L2752
-- 6564.6662 -- -- -- ... | | | | -- -- c71
-- 6564.667 -- -- -- ... | | | | -- -- c70
-- 6564.680232 -- 10775000.0 AAA ... 2p | 2P* | 3/2 3d | 2D | 3/2 -- T8637 --
-- 6564.722349 -- 4209700.0 AAA ... 2p | 2P* | 3/2 3s | 2S | 1/2 -- T8637 --
Observed Ritz Transition Rel. ... Type TP Line
------------- ------------- ------------- ------ ... ---- ----- --------
-- 4102.85985517 24373.2429403 -- ... -- T8637 --
-- 4102.86191087 24373.2307283 -- ... -- T8637 --
-- 4102.8632 24373.223 -- ... -- -- c57
4102.86503481 4102.86503481 24373.2121704 -- ... E2 -- L11759
-- 4102.86579132 24373.2076763 -- ... -- T8637 --
4102.86785074 4102.86785074 24373.1954423 -- ... M1 -- L11759
-- 4102.8680725 24373.1941249 -- ... -- T8637 --
4102.892 4102.8991 24373.05 70000 ... -- T8637 L7436c29
-- 4102.8922 24373.051 -- ... -- -- c58
-- 4102.92068748 24372.8815683 -- ... -- T8637 --
... ... ... ... ... ... ... ...
-- 6564.564672 15233.302588 -- ... -- T8637 --
-- 6564.579878 15233.267302 -- ... M1 -- --
-- 6564.583 15233.26 -- ... -- -- c66
6564.584404 6564.584403 15233.256799 -- ... -- T8637 L6891c38
6564.6 6564.632 15233.21 500000 ... -- T8637 L7400c29
-- 6564.608 15233.202 -- ... -- -- c69
6564.66464 6564.66466 15233.07061 -- ... -- T8637 L2752
-- 6564.6662 15233.067 -- ... -- -- c71
-- 6564.667 15233.065 -- ... -- -- c70
-- 6564.680232 15233.034432 -- ... -- T8637 --
-- 6564.722349 15232.9367 -- ... -- T8637 --
Length = 53 rows


Note that using a different unit will result in different output units in the
Expand All @@ -78,34 +68,38 @@ Similarly you can set the ``output_order`` to any one of 'wavelength' or
or 'vac+air'. Here is an example with all these parameters.

.. code-block:: python
.. doctest-remote-data::

>>> from astroquery.nist import Nist
>>> table = Nist.query(4000 * u.nm, 7000 * u.nm, 'H I',
... energy_level_unit='eV', output_order='wavelength',
... wavelength_type='vacuum')
>>> print(table)
Observed Ritz Rel. Aki ... Upper level Type TP Line
-------- ----------- ----- --------- ... ------------------- ---- ----- ----
-- 4020.871 (200) 5526.5 ... -- -- -- --
-- 4052.18664 -- 1238100.0 ... 5d | 2D | 3/2 -- T8637 --
-- 4052.19376 -- 737160.0 ... 5p | 2P* | 3/2 -- T8637 --
-- 4052.22121 -- 215030.0 ... -- -- -- --
-- 4052.23222 -- 737210.0 ... 5p | 2P* | 1/2 -- T8637 --
-- 4052.248747 -- 2412100.0 ... -- -- -- --
-- 4052.24892 -- 1485800.0 ... -- -- -- --
-- 4052.26147 -- 18846.0 ... 5p | 2P* | 3/2 -- T8637 --
... ... ... ... ... ... ... ... ...
-- 5525.19 (150) 2470.9 ... -- -- -- --
-- 5711.464 (180) 3515.8 ... -- -- -- --
-- 5908.22 (540) 70652.0 ... 9 | | -- T8637 --
-- 5956.845 (210) 5156.2 ... -- -- -- --
-- 6291.918 (250) 7845.7 ... -- -- -- --
-- 6771.993 (300) 12503.0 ... 12 | | -- T8637 --
-- 6946.756 -- 688.58 ... -- -- -- --
Observed Ritz Transition Rel. ... Upper level Type TP Line
-------- ----------- ----------- ----- ... ------------------- ---- ----- -----
-- 4020.871 2487.024 (200) ... 14 | | -- T8637 --
-- 4052.18664 2467.803411 -- ... 5d | 2D | 3/2 -- T8637 --
-- 4052.19376 2467.79907 -- ... 5p | 2P* | 3/2 -- T8637 --
-- 4052.22121 2467.78236 -- ... 5s | 2S | 1/2 -- T8637 --
-- 4052.23222 2467.77565 -- ... 5p | 2P* | 1/2 -- T8637 --
-- 4052.248747 2467.765585 -- ... 5f | 2F* | 5/2 -- T8637 --
-- 4052.24892 2467.765479 -- ... 5d | 2D | 5/2 -- T8637 --
-- 4052.26147 2467.75784 -- ... 5p | 2P* | 3/2 -- T8637 --
-- 4052.26174 2467.757676 -- ... 5d | 2D | 3/2 -- T8637 --
-- 4052.26738 2467.75424 -- ... 5g | 2G | 7/2 -- T8637 --
... ... ... ... ... ... ... ... ...
5128.65 5128.662 1949.83 (450) ... 10 | | -- T8637 L7452
-- 5169.282 1934.5047 -- ... 19 | | -- T8637 --
-- 5263.685 1899.8096 -- ... 18 | | -- T8637 --
-- 5379.776 1858.8134 -- ... 17 | | -- T8637 --
-- 5525.19 1809.8925 (150) ... 16 | | -- T8637 --
-- 5711.464 1750.8646 (180) ... 15 | | -- T8637 --
-- 5908.22 1692.5572 (540) ... 9 | | -- T8637 --
-- 5956.845 1678.7409 (210) ... 14 | | -- T8637 --
-- 6291.918 1589.3405 (250) ... 13 | | -- T8637 --
-- 6771.993 1476.6701 (300) ... 12 | | -- T8637 --
-- 6946.756 1439.5208 -- ... 20 | | -- T8637 --
Length = 37 rows

Reference/API
=============
Expand Down

0 comments on commit 35bc256

Please sign in to comment.