Skip to content

Commit 1760efd

Browse files
Miguel de Val-Borrokeflavich
authored andcommitted
Add some documentation for HITRAN query
1 parent e502673 commit 1760efd

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

astroquery/hitran/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
66
:Author: Adam Ginsburg ([email protected])
77
"""
8-
from .reader import download_hitran, read_hitran_file
8+
from .reader import download_hitran, read_hitran_file, cache_location

docs/hitran/hitran.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
.. doctest-skip-all
2+
3+
************************************
4+
HITRAN Queries (`astroquery.hitran`)
5+
************************************
6+
7+
Getting started
8+
===============
9+
10+
This module provides an interface to the `HITRAN`_ database API. It can
11+
download a data file including transitions for a particular molecule in a given
12+
wavenumber range. The file is downloaded in the `~hitran.cache_location`
13+
directory and can be opened with a reader function that returns a table of
14+
spectral lines including all accessible parameters.
15+
16+
Examples
17+
========
18+
19+
This will download all transitions of the main isotopologue of water between
20+
the wavenumbers of 3400 and 4100 cm\ :sup:`-1`\ .
21+
22+
.. code-block:: python
23+
24+
>>> import os
25+
>>> from astroquery.hitran import read_hitran_file, cache_location, download_hitran
26+
>>> download_hitran(1, 1, 3400, 4100)
27+
>>> tbl = read_hitran_file(os.path.join(cache_location, 'H2O.data'))
28+
29+
Transitions are returned as an `~astropy.table.Table` instance.
30+
31+
Reference/API
32+
=============
33+
34+
.. automodapi:: astroquery.hitran
35+
:no-inheritance-diagram:
36+
37+
.. _HITRAN: http://hitran.org

0 commit comments

Comments
 (0)