diff --git a/sphinx/Makefile b/sphinx/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..53bfc172ec19088227436bd75c551eae5d9e321e --- /dev/null +++ b/sphinx/Makefile @@ -0,0 +1,216 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = build + +# User-friendly check for sphinx-build +ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) +$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) +endif + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source + +.PHONY: help +help: + @echo "Please use \`make <target>' where <target> is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " applehelp to make an Apple Help Book" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + @echo " coverage to run coverage check of the documentation (if enabled)" + +.PHONY: clean +clean: + rm -rf $(BUILDDIR)/* + +.PHONY: html +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +.PHONY: dirhtml +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +.PHONY: singlehtml +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +.PHONY: pickle +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +.PHONY: json +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +.PHONY: htmlhelp +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +.PHONY: qthelp +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/NIFTY.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/NIFTY.qhc" + +.PHONY: applehelp +applehelp: + $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp + @echo + @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." + @echo "N.B. You won't be able to view it unless you put it in" \ + "~/Library/Documentation/Help or install it in your application" \ + "bundle." + +.PHONY: devhelp +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/NIFTY" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/NIFTY" + @echo "# devhelp" + +.PHONY: epub +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +.PHONY: latex +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +.PHONY: latexpdf +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +.PHONY: latexpdfja +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +.PHONY: text +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +.PHONY: man +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +.PHONY: texinfo +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +.PHONY: info +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +.PHONY: gettext +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +.PHONY: changes +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +.PHONY: linkcheck +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +.PHONY: doctest +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +.PHONY: coverage +coverage: + $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage + @echo "Testing of coverage in the sources finished, look at the " \ + "results in $(BUILDDIR)/coverage/python.txt." + +.PHONY: xml +xml: + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +.PHONY: pseudoxml +pseudoxml: + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/sphinx/source/_static/nifty_logo_black.png b/sphinx/source/_static/nifty_logo_black.png new file mode 100644 index 0000000000000000000000000000000000000000..0db9382a3cb1942822aa25b46d493b3d8781050b Binary files /dev/null and b/sphinx/source/_static/nifty_logo_black.png differ diff --git a/sphinx/source/_static/nifty_logo_white.png b/sphinx/source/_static/nifty_logo_white.png new file mode 100644 index 0000000000000000000000000000000000000000..1eb86623850348c08fcc50d9f7531301772e870e Binary files /dev/null and b/sphinx/source/_static/nifty_logo_white.png differ diff --git a/sphinx/source/autosum.py b/sphinx/source/autosum.py new file mode 100644 index 0000000000000000000000000000000000000000..816e8538a084850b6c8ab65140db7c2b3c34b4b6 --- /dev/null +++ b/sphinx/source/autosum.py @@ -0,0 +1,47 @@ +from sphinx.ext.autosummary import Autosummary +from sphinx.ext.autosummary import get_documenter +from docutils.parsers.rst import directives +from sphinx.util.inspect import safe_getattr +import re + +class AutoAutoSummary(Autosummary): + + option_spec = { + 'methods': directives.unchanged, + 'attributes': directives.unchanged + } + + required_arguments = 1 + + @staticmethod + def get_members(obj, typ, include_public=None): + if not include_public: + include_public = [] + items = [] + for name in dir(obj): + try: + documenter = get_documenter(safe_getattr(obj, name), obj) + except AttributeError: + continue + if documenter.objtype == typ: + items.append(name) + public = [x for x in items if x in include_public or not x.startswith('_')] + return public, items + + def run(self): + clazz = self.arguments[0] + try: + (module_name, class_name) = clazz.rsplit('.', 1) + m = __import__(module_name, globals(), locals(), [class_name]) + c = getattr(m, class_name) + if 'methods' in self.options: + _, methods = self.get_members(c, 'method', ['__init__']) + + self.content = ["~%s.%s" % (clazz, method) for method in methods if not method.startswith('_')] + if 'attributes' in self.options: + _, attribs = self.get_members(c, 'attribute') + self.content = ["~%s.%s" % (clazz, attrib) for attrib in attribs if not attrib.startswith('_')] + finally: + return super(AutoAutoSummary, self).run() + +app.add_directive('autoautosummary', AutoAutoSummary) diff --git a/sphinx/source/composed_operator.rst b/sphinx/source/composed_operator.rst new file mode 100644 index 0000000000000000000000000000000000000000..5e7ef5fa9c5376c41bb668ce0d377b8de7cca275 --- /dev/null +++ b/sphinx/source/composed_operator.rst @@ -0,0 +1,8 @@ +.. currentmodule:: nifty + +The ``ComposedOperator`` class -- ... +..................................... + +.. autoclass:: ComposedOperator + :show-inheritance: + :members: diff --git a/sphinx/source/conf.py b/sphinx/source/conf.py new file mode 100644 index 0000000000000000000000000000000000000000..8b422952541ea795c53fe8a3c62ddb8098f811ae --- /dev/null +++ b/sphinx/source/conf.py @@ -0,0 +1,324 @@ +# -*- coding: utf-8 -*- +# +# NIFTY documentation build configuration file, created by +# sphinx-quickstart on Tue May 16 10:22:50 2017. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +from nifty import * +import sys +import os + + +# 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 +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.insert(0, os.path.abspath('.')) + +napoleon_google_docstring = False +napoleon_numpy_docstring = True + +napoleon_use_ivar = True +napoleon_use_param = False +napoleon_use_keyword = False + + +autodoc_member_order='groupwise' + +#autosummary_generate = True + +numpydoc_show_inherited_class_members=False +numpydoc_class_members_toctree=False + + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +#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 +# ones. +extensions = [ + 'sphinx.ext.autodoc', + 'numpydoc', + 'sphinx.ext.autosummary', + 'sphinx.ext.napoleon', + 'sphinx.ext.coverage', + 'sphinx.ext.todo', + 'sphinx.ext.mathjax', + 'sphinx.ext.viewcode' +] + + + + + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'NIFTY' +copyright = u'2017, Theo Steininger' +author = u'Theo Steininger' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = u'3.0.4' +# The full version, including alpha/beta/rc tags. +release = u'3.0.x' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = [] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +#keep_warnings = False + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = True + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'alabaster' +#html_theme = 'classic' + +html_theme_options = { + 'page_width':'' +} + + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# "<project> v<release> documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +html_logo = 'nifty_logo_black.png' + +# The name of an image file (relative to this directory) to use as a favicon of +# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# 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'] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +#html_extra_path = [] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a <link> tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Language to be used for generating the HTML full-text search index. +# Sphinx supports the following languages: +# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' +# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' +#html_search_language = 'en' + +# A dictionary with options for the search language support, empty by default. +# Now only 'ja' uses this config value +#html_search_options = {'type': 'default'} + +# The name of a javascript file (relative to the configuration directory) that +# implements a search results scorer. If empty, the default will be used. +#html_search_scorer = 'scorer.js' + +# Output file base name for HTML help builder. +htmlhelp_basename = 'NIFTYdoc' + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', + +# Latex figure (float) alignment +#'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'NIFTY.tex', u'NIFTY Documentation', + u'NIFTY', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'nifty', u'NIFTY Documentation', + [author], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'NIFTY', u'NIFTY Documentation', + author, 'NIFTY', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +#texinfo_no_detailmenu = False + + +# Example configuration for intersphinx: refer to the Python standard library. +#intersphinx_mapping = {'https://docs.python.org/': None} diff --git a/sphinx/source/conjugate_gradient.rst b/sphinx/source/conjugate_gradient.rst new file mode 100644 index 0000000000000000000000000000000000000000..d8847edb41ac9384602364790f4573c6b870bd6c --- /dev/null +++ b/sphinx/source/conjugate_gradient.rst @@ -0,0 +1,8 @@ +.. currentmodule:: nifty + +The ``ConjugateGradient`` class -- ... +...................................... + +.. autoclass:: ConjugateGradient + :show-inheritance: + :members: diff --git a/sphinx/source/descent_minimizer.rst b/sphinx/source/descent_minimizer.rst new file mode 100644 index 0000000000000000000000000000000000000000..3c8e6605ecf7a074588bc6c4fa6f73e1deddf2a3 --- /dev/null +++ b/sphinx/source/descent_minimizer.rst @@ -0,0 +1,8 @@ +.. currentmodule:: nifty + +The ``DescentMinimizer`` class -- ... +..................................... + +.. autoclass:: DescentMinimizer + :show-inheritance: + :members: diff --git a/sphinx/source/diagonal_operator.rst b/sphinx/source/diagonal_operator.rst new file mode 100644 index 0000000000000000000000000000000000000000..0dc633e47396c4349809c813f9c7d7cbe6e737ab --- /dev/null +++ b/sphinx/source/diagonal_operator.rst @@ -0,0 +1,8 @@ +.. currentmodule:: nifty + +The ``DiagonalOperator`` class -- ... +..................................... + +.. autoclass:: DiagonalOperator + :show-inheritance: + :members: diff --git a/sphinx/source/endomorphic_operator.rst b/sphinx/source/endomorphic_operator.rst new file mode 100644 index 0000000000000000000000000000000000000000..eb03cb726fbfb60006e2cd23c341934c549c6aee --- /dev/null +++ b/sphinx/source/endomorphic_operator.rst @@ -0,0 +1,8 @@ +.. currentmodule:: nifty + +The ``EndomorphicOperator`` class -- ... +........................................ + +.. autoclass:: EnomorphicOperator + :show-inheritance: + :members: diff --git a/sphinx/source/fft_operator.rst b/sphinx/source/fft_operator.rst new file mode 100644 index 0000000000000000000000000000000000000000..341d9c2fdcdc69a8302585ff3d3bd40f5a9f4e70 --- /dev/null +++ b/sphinx/source/fft_operator.rst @@ -0,0 +1,8 @@ +.. currentmodule:: nifty + +The ``FFTOperator`` class -- ... +................................ + +.. autoclass:: FFTOperator + :show-inheritance: + :members: diff --git a/sphinx/source/field.rst b/sphinx/source/field.rst new file mode 100644 index 0000000000000000000000000000000000000000..3b07b68e1cbd0727d795d55c76619d5bf8d5752b --- /dev/null +++ b/sphinx/source/field.rst @@ -0,0 +1,14 @@ +.. currentmodule:: nifty + +The ``Field`` class -- ... +.......................... + + +.. autoclass:: Field + :show-inheritance: + :members: + + .. rubric:: Methods + + .. autoautosummary:: Field + :methods: diff --git a/sphinx/source/gl_space.rst b/sphinx/source/gl_space.rst new file mode 100644 index 0000000000000000000000000000000000000000..9b1901c3725f39bc26338410ff06b949156f3f7a --- /dev/null +++ b/sphinx/source/gl_space.rst @@ -0,0 +1,8 @@ +.. currentmodule:: nifty + +The ``GLSpace`` class -- Gauss-Legendre pixelization of the sphere +.................................................................. + +.. autoclass:: GLSpace + :show-inheritance: + :members: diff --git a/sphinx/source/gllm_transformation.rst b/sphinx/source/gllm_transformation.rst new file mode 100644 index 0000000000000000000000000000000000000000..12baa3ca04da3760af70f768815d77cd6c19d620 --- /dev/null +++ b/sphinx/source/gllm_transformation.rst @@ -0,0 +1,9 @@ +.. currentmodule:: nifty + +The ``GLLMTransformation`` class -- ... +....................................... + + +.. autoclass:: GLLMTransformation + :show-inheritance: + :members: diff --git a/sphinx/source/hp_space.rst b/sphinx/source/hp_space.rst new file mode 100644 index 0000000000000000000000000000000000000000..f53f20d8b767a2f9525e654b92b7462ad265e12c --- /dev/null +++ b/sphinx/source/hp_space.rst @@ -0,0 +1,9 @@ +.. currentmodule:: nifty + +The ``HPSpace`` class -- HEALPix discretization of the sphere +............................................................. + + +.. autoclass:: HPSpace + :show-inheritance: + :members: diff --git a/sphinx/source/hplm_transformation.rst b/sphinx/source/hplm_transformation.rst new file mode 100644 index 0000000000000000000000000000000000000000..828a6d502e068cac272f1e2b0db8133a2775b123 --- /dev/null +++ b/sphinx/source/hplm_transformation.rst @@ -0,0 +1,9 @@ +.. currentmodule:: nifty + +The ``HPLMTransformation`` class -- ... +....................................... + + +.. autoclass:: HPLMTransformation + :show-inheritance: + :members: diff --git a/sphinx/source/index.rst b/sphinx/source/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..bd9d79b8e3f97ff19b8c4a2da4555c1b258cffaa --- /dev/null +++ b/sphinx/source/index.rst @@ -0,0 +1,38 @@ +NIFTY -- Numerical Information Field Theory +=========================================== + +**NIFTY** [1]_, "\ **N**\umerical **I**\nformation **F**\ield **T**\heor\ **y**\ ", is a versatile library designed to enable the development of signal inference algorithms that operate regardless of the underlying spatial grid and its resolution. Its object-oriented framework is written in Python, although it accesses libraries written in Cython, C++, and C for efficiency. + +NIFTY offers a toolkit that abstracts discretized representations of continuous spaces, fields in these spaces, and operators acting on fields into classes. Thereby, the correct normalization of operations on fields is taken care of automatically without concerning the user. This allows for an abstract formulation and programming of inference algorithms, including those derived within information field theory. Thus, NIFTY permits its user to rapidly prototype algorithms in 1D and then apply the developed code in higher-dimensional settings of real world problems. The set of spaces on which NIFTY operates comprises point sets, *n*-dimensional regular grids, spherical spaces, their harmonic counterparts, and product spaces constructed as combinations of those. + +References +---------- + +.. [1] Selig et al., "NIFTY -- Numerical Information Field Theory -- a versatile Python library for signal inference", `A&A, vol. 554, id. A26 <http://dx.doi.org/10.1051/0004-6361/201321236>`_, 2013; `arXiv:1301.4499 <http://www.arxiv.org/abs/1301.4499>`_ + +.. note:: Parts of this publication can with or without modification be found within the source code and this online documentation for obvious reasons, and they are not explicitly marked as quotations. + +Documentation +------------- + +Welcome to NIFTY's documentation! + +Contents +........ + +.. toctree:: + :maxdepth: 1 + + spaces + operator + minimization + field + + +Indices and tables +.................. + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/sphinx/source/invertible_operator_mixin.rst b/sphinx/source/invertible_operator_mixin.rst new file mode 100644 index 0000000000000000000000000000000000000000..40d7392bd30f5d395a323d1bb8a131af384dcc73 --- /dev/null +++ b/sphinx/source/invertible_operator_mixin.rst @@ -0,0 +1,8 @@ +.. currentmodule:: nifty + +The ``InvertibleOperatorMixin`` class -- ... +............................................ + +.. autoclass:: InvertibleOperatorMixin + :show-inheritance: + :members: diff --git a/sphinx/source/lm_space.rst b/sphinx/source/lm_space.rst new file mode 100644 index 0000000000000000000000000000000000000000..1a695e55b618fb6aad72bc80b073b6959184067d --- /dev/null +++ b/sphinx/source/lm_space.rst @@ -0,0 +1,8 @@ +.. currentmodule:: nifty + +The ``LMSpace`` class -- Spherical Harmonics components +....................................................... + +.. autoclass:: LMSpace + :show-inheritance: + :members: diff --git a/sphinx/source/lmgl_transformation.rst b/sphinx/source/lmgl_transformation.rst new file mode 100644 index 0000000000000000000000000000000000000000..e87361210ef1726cc91868e24cee633f9d68a117 --- /dev/null +++ b/sphinx/source/lmgl_transformation.rst @@ -0,0 +1,9 @@ +.. currentmodule:: nifty + +The ``LMGLTransformation`` class -- ... +....................................... + + +.. autoclass:: LMGLTransformation + :show-inheritance: + :members: diff --git a/sphinx/source/lmhp_transformation.rst b/sphinx/source/lmhp_transformation.rst new file mode 100644 index 0000000000000000000000000000000000000000..46d3820e8ef975a8257d998b58b1a42eb9db6a6c --- /dev/null +++ b/sphinx/source/lmhp_transformation.rst @@ -0,0 +1,8 @@ +.. currentmodule:: nifty + +The ``LMHPTransformation`` class -- ... +....................................... + +.. autoclass:: LMHPTransformation + :show-inheritance: + :members: diff --git a/sphinx/source/minimization.rst b/sphinx/source/minimization.rst new file mode 100644 index 0000000000000000000000000000000000000000..e296fb8a30613e8339f3e8815ea49b2415df7f77 --- /dev/null +++ b/sphinx/source/minimization.rst @@ -0,0 +1,10 @@ +Minimization +------------ +NIFTY provides minimizer + +.. toctree:: + :maxdepth: 1 + + conjugate_gradient + descent_minimizer + diff --git a/sphinx/source/nifty.Field.rst b/sphinx/source/nifty.Field.rst new file mode 100644 index 0000000000000000000000000000000000000000..0e7899ef74dfc3fc511ed97f7dc46baed753b783 --- /dev/null +++ b/sphinx/source/nifty.Field.rst @@ -0,0 +1,16 @@ +nifty\.Field +============ + +.. currentmodule:: nifty + +.. autoclass:: Field + + + .. automethod:: __init__ + + + + + + + \ No newline at end of file diff --git a/sphinx/source/operator.rst b/sphinx/source/operator.rst new file mode 100644 index 0000000000000000000000000000000000000000..211eb4f2d7be7661c6f56ad0d5c0afb5ed407b10 --- /dev/null +++ b/sphinx/source/operator.rst @@ -0,0 +1,45 @@ +Operators +========= +Operators perform some operation on a given field. In practice an operator can +take the form of an explicit matrix (e.g. stored in a Numpy array) or it may be +implicitly defined as a function (e.g. an FFT operation would not be encoded in +a matrix, but performed using an FFT routine). NIFTY includes a framework for +handling arbitrary operators, and basic methods for manipulating these +operators. Common functions like taking traces and extracting diagonals are +provided. + +In order to have a blueprint for operators capable of handling fields, any +application of operators is split into a general and a concrete part. The +general part comprises the correct involvement of normalizations and +transformations, necessary for any operator type, while the concrete part is +unique for each operator subclass. In analogy to the field class, any operator +instance has a set of properties that specify its domain and target as well as +some additional flags. + +Operator classes +---------------- +NIFTY provides a base class for defining operators, as well as several pre-implemented operator types that are very often needed for signal inference +algorithms. + +.. toctree:: + :maxdepth: 1 + + diagonal_operator + fft_operator + composed_operator + response_operator + smoothing_operator + projection_operator + propagator_operator + endomorphic_operator + invertible_operator_mixin + transformations + +.. currentmodule:: nifty + +The ``LinearOperator`` class -- The base Operator Object +-------------------------------------------------------- + +.. autoclass:: LinearOperator + :show-inheritance: + :members: diff --git a/sphinx/source/power_indices.rst b/sphinx/source/power_indices.rst new file mode 100644 index 0000000000000000000000000000000000000000..12ee81e03d41514641ac832c38bd46805f5e53be --- /dev/null +++ b/sphinx/source/power_indices.rst @@ -0,0 +1,8 @@ +.. currentmodule:: nifty + +The ``PowerIndices`` class -- TODO: Title For PowerIndices +........................................................... + +.. autoclass:: PowerIndices + :show-inheritance: + :members: diff --git a/sphinx/source/power_space.rst b/sphinx/source/power_space.rst new file mode 100644 index 0000000000000000000000000000000000000000..536725519a58da442233b6ba3a6d0f57e978c326 --- /dev/null +++ b/sphinx/source/power_space.rst @@ -0,0 +1,8 @@ +.. currentmodule:: nifty + +The ``PowerSpace`` class -- TODO: Title For PowerSpace +....................................................... + +.. autoclass:: PowerSpace + :show-inheritance: + :members: diff --git a/sphinx/source/projection_operator.rst b/sphinx/source/projection_operator.rst new file mode 100644 index 0000000000000000000000000000000000000000..761f4373e601bb6f8b1982bba86aeb7a95c3d332 --- /dev/null +++ b/sphinx/source/projection_operator.rst @@ -0,0 +1,8 @@ +.. currentmodule:: nifty + +The ``ProjectionOperator`` class -- ... +....................................... + +.. autoclass:: ProjectionOperator + :show-inheritance: + :members: diff --git a/sphinx/source/propagator_operator.rst b/sphinx/source/propagator_operator.rst new file mode 100644 index 0000000000000000000000000000000000000000..28fcbcf9a20cfcb933ea366a2dbd5e3125e1fd18 --- /dev/null +++ b/sphinx/source/propagator_operator.rst @@ -0,0 +1,8 @@ +.. currentmodule:: nifty + +The ``PropagatorOperator`` class -- ... +....................................... + +.. autoclass:: PropagatorOperator + :show-inheritance: + :members: diff --git a/sphinx/source/response_operator.rst b/sphinx/source/response_operator.rst new file mode 100644 index 0000000000000000000000000000000000000000..5d26936e88ff1954d8fb84dc21dabb35dce72cd9 --- /dev/null +++ b/sphinx/source/response_operator.rst @@ -0,0 +1,8 @@ +.. currentmodule:: nifty + +The ``ResponseOperator`` class -- ... +..................................... + +.. autoclass:: ResponseOperator + :show-inheritance: + :members: diff --git a/sphinx/source/rg_space.rst b/sphinx/source/rg_space.rst new file mode 100644 index 0000000000000000000000000000000000000000..4f4b1390202299dfbeaad39bdefb763c879101aa --- /dev/null +++ b/sphinx/source/rg_space.rst @@ -0,0 +1,8 @@ +.. currentmodule:: nifty + +The ``RGSpace`` class -- Regular Cartesian grids +................................................ + +.. autoclass:: RGSpace + :show-inheritance: + :members: diff --git a/sphinx/source/rg_transforms.rst b/sphinx/source/rg_transforms.rst new file mode 100644 index 0000000000000000000000000000000000000000..ab6b16686f29e2e56895bc6fb49b8b2e711b34b5 --- /dev/null +++ b/sphinx/source/rg_transforms.rst @@ -0,0 +1,9 @@ +.. currentmodule:: nifty + +The ``Transform`` class -- ... +.............................. + + +.. autoclass:: Transform + :show-inheritance: + :members: diff --git a/sphinx/source/rgrg_transformation.rst b/sphinx/source/rgrg_transformation.rst new file mode 100644 index 0000000000000000000000000000000000000000..319195aac1561d67500871fb7ccaaec6ef30ea0a --- /dev/null +++ b/sphinx/source/rgrg_transformation.rst @@ -0,0 +1,9 @@ +.. currentmodule:: nifty + +The ``RGRGTransformation`` class -- ... +....................................... + + +.. autoclass:: RGRGTransformation + :show-inheritance: + :members: diff --git a/sphinx/source/smoothing_operator.rst b/sphinx/source/smoothing_operator.rst new file mode 100644 index 0000000000000000000000000000000000000000..645e511e7c3315e4f3b36ca0e2c0b1955d2947b9 --- /dev/null +++ b/sphinx/source/smoothing_operator.rst @@ -0,0 +1,8 @@ +.. currentmodule:: nifty + +The ``SmoothingOperator`` class -- ... +...................................... + +.. autoclass:: SmoothingOperator + :show-inheritance: + :members: diff --git a/sphinx/source/spaces.rst b/sphinx/source/spaces.rst new file mode 100644 index 0000000000000000000000000000000000000000..6fedbe23059d84f4267f17502ecbb7bce1f12d59 --- /dev/null +++ b/sphinx/source/spaces.rst @@ -0,0 +1,31 @@ +Spaces +====== +The :py:class:`Space` classes of NIFTY represent geometrical spaces approximated by grids in the computer environment. Each subclass of the base class corresponds to a specific grid type and replaces some of the inherited methods with its own methods that are unique to the respective grid. This framework ensures an abstract handling of spaces independent of the underlying geometrical grid and the grid's resolution. + +Each instance of a :py:class:`Space` needs to capture all structural and dimensional specifics of the grid and all computationally relevant quantities such as the data type of associated field values. These parameters are stored as properties of an instance of the class at its initialization, and they do not need to be accessed explicitly by the user thereafter. This prevents the writing of grid or resolution dependent code. + +Spatial symmetries of a system can be exploited by corresponding coordinate transformations. Often, transformations from one basis to its harmonic counterpart can greatly reduce the computational complexity of algorithms. The harmonic basis is defined by the eigenbasis of the Laplace operator; e.g., for a flat position space it is the Fourier basis. This conjugation of bases is implemented in NIFTY by distinguishing conjugate space classes, which can be obtained by the instance method *get_codomain* (and checked for by *check_codomain*). Moreover, transformations between conjugate spaces are performed automatically if required. + + +Space classes +------------- +Next to the generic :py:class:`Space` class, NIFTY has implementations of five subclasses, representing specific geometrical spaces and their discretizations. + +.. toctree:: + :maxdepth: 1 + + rg_space + hp_space + gl_space + lm_space + power_space + power_indices + +.. currentmodule:: nifty + +The ``Space`` class -- The base Space object +-------------------------------------------- + +.. autoclass:: Space + :show-inheritance: + :members: diff --git a/sphinx/source/transformations.rst b/sphinx/source/transformations.rst new file mode 100644 index 0000000000000000000000000000000000000000..153a7689d448fd061d8a4b20e7ea4c465007fd5a --- /dev/null +++ b/sphinx/source/transformations.rst @@ -0,0 +1,14 @@ +Transformations +--------------- +NIFTY provides transformations + +.. toctree:: + :maxdepth: 1 + + rg_transforms + rgrg_transformation + gllm_transformation + hplm_transformation + lmgl_transformation + lmhp_transformation +