From 246cd365b344fa6484d79c8fb78e765b9bd44dbc Mon Sep 17 00:00:00 2001 From: Christoph Sommer Date: Mon, 30 Oct 2023 13:59:36 +0100 Subject: [PATCH] added sphinx files --- docs/Makefile | 20 ++ docs/requirements.txt | 377 +++++++++++++++++++++++++++++++++++ docs/source/api.rst | 5 + docs/source/conf.py | 69 +++++++ docs/source/how_to.rst | 2 + docs/source/index.rst | 39 ++++ docs/source/install.rst | 14 ++ docs/source/introduction.rst | 10 + 8 files changed, 536 insertions(+) create mode 100644 docs/Makefile create mode 100644 docs/requirements.txt create mode 100644 docs/source/api.rst create mode 100644 docs/source/conf.py create mode 100644 docs/source/how_to.rst create mode 100644 docs/source/index.rst create mode 100644 docs/source/install.rst create mode 100644 docs/source/introduction.rst diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..d0c3cbf --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..455d8d6 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,377 @@ +# +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: +# +# pip-compile --output-file=docs/requirements.txt pyproject.toml +# +alabaster==0.7.13 + # via sphinx +app-model==0.2.2 + # via napari +appdirs==1.4.4 + # via + # napari + # npe2 +asttokens==2.4.1 + # via stack-data +attrs==23.1.0 + # via + # jsonschema + # referencing +babel==2.13.1 + # via sphinx +backcall==0.2.0 + # via ipython +build==1.0.3 + # via npe2 +cachey==0.2.1 + # via napari +certifi==2023.7.22 + # via + # napari + # requests +charset-normalizer==3.3.1 + # via requests +click==8.1.7 + # via + # dask + # typer +cloudpickle==3.0.0 + # via dask +colorama==0.4.6 + # via + # build + # click + # ipython + # sphinx + # tqdm +comm==0.1.4 + # via ipykernel +dask[array]==2023.10.0 + # via + # napari + # napari-correct-drift (pyproject.toml) +debugpy==1.8.0 + # via ipykernel +decorator==5.1.1 + # via ipython +docstring-parser==0.15 + # via magicgui +docutils==0.17.1 + # via sphinx +exceptiongroup==1.1.3 + # via ipython +executing==2.0.0 + # via stack-data +freetype-py==2.4.0 + # via vispy +fsspec==2023.10.0 + # via dask +heapdict==1.0.1 + # via cachey +hsluv==5.0.4 + # via vispy +idna==3.4 + # via requests +imageio==2.31.6 + # via + # napari + # napari-svg + # scikit-image +imagesize==1.4.1 + # via sphinx +importlib-metadata==6.8.0 + # via + # build + # dask + # jupyter-client + # sphinx +in-n-out==0.1.9 + # via app-model +ipykernel==6.26.0 + # via + # napari-console + # qtconsole +ipython==8.16.1 + # via + # ipykernel + # napari-console +ipython-genutils==0.2.0 + # via qtconsole +jedi==0.19.1 + # via ipython +jinja2==3.1.2 + # via + # numpydoc + # sphinx +jsonschema==4.19.1 + # via napari +jsonschema-specifications==2023.7.1 + # via jsonschema +jupyter-client==8.5.0 + # via + # ipykernel + # qtconsole +jupyter-core==5.4.0 + # via + # ipykernel + # jupyter-client + # qtconsole +kiwisolver==1.4.5 + # via vispy +lazy-loader==0.3 + # via + # napari + # scikit-image +locket==1.0.0 + # via partd +magicgui==0.8.0 + # via napari +markdown-it-py==3.0.0 + # via rich +markupsafe==2.1.3 + # via jinja2 +matplotlib-inline==0.1.6 + # via + # ipykernel + # ipython +mdurl==0.1.2 + # via markdown-it-py +mypy-extensions==1.0.0 + # via psygnal +napari==0.4.18 + # via napari-correct-drift (pyproject.toml) +napari-console==0.0.9 + # via napari +napari-plugin-engine==0.2.0 + # via + # napari + # napari-svg +napari-svg==0.1.10 + # via napari +nest-asyncio==1.5.8 + # via ipykernel +networkx==3.2 + # via scikit-image +npe2==0.7.3 + # via napari +numpy==1.26.1 + # via + # dask + # imageio + # napari + # napari-correct-drift (pyproject.toml) + # napari-svg + # pandas + # scikit-image + # scipy + # tifffile + # vispy +numpydoc==1.5.0 + # via napari +packaging==23.2 + # via + # build + # dask + # ipykernel + # pooch + # qtconsole + # qtpy + # scikit-image + # sphinx + # superqt + # vispy +pandas==2.1.2 + # via + # napari + # napari-correct-drift (pyproject.toml) +parso==0.8.3 + # via jedi +partd==1.4.1 + # via dask +pickleshare==0.7.5 + # via ipython +pillow==10.0.1 + # via + # imageio + # napari + # scikit-image +pint==0.22 + # via napari +platformdirs==3.11.0 + # via + # jupyter-core + # pooch +pooch==1.8.0 + # via scikit-image +prompt-toolkit==3.0.39 + # via ipython +psutil==5.9.6 + # via + # ipykernel + # napari +psygnal==0.9.4 + # via + # app-model + # magicgui + # napari + # npe2 +pure-eval==0.2.2 + # via stack-data +pyconify==0.1.6 + # via superqt +pydantic==1.10.13 + # via + # app-model + # napari + # npe2 +pygments==2.16.1 + # via + # ipython + # napari + # qtconsole + # rich + # sphinx + # superqt +pyopengl==3.1.7 + # via napari +pyproject-hooks==1.0.0 + # via build +python-dateutil==2.8.2 + # via + # jupyter-client + # pandas +pytz==2023.3.post1 + # via pandas +pywin32==306 + # via jupyter-core +pyyaml==6.0.1 + # via + # dask + # napari + # npe2 +pyzmq==25.1.1 + # via + # ipykernel + # jupyter-client + # qtconsole +qtconsole==5.4.4 + # via napari-console +qtpy==2.4.1 + # via + # magicgui + # napari + # napari-console + # napari-correct-drift (pyproject.toml) + # qtconsole + # superqt +referencing==0.30.2 + # via + # jsonschema + # jsonschema-specifications +requests==2.31.0 + # via + # pooch + # pyconify + # sphinx +rich==13.6.0 + # via npe2 +rpds-py==0.10.6 + # via + # jsonschema + # referencing +scikit-image[data]==0.22.0 + # via + # napari + # napari-correct-drift (pyproject.toml) +scipy==1.11.3 + # via + # napari + # napari-correct-drift (pyproject.toml) + # scikit-image +six==1.16.0 + # via + # asttokens + # python-dateutil +snowballstemmer==2.2.0 + # via sphinx +sphinx==4.5.0 + # via + # napari + # numpydoc +sphinxcontrib-applehelp==1.0.4 + # via sphinx +sphinxcontrib-devhelp==1.0.2 + # via sphinx +sphinxcontrib-htmlhelp==2.0.1 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==1.0.3 + # via sphinx +sphinxcontrib-serializinghtml==1.1.5 + # via sphinx +stack-data==0.6.3 + # via ipython +superqt[iconify]==0.6.1 + # via + # magicgui + # napari +tifffile==2023.9.26 + # via + # napari + # scikit-image +tomli==2.0.1 + # via + # build + # npe2 + # pyproject-hooks +tomli-w==1.0.0 + # via npe2 +toolz==0.12.0 + # via + # dask + # napari + # partd +tornado==6.3.3 + # via + # ipykernel + # jupyter-client +tqdm==4.66.1 + # via napari +traitlets==5.12.0 + # via + # comm + # ipykernel + # ipython + # jupyter-client + # jupyter-core + # matplotlib-inline + # qtconsole +typer==0.9.0 + # via npe2 +typing-extensions==4.8.0 + # via + # app-model + # ipython + # magicgui + # napari + # pint + # psygnal + # pydantic + # superqt + # typer +tzdata==2023.3 + # via pandas +urllib3==2.0.7 + # via requests +vispy==0.12.2 + # via + # napari + # napari-svg +wcwidth==0.2.8 + # via prompt-toolkit +wrapt==1.15.0 + # via napari +zipp==3.17.0 + # via importlib-metadata diff --git a/docs/source/api.rst b/docs/source/api.rst new file mode 100644 index 0000000..5c58d68 --- /dev/null +++ b/docs/source/api.rst @@ -0,0 +1,5 @@ +API reference +============= + +.. automodule:: napari_correct_drift._core + :members: diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 0000000..2f5bba1 --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,69 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# 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. +# +import os +import sys + +sys.path.insert(0, os.path.abspath("../../src")) + + +# -- Project information ----------------------------------------------------- + +project = "Napari-Correct-Drift" +copyright = "2023, Christoph Sommer" +author = "Christoph Sommer" + +# The full version, including alpha/beta/rc tags +release = "0.3.0" + + +# -- General configuration --------------------------------------------------- + +# 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.duration", +# "sphinx.ext.doctest", +# "sphinx.ext.autodoc", +# "sphinx.ext.autosummary", +# "sphinx.ext.napoleon", +# ] + +extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.coverage", + "sphinx.ext.napoleon", +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ["_templates"] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = [] + + +# -- 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 = "pydata_sphinx_theme" +html_theme = "sphinx_rtd_theme" + +# 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"] diff --git a/docs/source/how_to.rst b/docs/source/how_to.rst new file mode 100644 index 0000000..09e2fa9 --- /dev/null +++ b/docs/source/how_to.rst @@ -0,0 +1,2 @@ +How-to's +======== diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 0000000..6301ea1 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,39 @@ +Napari-Correct-Drift's doc +========================== + +Fiji’s Correct-3D-drift macro for Napari +---------------------------------------- +In time-lapse imaging, a motorized microscope repeatedly captures images at specified positions for long periods. However, microscope stages exhibit *drift*, causing the sample to move, or to appear moving. + +The reasons are complex and manifold, but it typically results from error propagation in odometry, thermal expansion, and mechanical movement. Drift poses problems for subsequent image analysis and needs to be corrected. + +With Napari-correct-drift provides an extensible solution with similar functionality as Fiji’s Correct-3D-drift macro. It offers efficient cross-correlation using Fourier phase correlation, improved key frame selection, and outlier handling. Users are enabled to select ROIs to effectively stabilize given regions-of-interest in up-to 3D-multi-channel images. + +When to use this plugin +----------------------- + +#. Your time-series images or volumes exhibit *translational* drift, i. e. rigid movement, without rotation. +#. Reference channel with fixed object (e. g. beads) visualizing the drift +#. Stabilizing objects of interest by using a ROIs + +Issues and contributing +----------------------- + +If you have any problems or question running the plugin, please open an `issue `_ + + +.. toctree:: + :maxdepth: 1 + :caption: Contents: + + install + introduction + how_to + api + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/source/install.rst b/docs/source/install.rst new file mode 100644 index 0000000..e8e6f00 --- /dev/null +++ b/docs/source/install.rst @@ -0,0 +1,14 @@ +Installation +============ + +You can install `napari-correct-drift` via [pip]: + +.. code-block:: console + + $ pip install napari_correct_drift + +To install latest development version : + +.. code-block:: console + + $ pip install git+https://github.com/sommerc/napari-correct-drift.git diff --git a/docs/source/introduction.rst b/docs/source/introduction.rst new file mode 100644 index 0000000..a29229b --- /dev/null +++ b/docs/source/introduction.rst @@ -0,0 +1,10 @@ +Introduction +============ + + +Example +------- + +.. .. raw:: html + +..