Skip to content

Commit

Permalink
Merge pull request #1937 from tinumide/atomic-doc-cleanup
Browse files Browse the repository at this point in the history
Atomic documentation clean up
  • Loading branch information
bsipocz authored Mar 29, 2022
2 parents f032596 + a5cf56e commit db3f08b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
3 changes: 1 addition & 2 deletions astroquery/atomic/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,7 @@ def _default_form_values(self):
default_form_values = self._get_default_form_values(form)
self._form_action_url = urlparse.urljoin(self.FORM_URL, form.get('action'))
self.__default_form_values = default_form_values
else:
raise ValueError(self.__default_form_values)

return self.__default_form_values

def _get_default_form_values(self, form):
Expand Down
19 changes: 10 additions & 9 deletions docs/atomic/atomic.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.. doctest-skip-all
.. _astroquery_atomic:

**************************************
Expand All @@ -26,17 +24,20 @@ In the following Python session you can see the ``atomic`` package in
action. Note that Hz is actually not a supported unit by Atomic Line List,
the atomic package takes care to support all spectral units.

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

>>> from astropy import units as u
>>> from astroquery.atomic import AtomicLineList
>>> wavelength_range = (15 * u.nm, 1.5e+16 * u.Hz)
>>> AtomicLineList.query_object(wavelength_range, wavelength_type='Air', wavelength_accuracy=20, element_spectrum='C II-IV')
<Table rows=3 names=('LAMBDA VAC ANG','SPECTRUM','TT','TERM','J J','LEVEL ENERGY CM 1')>
array([(196.8874, 'C IV', 'E1', '2S-2Po', '1/2-*', '0.00 - 507904.40'),
(197.7992, 'C IV', 'E1', '2S-2Po', '1/2-*', '0.00 - 505563.30'),
(199.0122, 'C IV', 'E1', '2S-2Po', '1/2-*', '0.00 - 502481.80')],
dtype=[('LAMBDA VAC ANG', '<f8'), ('SPECTRUM', 'S4'), ('TT', 'S2'), ('TERM', 'S6'), ('J J', 'S5'), ('LEVEL ENERGY CM 1', 'S18')])
>>> AtomicLineList.query_object(wavelength_range=wavelength_range, wavelength_type='Air',
... wavelength_accuracy=20, element_spectrum='C II-IV')
<Table length=3>
LAMBDA VAC ANG SPECTRUM TT ... J J A_ki LEVEL ENERGY CM 1
float64 str4 str2 ... str5 float64 str18
-------------- -------- ---- ... ----- ----------- ------------------
196.8874 C IV E1 ... 1/2-* 91300000.0 0.00 - 507904.40
197.7992 C IV E1 ... 1/2-* 118000000.0 0.00 - 505563.30
199.0122 C IV E1 ... 1/2-* 157000000.0 0.00 - 502481.80


Reference/API
Expand Down

0 comments on commit db3f08b

Please sign in to comment.