Skip to content

Commit

Permalink
added API auto-generated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Benoit Bovy committed Jul 15, 2016
1 parent fef1e44 commit 515ea46
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -41,6 +41,7 @@ output/*/index.html

# Sphinx
doc/_build
doc/generated

# IPython / Jupyter
examples/.ipynb_checkpoints
Expand Down
69 changes: 69 additions & 0 deletions doc/api.rst
@@ -0,0 +1,69 @@
.. _api:
.. currentmodule:: spyfit

API reference
=============

This page provides an auto-generated summary of spyfit's API. For more details
and examples, refer to the relevant chapters in the main part of the
documentation.

Retrievals
----------

.. autosummary::
:toctree: generated/

load_dataset

SFIT4
-----

Load SFIT4 dataset
~~~~~~~~~~~~~~~~~~

.. autosummary::
:toctree: generated/

io.sfit4.load_sfit4

Read SFIT4 output files
~~~~~~~~~~~~~~~~~~~~~~~

.. autosummary::
:toctree: generated/

io.sfit4.read_matrix
io.sfit4.read_ak_matrix
io.sfit4.read_seinv_vector
io.sfit4.read_table
io.sfit4.read_profiles
io.sfit4.read_aprfs
io.sfit4.read_rprfs
io.sfit4.read_state_vector
io.sfit4.read_param_iterations
io.sfit4.read_spectra
io.sfit4.read_single_spectrum
io.sfit4.read_single_spectra
io.sfit4.read_solar_spectrum
io.sfit4.read_summary


Read SFIT4 input files
~~~~~~~~~~~~~~~~~~~~~~

.. autosummary::
:toctree: generated/

io.sfit4.read_ctl
io.sfit4.read_layers
io.sfit4.read_ref_profiles
io.sfit4.read_spectrum

Write SFIT4 input files
~~~~~~~~~~~~~~~~~~~~~~~

.. autosummary::
:toctree: generated/

io.sfit4.write_reference
1 change: 1 addition & 0 deletions doc/index.rst
Expand Up @@ -24,6 +24,7 @@ Documentation
:maxdepth: 1

installing
api
contributing

Get in touch
Expand Down
8 changes: 4 additions & 4 deletions spyfit/io/_sfit4_read_out.py
Expand Up @@ -90,7 +90,7 @@ def read_ak_matrix(filename, ldim='level', kdim='kernel'):
See Also
--------
`read_matrix`
:func:`read_matrix`
"""
return read_matrix(filename, var_name='averaging_kernels',
Expand All @@ -104,7 +104,7 @@ def read_seinv_vector(filename, ddim='diag'):
See Also
--------
`read_matrix`
:func:`read_matrix`
"""
return read_matrix(filename, var_name='seinv', dims=ddim)
Expand Down Expand Up @@ -242,7 +242,7 @@ def read_aprfs(filename, ldim='level'):
See Also
--------
`read_profiles`
:func:`read_profiles`
"""
return read_profiles(filename, ldim=ldim, var_name_prefix='apriori_',
Expand All @@ -257,7 +257,7 @@ def read_rprfs(filename, ldim='level'):
See Also
--------
`read_profiles`
:func:`read_profiles`
"""
return read_profiles(filename, ldim=ldim, var_name_prefix='retrieved_',
Expand Down
11 changes: 2 additions & 9 deletions spyfit/io/sfit4.py
Expand Up @@ -8,22 +8,15 @@

import xarray as xr

from ._sfit4_read_out import (read_ak_matrix, read_aprfs, read_matrix,
from ._sfit4_read_out import (read_ak_matrix, read_aprfs, read_matrix, # noqa
read_param_iterations, read_profiles, read_rprfs,
read_seinv_vector, read_single_spectra,
read_single_spectrum, read_solar_spectrum,
read_spectra, read_state_vector, read_summary,
read_table)
from ._sfit4_read_in import (read_ctl, read_layers, read_ref_profiles,
read_spectrum)
from ._sfit4_write_in import write_reference


# public API
read_single_spectrum = read_single_spectrum
read_profiles = read_profiles
read_matrix = read_matrix
write_reference = write_reference
from ._sfit4_write_in import write_reference # noqa


def _read_g_out(fname):
Expand Down

0 comments on commit 515ea46

Please sign in to comment.