Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sphinxnb #47

Merged
merged 4 commits into from
May 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed docs/demos/Wet_sidebyside.png
Binary file not shown.
2 changes: 2 additions & 0 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ API
api/xdesign.acquisition
api/xdesign.algorithms
api/xdesign.geometry
api/xdesign.constants
api/xdesign.formats
api/xdesign.material
api/xdesign.metrics
api/xdesign.phantom
Expand Down
28 changes: 15 additions & 13 deletions docs/source/api/xdesign.acquisition.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@
==========================

.. automodule:: xdesign.acquisition
:members:
:show-inheritance:
:undoc-members:
:synopsis: Defines objects related to collection and organization of probe data.
:members:
:show-inheritance:
:undoc-members:

.. rubric:: **Functions:**
.. rubric:: **Classes:**

.. autosummary::
.. autosummary::

Beam
Probe
sinogram
angleogram
raster_scan
angle_scan
Beam
Probe

.. moduleauthor:: Doga Gursoy <[email protected]>
.. rubric:: **Functions:**

.. autosummary::

sinogram
angleogram
raster_scan
angle_scan
5 changes: 1 addition & 4 deletions docs/source/api/xdesign.algorithms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@
:members:
:show-inheritance:
:undoc-members:
:synopsis: Defines methods for reconstructing data from the :mod:`.acquisition` module.

.. rubric:: **Functions:**

.. autosummary::

reconstruct
art
sirt
mlem
stream

.. moduleauthor:: Doga Gursoy <[email protected]>
update_progress
4 changes: 4 additions & 0 deletions docs/source/api/xdesign.constants.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
:mod:`xdesign.constants`
========================

.. automodule:: xdesign.constants
11 changes: 11 additions & 0 deletions docs/source/api/xdesign.formats.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
:mod:`xdesign.formats`
======================

.. automodule:: xdesign.formats
:members:
:show-inheritance:
:undoc-members:

.. rubric:: **Functions:**

.. autosummary::
16 changes: 6 additions & 10 deletions docs/source/api/xdesign.geometry.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
=======================

.. automodule:: xdesign.geometry
:members:
:show-inheritance:
:inherited-members:
:undoc-members:
:synopsis: Defines geometric objects for the purpose of supporting :class:`.Phantom` definition and calculating intersections for the :mod:`.acquisition` module.
:members:
:show-inheritance:
:inherited-members:

.. rubric:: **Classes:**
.. rubric:: **Classes:**

.. autosummary::

.. autosummary::
Entity
Point
Circle
Expand All @@ -20,6 +19,3 @@
Square
Polygon
Mesh

.. moduleauthor:: Doga Gursoy <[email protected]>
.. moduleauthor:: Daniel J Ching <[email protected]>
6 changes: 2 additions & 4 deletions docs/source/api/xdesign.material.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
:members:
:show-inheritance:
:undoc-members:
:synopsis: Defines objects which auto-generate a parameterized :class:`.Phantom`.

.. rubric:: **Functions:**
.. rubric:: **Classes:**

.. autosummary::

Material
XDesignDefault
HyperbolicConcentric
DynamicRange
DogaCircles
Expand All @@ -25,5 +25,3 @@
SoftBiomaterial
Electronics
FiberComposite

.. moduleauthor:: Daniel J Ching <[email protected]>
20 changes: 11 additions & 9 deletions docs/source/api/xdesign.metrics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,23 @@
:members:
:show-inheritance:
:undoc-members:
:synopsis: Objects and methods for computing the quality of reconstructions.

.. rubric:: **Functions:**
.. rubric:: **Classes:**

.. autosummary::

ImageQuality
probability_mask
compute_quality

.. rubric:: **Functions:**

.. autosummary::

compute_PCC
compute_likeness
compute_background_ttest
compute_mtf
compute_mtf_siemens
compute_nps
compute_neq

.. moduleauthor:: Daniel J Ching <[email protected]>
compute_mtf_ffst
compute_mtf_lwkj
compute_nps_ffst
compute_neq_d
compute_quality
5 changes: 1 addition & 4 deletions docs/source/api/xdesign.phantom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@
:members:
:show-inheritance:
:undoc-members:
:synopsis: Defines an object for simulating X-ray phantoms.

.. rubric:: **Functions:**
.. rubric:: **Classes:**

.. autosummary::

Phantom

.. moduleauthor:: Daniel J Ching <[email protected]>
3 changes: 0 additions & 3 deletions docs/source/api/xdesign.plot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
:members:
:show-inheritance:
:undoc-members:
:synopsis: Contains functions for visualizing :class:`.Phantom` and :class:`.ImageQuality` metrics.

.. rubric:: **Functions:**

Expand All @@ -21,5 +20,3 @@
plot_mtf
plot_nps
plot_neq

.. moduleauthor:: Daniel J Ching <[email protected]>
6 changes: 3 additions & 3 deletions docs/source/bibtex/cite.bib
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@Article{ching:17,
author = "Ching, Daniel J. and G{\"{u}}rsoy, Do{\v{g}}a",
title = "{{\it XDesign}: an open-source software package for designing X-ray imaging phantoms and experiments}",
@Article{ching:17,
author = "Ching, Daniel J. and G{\"{u}}rsoy, Do{\v{g}}a",
title = "{XDesign: an open-source software package for designing X-ray imaging phantoms and experiments}",
journal = "Journal of Synchrotron Radiation",
year = "2017",
volume = "24",
Expand Down
9 changes: 9 additions & 0 deletions docs/source/bibtex/refs.bib
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ @article{Sufian:15
year = {2015}
}

@inproceedings{loebich2007digital,
title={Digital camera resolution measurement using sinusoidal Siemens stars},
author={Loebich, Christian and Wueller, Dietmar and Klingen, Bruno and Jaeger, Anke},
booktitle={Electronic Imaging 2007},
pages={65020N--65020N},
year={2007},
organization={International Society for Optics and Photonics}
}

@article{Bergamaschi:fv5047,
author = "Bergamaschi, Antoine and Medjoubi, Kadda and Messaoudi, C{\'{e}}dric and Marco, Sergio and Somogyi, Andrea",
title = "{{\it MMX-I}: data-processing software for multimodal X-ray imaging and tomography}",
Expand Down
63 changes: 24 additions & 39 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import sys
import os
from unittest.mock import MagicMock

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand All @@ -23,7 +24,7 @@
# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Expand All @@ -40,6 +41,8 @@
'sphinx.ext.viewcode',
'sphinx.ext.napoleon',
'sphinxcontrib.bibtex',
'nbsphinx',
'IPython.sphinxext.ipython_console_highlighting',
]

# Napoleon settings
Expand All @@ -63,7 +66,7 @@
source_suffix = '.rst'

# The encoding of source files.
#source_encoding = 'utf-8-sig'
# source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = 'index'
Expand All @@ -79,7 +82,7 @@
#
# The short X.Y version.
# The full version, including alpha/beta/rc tags.
release = '0.1'
release = '0.3'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -96,7 +99,7 @@

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = []
exclude_patterns = ['_build', '**.ipynb_checkpoints']

# The reST default role (used for this markup: `text`) to use for all
# documents.
Expand Down Expand Up @@ -168,7 +171,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# html_static_path = ['_static']

# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
Expand Down Expand Up @@ -315,42 +318,24 @@
# texinfo_no_detailmenu = False

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
intersphinx_mapping = {'https://docs.python.org/3': None}

# picked from http://read-the-docs.readthedocs.org/en/latest/faq.html
class Mock(object):

__all__ = []
# picked from http://read-the-docs.readthedocs.org/en/latest/faq.html
class Mock(MagicMock):
@classmethod
def __getattr__(cls, name):
return MagicMock()

def __init__(self, *args, **kwargs):
pass

def __call__(self, *args, **kwargs):
return Mock()
MOCK_MODULES = ['numpy',
'matplotlib', 'matplotlib.pyplot', 'matplotlib.patches',
'matplotlib.path', 'matplotlib.patheffects', 'matplotlib.axis',
'polytope',
'cached_property',
'scipy', 'scipy.stats', 'scipy.ndimage', 'scipy.spatial',
'cycler',
'phasepack',
]

@classmethod
def __getattr__(cls, name):
return Mock()
def __mul__(self, other):
return Mock()
def __rmul__(self, other):
return Mock()
def __pow__(self, other):
return Mock()
def __div__(self, other):
return Mock()
def __add__(self, other):
return Mock()
def __radd__(self, other):
return Mock()

MOCK_MODULES = [
'cached_property', 'cycler', 'intertools',
'matplotlib', 'matplotlib.pyplot', 'matplotlib.patches',
'matplotlib.path', 'matplotlib.patheffects', 'matplotlib.axis',
'math', 'numpy', 'numbers', 'phasepack', 'polytope',
'scipy', 'scipy.stats', 'scipy.ndimage', 'scipy.spatial',
]

for mod_name in MOCK_MODULES:
sys.modules[mod_name] = Mock()
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
File renamed without changes.
File renamed without changes.
File renamed without changes.
31 changes: 15 additions & 16 deletions docs/source/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,25 @@
Examples
========

This section contains `Jupyter Notebooks <http://ipython.org/notebook.html>`_
examples for various XDesign functions.

To `run <http://jupyter.readthedocs.org/en/latest/running.html>`_ these examples in a
`notebooks <http://ipython.org/notebook.html>`_ install
`Jupyter <http://jupyter.readthedocs.org/en/latest/install.html>`_ or run the notebooks from
scripts from `here <https://github.com/tomography/xdesign/tree/master/docs/demos>`_
This section contains `Jupyter Notebooks <http://ipython.org/notebook.html>`_ examples for various XDesign functions.

To `run <http://jupyter.readthedocs.org/en/latest/running.html>`_ these examples in a `notebook <http://ipython.org/notebook.html>`_ install `Jupyter <http://jupyter.readthedocs.org/en/latest/install.html>`_ and run the notebooks from their `source <https://github.com/tomography/xdesign/tree/master/docs/source/demos>`_


.. toctree::
:titlesonly:

ipynb/FullReferenceMetrics.rst
ipynb/NoReferenceMetrics.rst
ipynb/Parameterized.rst
ipynb/Shepp.rst
ipynb/StandardPatterns.rst
ipynb/WetCircles.rst
:titlesonly:
:maxdepth: 1

demos/Shepp
demos/StandardPatterns
demos/Parameterized
demos/NoReferenceMetrics
demos/FullReferenceMetrics
demos/WetCircles



.. automodule:: xdesign
:members:
:undoc-members:
:show-inheritance:
:show-inheritance:
Loading