Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Oct 20, 2017
1 parent a61656a commit faff5f0
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
sys.path.append(op.abspath('extensions'))

# Mock all dependencies
install_requires = ["h5py", "numpy", "scipy", "skimage",
"skimage.restoration"]
install_requires = ["h5py", "numpy", "qpimage",
"skimage.external"]

for mod_name in install_requires:
sys.modules[mod_name] = mock.Mock()
Expand Down
1 change: 0 additions & 1 deletion docs/sec_code_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Code reference
.. toctree::
:maxdepth: 2

userapi
1 change: 1 addition & 0 deletions docs/sec_getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ Getting started
:maxdepth: 2

installation
userapi
examples
37 changes: 37 additions & 0 deletions docs/userapi.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
========
User API
========
Qpformat supports several file formats
(:py:class:`qpformat.file_formats.formats`), which are
divided into :py:class:`qpformat.file_formats.SingleData`
(the experimental data file format contains only one phase image)
and :py:class:`qpformat.file_formats.SeriesData` (the experimental
data file format supports multiple phase images).
From these base classes, all data file formats are derived. The idea
is that experimental data is not loaded into memory until the
`get_qpimage` method is called which returns a
:py:class:`qpimage.QPImage` object.

Basic Usage
-----------
The file format type is determined automatically by qpformat.
If the file format is implemented in qpformat, experimental
data can be loaded with the :py:func:`qpformat.load_data` method.

.. code-block:: python
# Obtain a qpformat.file_formats.SingleData object
# (the data is not loaded into memory, only the meta data is read)
ds = qpformat.load_data(path="/path/to/SID PHA_xxx.tif")
# Get the quantitative phase data (a qpimage.QPImage is returned)
qpi = ds.get_qpimage()
SingleData
----------
.. autoclass:: qpformat.file_formats.SeriesData
:inherited-members:

SeriesData
----------
.. autoclass:: qpformat.file_formats.SeriesData
:members:

Constants
---------
.. autodata:: qpformat.file_formats.formats
2 changes: 1 addition & 1 deletion qpformat/file_formats/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import os.path as op

from .dataset import SeriesData
from .dataset import SeriesData, SingleData
from .series_hdf5_qpimage import SeriesHdf5Qpimage
from .series_zip_tif_phasics import SeriesZipTifPhasics
from .single_hdf5_qpimage import SingleHdf5Qpimage
Expand Down

0 comments on commit faff5f0

Please sign in to comment.