diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 35f6f00bc9..cf395ad959 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -1,6 +1,6 @@ # GitHub Actions -There is a single github action file with multiple jobs, which builds both the conda package and documentation, and optionally publishes the documentation: [build](https://github.com/TomographicImaging/CIL/blob/master/.github/workflows/build.yml) +There is a single github action file with multiple jobs, which builds both the conda package and documentation, and optionally publishes the documentation: [build](./build.yml) The jobs are: @@ -29,7 +29,7 @@ When opening or modifying a pull request to `master`, a single variant is built > The action does not publish to conda, instead this is done by jenkins. We will eventually move from jenkins to conda-forge instead. > When pushing to `master` or creating an [annotated tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging), *all* variants are built and tested. -It looks for conda-build dependencies in the channels listed [here](https://github.com/TomographicImaging/CIL/blob/master/.github/workflows/build.yml#L118). If you add any new dependencies, the appropriate channels need to be added to this line. +It looks for conda-build dependencies in the channels listed [here](./build.yml#L118). If you add any new dependencies, the appropriate channels need to be added to this line. > [!TIP] > The `conda` job builds the `*.tar.bz2` package and uploads it as an artifact called `cil-package`. @@ -38,18 +38,29 @@ It looks for conda-build dependencies in the channels listed [here](https://gith ## docs -This github action builds and optionally publishes the documentation located in [docs/source](https://github.com/TomographicImaging/CIL/tree/master/docs/source). To do this it uses a forked version of the [build-sphinx-action](https://github.com/lauramurgatroyd/build-sphinx-action). +This github action builds and optionally publishes the documentation located in [docs/source](../../docs/source). -The [docs](https://github.com/TomographicImaging/CIL/blob/master/.github/workflows/build.yml#L124) job: +The [docs](./build.yml#L124) job: -- creates a `miniconda` environment from [requirements-test.yml](https://github.com/TomographicImaging/CIL/blob/master/scripts/requirements-test.yml) and [docs_environment.yml](https://github.com/TomographicImaging/CIL/blob/master/docs/docs_environment.yml) +- creates a `miniconda` environment from [requirements-test.yml](../../scripts/requirements-test.yml) and [docs_environment.yml](../../docs/docs_environment.yml) - `cmake` builds & installs CIL into the `miniconda` environment -- builds the HTML documentation with `sphinx` + + builds the HTML documentation with `sphinx` +- installs ruby dependencies from [`Gemfile`](../../docs/Gemfile) + + builds the HTML landing page with `jekyll` - uploads a `DocumentationHTML` artifact (which can be downloaded to view locally for debugging) -- pushes the HTML documentation to the `gh-pages` branch - + only if pushing to `master` or tagging (skipped if pushing to a branch or a PR) + + pushes the HTML documentation to the `gh-pages` branch + * only if pushing to `master` or tagging (skipped if pushing to a branch or a PR) > [!TIP] > The `docs` job builds the documentation and uploads it as an artifact called `DocumentationHTML`. > It can be found by going to the "Actions" tab, and selecting the appropriate run of `.github/workflows/build.yml`, or by clicking on the tick on the action in the "All checks have passed/failed" section of a PR. When viewing the "Summary" for the run of the action, there is an "Artifact" section at the bottom of the page. -> Clicking on `DocumentationHTML` allows you to download a zip folder containing the built HTML files. This allows you to preview the documentation site before it is published. +> Click on `DocumentationHTML` to download a zip archive of the built HTML files. +> It must be extracted into a `CIL` subfolder to properly render locally: +> +> ```sh +> mkdir CIL +> unzip -d CIL DocumentationHTML.zip +> python -m http.server +> ``` +> +> Then open a browser and navigate to to view the documentation. diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 776f6dcc43..0fbceadd9e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -129,7 +129,7 @@ jobs: name: cil-package path: recipe/linux-64/cil* docs: - defaults: {run: {shell: 'bash -el {0}'}} + defaults: {run: {shell: 'bash -el {0}', working-directory: docs}} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -139,14 +139,19 @@ jobs: ref: ${{ github.event.pull_request.head.sha || github.ref }} # fix SHA - uses: conda-incubator/setup-miniconda@v3 with: {python-version: 3.11} + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.2' + bundler-cache: true + cache-version: 0 - name: install dependencies run: | - cd docs conda install -c conda-forge -yq conda-merge conda-merge ../scripts/requirements-test.yml docs_environment.yml > environment.yml conda env update -n test conda list - name: build cil + working-directory: . run: | cmake -S . -B ./build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCONDA_BUILD=ON -DCMAKE_INSTALL_PREFIX="$CONDA_PREFIX" cmake --build ./build --target install @@ -155,17 +160,17 @@ jobs: with: path: docs/build ref: gh-pages - - name: update docs + - id: pages + uses: actions/configure-pages@v5 + - name: update web pages (jekyll) + run: make JEKYLLOPTS="--baseurl ${{ steps.pages.outputs.base_path }}" web-deps web + env: {JEKYLL_ENV: production} + - name: update docs pages (sphinx) run: | - cd docs docs_dir="${{ github.ref_name }}" docs_dir="${docs_dir//\//_}" if test "$docs_dir" = master; then docs_dir=nightly; fi - rm -rf "build/$docs_dir" - ./mkdemos.py - sphinx-build -b dirhtml source "build/$docs_dir" - sed 's#DESTINATION#nightly#g' .redirect-template.html > build/index.html - ./mkversions.py + make BUILDSUBDIR="$docs_dir" dirhtml - uses: actions/upload-artifact@v4 with: name: DocumentationHTML diff --git a/.gitignore b/.gitignore index 4a11c2ae07..982d81a0f3 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,3 @@ /Wrappers/Python/cil/version.py /Wrappers/Python/setup.py __pycache__/ -/docs/build/ diff --git a/CITATION.cff b/CITATION.cff index dc687e0294..b90d2536fe 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -1,46 +1,46 @@ cff-version: 1.2.0 message: "If you use this software, please cite the software itself via zenodo as below, plus a CIL article, please see the CIL README for more details: https://github.com/TomographicImaging/CIL" -abstract: "The Core Imaging Library (CIL) is an open-source Python framework for tomographic imaging - with particular emphasis on reconstruction of challenging datasets. Conventional filtered - backprojection reconstruction tends to be insufficient for highly noisy, incomplete, non-standard - or multichannel data arising for example in dynamic, spectral and in situ tomography. CIL - provides an extensive modular optimisation framework for prototyping reconstruction methods - including sparsity and total variation regularisation, as well as tools for loading, preprocessing - and visualising tomographic data." +abstract: > + The Core Imaging Library (CIL) is an open-source Python framework for tomographic imaging + with particular emphasis on reconstruction of challenging datasets. Conventional filtered + backprojection reconstruction tends to be insufficient for highly noisy, incomplete, non-standard + or multichannel data arising for example in dynamic, spectral and in situ tomography. CIL + provides an extensive modular optimisation framework for prototyping reconstruction methods + including sparsity and total variation regularisation, as well as tools for loading, preprocessing + and visualising tomographic data. authors: - - family-names: Pasca - given-names: Edoardo - - family-names: Jørgensen - given-names: Jakob Sauer - - family-names: Papoutsellis - given-names: Evangelos - - family-names: Ametova - given-names: Evelina - - family-names: Fardell - given-names: Gemma - - family-names: Thielemans - given-names: Kris - - family-names: Murgatroyd - given-names: Laura - - family-names: Duff - given-names: Margaret - - family-names: da Costa-Luis - given-names: Casper - - family-names: Robarts - given-names: Hannah -title: "Core Imaging Library (CIL)" -doi: 10.5281/zenodo.4746198 -date-released: "08-01-18" +- family-names: Pasca + given-names: Edoardo +- family-names: Jørgensen + given-names: Jakob Sauer +- family-names: Papoutsellis + given-names: Evangelos +- family-names: Ametova + given-names: Evelina +- family-names: Fardell + given-names: Gemma +- family-names: Thielemans + given-names: Kris +- family-names: Murgatroyd + given-names: Laura +- family-names: Duff + given-names: Margaret +- family-names: da Costa-Luis + given-names: Casper +- family-names: Robarts + given-names: Hannah +title: Core Imaging Library (CIL) +date-released: '2018-01-08' identifiers: - - description: "This is the collection of archived snapshots of all versions of the Core Imaging Library" - type: doi - value: 10.5281/zenodo.4746198 +- description: This is the collection of archived snapshots of all versions of the Core Imaging Library + type: doi + value: 10.5281/zenodo.4746198 keywords: - - "tomographic imaging" - - research - - tomography - - reconstruction - - imaging - - hyperspectral - - optimisation +- tomographic imaging +- research +- tomography +- reconstruction +- imaging +- hyperspectral +- optimisation license: Apache-2.0 diff --git a/README.md b/README.md index 5d2eef04f3..f371adf843 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ Jupyter Notebooks usage examples without any local installation are provided in In case of development it is useful to be able to build the software directly. You should clone this repository as ```sh -git clone --recurse-submodule git@github.com:TomographicImaging/CIL.git +git clone --recurse-submodule git@github.com:TomographicImaging/CIL ``` The use of `--recurse-submodule` is necessary if the user wants the examples data to be fetched (they are needed by the unit tests). We have moved such data, previously hosted in this repo at `Wrappers/Python/data` to the [CIL-data](https://github.com/TomographicImaging/CIL-Data) repository and linked it to this one as submodule. If the data is not available it can be fetched in an already cloned repository as diff --git a/Wrappers/Python/CMake/setup.py.in b/Wrappers/Python/CMake/setup.py.in index 96d7ae0687..d883baf615 100644 --- a/Wrappers/Python/CMake/setup.py.in +++ b/Wrappers/Python/CMake/setup.py.in @@ -50,10 +50,9 @@ setup( # metadata for upload to PyPI - author="CCPi developers", - maintainer="Edoardo Pasca", + maintainer="CIL developers", maintainer_email="edoardo.pasca@stfc.ac.uk", - description='CCPi Core Imaging Library', + description='Core Imaging Library', license="Apache v2.0", keywords="Python Framework", url="http://www.ccpi.ac.uk/cil", diff --git a/docs/.gitignore b/docs/.gitignore index 40cfac2a20..6b8314eacb 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,2 +1,9 @@ /source/demos/ /source/demos.rst +/build/ +/_site/ +.sass-cache/ +.jekyll-cache/ +.jekyll-metadata/ +/.bundle/ +/vendor/ diff --git a/docs/Gemfile b/docs/Gemfile new file mode 100644 index 0000000000..43d977b07b --- /dev/null +++ b/docs/Gemfile @@ -0,0 +1,6 @@ +source "https://rubygems.org" + +gem "jekyll" +group :jekyll_plugins do + gem 'jekyll-remote-theme' +end diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock new file mode 100644 index 0000000000..58b06d6248 --- /dev/null +++ b/docs/Gemfile.lock @@ -0,0 +1,130 @@ +GEM + remote: https://rubygems.org/ + specs: + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) + colorator (1.1.0) + concurrent-ruby (1.2.3) + em-websocket (0.5.3) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0) + eventmachine (1.2.7) + ffi (1.16.3) + forwardable-extended (2.6.0) + google-protobuf (4.26.1) + rake (>= 13) + google-protobuf (4.26.1-aarch64-linux) + rake (>= 13) + google-protobuf (4.26.1-arm64-darwin) + rake (>= 13) + google-protobuf (4.26.1-x86-linux) + rake (>= 13) + google-protobuf (4.26.1-x86_64-darwin) + rake (>= 13) + google-protobuf (4.26.1-x86_64-linux) + rake (>= 13) + http_parser.rb (0.8.0) + i18n (1.14.4) + concurrent-ruby (~> 1.0) + jekyll (4.3.3) + addressable (~> 2.4) + colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 1.0) + jekyll-sass-converter (>= 2.0, < 4.0) + jekyll-watch (~> 2.0) + kramdown (~> 2.3, >= 2.3.1) + kramdown-parser-gfm (~> 1.0) + liquid (~> 4.0) + mercenary (>= 0.3.6, < 0.5) + pathutil (~> 0.9) + rouge (>= 3.0, < 5.0) + safe_yaml (~> 1.0) + terminal-table (>= 1.8, < 4.0) + webrick (~> 1.7) + jekyll-remote-theme (0.4.3) + addressable (~> 2.0) + jekyll (>= 3.5, < 5.0) + jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) + rubyzip (>= 1.3.0, < 3.0) + jekyll-sass-converter (3.0.0) + sass-embedded (~> 1.54) + jekyll-watch (2.2.1) + listen (~> 3.0) + kramdown (2.4.0) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + liquid (4.0.4) + listen (3.9.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + mercenary (0.4.0) + pathutil (0.16.2) + forwardable-extended (~> 2.6) + public_suffix (5.0.5) + rake (13.2.1) + rb-fsevent (0.11.2) + rb-inotify (0.10.1) + ffi (~> 1.0) + rexml (3.2.6) + rouge (4.2.1) + rubyzip (2.3.2) + safe_yaml (1.0.5) + sass-embedded (1.75.0-aarch64-linux-android) + google-protobuf (>= 3.25, < 5.0) + sass-embedded (1.75.0-aarch64-linux-gnu) + google-protobuf (>= 3.25, < 5.0) + sass-embedded (1.75.0-aarch64-linux-musl) + google-protobuf (>= 3.25, < 5.0) + sass-embedded (1.75.0-arm-linux-androideabi) + google-protobuf (>= 3.25, < 5.0) + sass-embedded (1.75.0-arm-linux-gnueabihf) + google-protobuf (>= 3.25, < 5.0) + sass-embedded (1.75.0-arm-linux-musleabihf) + google-protobuf (>= 3.25, < 5.0) + sass-embedded (1.75.0-arm64-darwin) + google-protobuf (>= 3.25, < 5.0) + sass-embedded (1.75.0-x86-linux-android) + google-protobuf (>= 3.25, < 5.0) + sass-embedded (1.75.0-x86-linux-gnu) + google-protobuf (>= 3.25, < 5.0) + sass-embedded (1.75.0-x86-linux-musl) + google-protobuf (>= 3.25, < 5.0) + sass-embedded (1.75.0-x86_64-darwin) + google-protobuf (>= 3.25, < 5.0) + sass-embedded (1.75.0-x86_64-linux-android) + google-protobuf (>= 3.25, < 5.0) + sass-embedded (1.75.0-x86_64-linux-gnu) + google-protobuf (>= 3.25, < 5.0) + sass-embedded (1.75.0-x86_64-linux-musl) + google-protobuf (>= 3.25, < 5.0) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + unicode-display_width (2.5.0) + webrick (1.8.1) + +PLATFORMS + aarch64-linux + aarch64-linux-android + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-androideabi + arm-linux-gnueabihf + arm-linux-musleabihf + arm64-darwin + x86-linux + x86-linux-android + x86-linux-gnu + x86-linux-musl + x86_64-darwin + x86_64-linux-android + x86_64-linux-gnu + x86_64-linux-musl + +DEPENDENCIES + jekyll + jekyll-remote-theme + +BUNDLED WITH + 2.5.9 diff --git a/docs/Makefile b/docs/Makefile index dda3aaeb9a..b32307a2f0 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,37 +1,38 @@ -## Copyright 2019 United Kingdom Research and Innovation -## Copyright 2019 The University of Manchester -## -## Licensed under the Apache License, Version 2.0 (the "License"); -## you may not use this file except in compliance with the License. -## You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## -## Authors: -## CIL Developers, listed at: https://github.com/TomographicImaging/CIL/blob/master/NOTICE.txt - -# Minimal makefile for Sphinx documentation -# - # You can set these variables from the command line. +JEKYLLOPTS = +JEKYLLBUILD = bundle exec jekyll build +JEKYLLSRCDIR = pages SPHINXOPTS = SPHINXBUILD = sphinx-build SOURCEDIR = source BUILDDIR = build - -# Put it first so that "make" without argument is like "make help". +BUILDSUBDIR = $(shell git rev-parse --abbrev-ref HEAD) help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + @echo extra options + @echo ' web-deps to install website dependencies' + @echo ' web to build website' + @echo ' dirhtml to build docs' + @echo ' serve to serve website & docs' +.PHONY: help Makefile serve web-deps web dirhtml -.PHONY: help Makefile +serve: + @python -m http.server -d "$(BUILDDIR)" +web-deps: + @gem install bundler + @bundle install +web: + @$(JEKYLLBUILD) -s "$(JEKYLLSRCDIR)" $(JEKYLLOPTS) + @ls "$(JEKYLLSRCDIR)"/*.md | xargs -II basename I .md | xargs -II rm -rf "$(BUILDDIR)/I" + @rm -rf "$(BUILDDIR)/assets" + @mv _site/* "$(BUILDDIR)/" +dirhtml: + @rm -rf "$(BUILDDIR)/$(BUILDSUBDIR)" + @./mkdemos.py + @$(SPHINXBUILD) -b dirhtml $(SPHINXOPTS) "$(SOURCEDIR)" "$(BUILDDIR)/$(BUILDSUBDIR)" + @./mkversions.py # 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) \ No newline at end of file + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/mkversions.py b/docs/mkversions.py index be9d3ebb64..b83fe36e99 100755 --- a/docs/mkversions.py +++ b/docs/mkversions.py @@ -6,16 +6,18 @@ from packaging import version baseurl = f'/{getenv("GITHUB_REPOSITORY", "").split("/", 1)[-1]}/'.replace("//", "/") -build = Path(__file__).parent / "build" +docs = Path(__file__).parent +exclude_paths = ["assets"] + [i.stem for i in (docs / "pages").glob("*.md")] +build = docs / "build" versions = [{ - "name": str(i.name), + "name": i.name, "version": re.search( "VERSION: '(.*)'", (i / "_static" / "documentation_options.js").read_text(), flags=re.M).group(1), "url": f"{baseurl}{i.name}/" } -for i in build.glob("[a-zA-Z]*") if i.is_dir()] +for i in build.glob("[a-zA-Z0-9]*") if i.is_dir() if i.name not in exclude_paths] tags = [v for v in versions if v["name"] == "v" + v["version"]] try: diff --git a/docs/pages/_config.yml b/docs/pages/_config.yml new file mode 100644 index 0000000000..f8d0106311 --- /dev/null +++ b/docs/pages/_config.yml @@ -0,0 +1,97 @@ +# jekyll config +remote_theme: TomographicImaging/feeling-responsive # TODO: revert after https://github.com/Phlow/feeling-responsive/pull/276 +title: CIL +slogan: The Core Imaging Library +description: | + CIL is a versatile python framework for tomographic imaging. +
+ CCPi is funded by the EPSRC grant EP/T026677/1. +
+ CCPi acknowledges previous funding support by the EPSRC grants EP/J010456/1 + and EP/M022498/1. +
+ The CCPi Flagship "A Reconstruction Toolkit for Multichannel CT" was funded by the + EPSRC grant EP/P02226X/1. +
+author: ccpi-devs +url: '' # https://tomographicimaging.github.io +baseurl: '' # /CIL +improve_content: https://github.com/TomographicImaging/CIL/edit/master/docs +urlimg: '' +logo: "https://ccpi.ac.uk/wp-content/uploads/2022/11/CIL-logo-RGB.svg" # ideally 600x80 pixels +language: en-GB +plugins: +- jekyll-remote-theme + +# Theme works best with Kramdown (using the table of contents function) +#markdown: kramdown +permalink: pretty +highlight: rouge +excerpt_separator: "" +#include: ['.htaccess'] +exclude: +- .sass-cache +- Gemfile +- Gemfile.lock +- LICENSE +- README.md +- INSTALL.md +- vendor +# sphinx +- docs_environment.yml +- make.bat +- Makefile +- mkversions.py +- .redirect-template.html +- source + +# http://jch.penibelst.de +compress_html: + clippings: all + comments: [""] + endings: all + profile: false + ignore: + envs: [development] + +defaults: +- scope: + path: '' # all files + type: pages + values: + show_meta: false + # sidebar: # left, right (default undefined means none) + comments: false + author: CIL developers + +#google_site_verification: '' +#bing_webmastertools_id: '' +#yandex_site_verification: '' +#alexa_verify_id: '' + +# http://j.mp/fb_optimize +og_image: 'https://ccpi.ac.uk/wp-content/uploads/2022/11/CIL-logo-RGB.svg' +og_locale: en_EN +og_type: website +#disqus_shortname: + +# http://sass-lang.com/ +# http://jekyllrb.com/docs/assets/#sassscss +sass: + sass_dir: _sass + style: :compressed + +#google_analytics_tracking_id: + +# https://www.tawk.to/knowledgebase/ +#tawkto_embed_uri: + +# https://github.com/asciidoctor/jekyll-asciidoc +# https://github.com/asciidoctor +#asciidoctor-enabled: false +#asciidoctor: +# description: +# attributes: +# source-highlighter: coderay +# coderay-css: style +# icons: font diff --git a/docs/pages/_data/authors.yml b/docs/pages/_data/authors.yml new file mode 100644 index 0000000000..b1d5c7d6e7 --- /dev/null +++ b/docs/pages/_data/authors.yml @@ -0,0 +1,6 @@ +# https://github.com/Phlow/feeling-responsive/blob/gh-pages/_data/authors.yml +# http://blog.sorryapp.com/blogging-with-jekyll/2014/02/06/adding-authors-to-your-jekyll-site.html +ccpi-devs: + name: CIL developers + siterole: "webmaster, developer, copywriter, designer" + uri: https://github.com/TomographicImaging/CIL/graphs/contributors diff --git a/docs/pages/_data/navigation.yml b/docs/pages/_data/navigation.yml new file mode 100644 index 0000000000..9f38cc8dd8 --- /dev/null +++ b/docs/pages/_data/navigation.yml @@ -0,0 +1,42 @@ +# https://github.com/Phlow/feeling-responsive/blob/gh-pages/_data/navigation.yml +- title: Home + url: "/" + side: left +- title: About + url: "/about/" + side: left +- title: Documentation + url: "/nightly/" + side: left + dropdown: + - title: Documentation + url: "/nightly/" + - title: Changelog + url: "https://github.com/TomographicImaging/CIL/releases" + - title: Developer Guide + url: "/nightly/developer_guide/" +- title: Launch Demos + url: "https://mybinder.org/v2/gh/TomographicImaging/CIL-Demos/HEAD?urlpath=lab/tree/binder%2Findex.ipynb" + side: left +- title: GitHub + url: "https://github.com/TomographicImaging" + side: right + dropdown: + - title: CIL + url: "https://github.com/TomographicImaging/CIL" + - title: CIL-Demos + url: "https://github.com/TomographicImaging/CIL-Demos" +- title: Contact + url: "/nightly/#contacts" + side: right + dropdown: + - title: Discord + url: "https://discord.gg/9NTWu9MEGq" + - title: Member Mailing List + url: "https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=CCPI-MEMBERS" + - title: Developer Mailing List + url: "https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=CCPI-DEVEL" + - title: Zenodo Community + url: "https://zenodo.org/communities/ccpi/about" + - title: LinkedIn + url: "https://www.linkedin.com/groups/9090791/" diff --git a/docs/pages/_data/network.yml b/docs/pages/_data/network.yml new file mode 100644 index 0000000000..ef0c532dad --- /dev/null +++ b/docs/pages/_data/network.yml @@ -0,0 +1,25 @@ +# https://github.com/Phlow/feeling-responsive/blob/gh-pages/_data/network.yml +- menu_name: Thanks +- name: CoSeC + url: "https://www.scd.stfc.ac.uk/Pages/CoSeC.aspx" + title: "Computational Science Centre for Research Communities" + image: "https://ccpi.ac.uk/wp-content/uploads/2022/10/CoSec_Transparent-002.png" + image_width: 85 +- name: UKRI + url: "https://www.ukri.org" + title: "UK Research and Innovation" +- name: STFC + url: "https://stfc.ac.uk" + title: "Science and Technology Facilities Council" + image: "https://ccpi.ac.uk/wp-content/uploads/2022/10/STFC_White_Text-2.png" + image_width: 249 +- name: EPSRC + url: "https://epsrc.ac.uk" + title: "Engineering and Physical Sciences Research Council" + image: "https://ccpi.ac.uk/wp-content/uploads/2022/10/epsrc.png" + image_width: 256 +- name: Manchester + url: "https://www.manchester.ac.uk" + title: "University of Manchester" + image: "https://ccpi.ac.uk/wp-content/uploads/2022/10/TAB_col_background_manc-300x127.png" + image_width: 151 diff --git a/docs/pages/_data/services.yml b/docs/pages/_data/services.yml new file mode 100644 index 0000000000..16dc75496b --- /dev/null +++ b/docs/pages/_data/services.yml @@ -0,0 +1,16 @@ +# https://github.com/Phlow/feeling-responsive/blob/gh-pages/_data/services.yml +- menu_name: Contact +- name: Discord + url: "https://discord.gg/9NTWu9MEGq" +- name: Member List + title: Member Mailing List + url: "https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=CCPI-MEMBERS" +- name: Developer List + title: Developer Mailing List + url: "https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=CCPI-DEVEL" +- name: Zenodo + title: Zenodo Community + url: "https://zenodo.org/communities/ccpi/about" +- name: LinkedIn + title: LinkedIn Group + url: "https://www.linkedin.com/groups/9090791/" diff --git a/docs/pages/_data/socialmedia.yml b/docs/pages/_data/socialmedia.yml new file mode 100644 index 0000000000..0bc0d094cc --- /dev/null +++ b/docs/pages/_data/socialmedia.yml @@ -0,0 +1 @@ +# https://github.com/Phlow/feeling-responsive/blob/gh-pages/_data/socialmedia.yml diff --git a/docs/pages/_includes/_favicon.html b/docs/pages/_includes/_favicon.html new file mode 100644 index 0000000000..29b4af8b41 --- /dev/null +++ b/docs/pages/_includes/_favicon.html @@ -0,0 +1 @@ + diff --git a/docs/pages/_includes/_footer.html b/docs/pages/_includes/_footer.html new file mode 100644 index 0000000000..b0db6c9262 --- /dev/null +++ b/docs/pages/_includes/_footer.html @@ -0,0 +1,86 @@ + +
+
+ +
+
+ + + diff --git a/docs/pages/_sass/_01_settings_colors.scss b/docs/pages/_sass/_01_settings_colors.scss new file mode 100644 index 0000000000..e88a134c52 --- /dev/null +++ b/docs/pages/_sass/_01_settings_colors.scss @@ -0,0 +1,160 @@ +/// from https://github.com/Phlow/feeling-responsive/raw/gh-pages/_sass/_01_settings_colors.scss +@charset "utf-8"; +/* TOC – Color Variables + +- Basics +- Corporate Identity Colorpalette +- Foundation Color Variables +- Grey Scale +- Topbar-Navigation +- Footer +- Code + +*/ + + + +/* Basics +------------------------------------------------------------------- */ + +$text-color : #111; +$body-font-color : $text-color; +$body-bg : #fdfdfd; + + + +/* Corporate Identity Colorpalette + https://color.adobe.com/de/Flat-Design-Colors-v2-color-theme-4341903/ +------------------------------------------------------------------- */ + +$ci-1 : #334D5C; // dark turquoise +$ci-2 : #45B29D; // turquoise +$ci-3 : #EFC94C; // yellow +$ci-4 : #E27A3F; // orange +$ci-5 : #DF4949; // red +$ci-6 : #A1D044; // green + +/// CIL overrides +$ci-2 : #c92c99; +$ci-6 : #e50695; + + +/* Foundation Color Variables +------------------------------------------------------------------- */ + +$primary-color : $ci-1; +$secondary-color : $ci-6; +$alert-color : $ci-5; +$success-color : $ci-6; +$warning-color : $ci-4; +$info-color : $ci-1; + + + +/* Grey Scale +------------------------------------------------------------------- */ + +$grey-1 : #E4E4E4; +$grey-2 : #D7D7D7; +$grey-3 : #CBCBCB; +$grey-4 : #BEBEBE; +$grey-5 : #A4A4A4; +$grey-6 : #979797; +$grey-7 : #8B8B8B; +$grey-8 : #7E7E7E; +$grey-9 : #646464; +$grey-10 : #575757; +$grey-11 : #4B4B4B; +$grey-12 : #3E3E3E; +$grey-13 : #313131; +$grey-14 : #242424; +$grey-15 : #171717; +$grey-16 : #0B0B0B; + +/// CIL overrides +$grey-8 : #043852; +$grey-13 : #510c76; + + +/* Topbar-Navigation +------------------------------------------------------------------- */ + +$topbar-bg-color : $body-bg; +$topbar-bg : $topbar-bg-color; + + +$topbar-dropdown-toggle-color: $ci-1; + +$topbar-link-color : #000; +$topbar-link-color-hover: #000; +$topbar-link-color-active: #000; +$topbar-link-color-active-hover: #000; + +$topbar-dropdown-label-color: $ci-2; +$topbar-dropdown-link-bg-hover: $ci-6; + +$topbar-link-bg-active: $ci-6; // Active Navigation Link +$topbar-link-bg-hover: $ci-6; +$topbar-link-bg-active-hover: $ci-2; + + +$topbar-dropdown-bg: $ci-6; // Background Mobile Navigation +$topbar-dropdown-link-color: #000; +$topbar-dropdown-link-bg: $ci-2; + +$topbar-menu-link-color-toggled: $ci-1; +$topbar-menu-icon-color-toggled: $ci-1; +$topbar-menu-link-color: #000; +$topbar-menu-icon-color: #000; +$topbar-menu-link-color-toggled: $ci-6; +$topbar-menu-icon-color-toggled: $ci-6; + + + +/* Footer +------------------------------------------------------------------- */ + +$footer-bg : $grey-8; +$footer-color : #fff; +$footer-link-color : $ci-6; + + +$subfooter-bg : $grey-13; +$subfooter-color : $grey-8; +$subfooter-link-color: $grey-8; + + + +/* Code +------------------------------------------------------------------- */ + +$code-background-color: scale-color($secondary-color, $lightness: 70%); + +$highlight-background: #ffffff; +$highlight-comment: #999988; +$highlight-error: #a61717; +$highlight-comment-special: #999999; +$highlight-deleted: #000000; +$highlight-error-2: #aa0000; +$highlight-literal-string: #d14; +$highlight-literal-number: #009999; +$highlight-name-attribut: #008080; +$highlight-error-background: #e3d2d2; +$highlight-generic-deleted: #ffdddd; +$highlight-generic-deleted-specific: #ffaaaa; +$highlight-generic-inserted: #ddffdd; +$highlight-generic-inserted-specific: #aaffaa; +$highlight-generic-output: #888888; +$highlight-generic-prompt: #555555; +$highlight-subheading: #aaaaaa; +$highlight-keyword-type: #445588; +$highlight-name-builtin: #0086B3; +$highlight-name-class: #445588; +$highlight-name-entity: #800080; +$highlight-name-exception: #990000; +$highlight-name-function: #990000; +$highlight-name-namespace: #555555; +$highlight-name-tag: #000080; +$highlight-text-whitespace: #bbbbbb; +$highlight-literal-string-regex: #009926; +$highlight-literal-string-symbol: #990073; diff --git a/docs/pages/about.md b/docs/pages/about.md new file mode 100644 index 0000000000..be7600cee6 --- /dev/null +++ b/docs/pages/about.md @@ -0,0 +1,8 @@ +--- +layout: page-fullwidth +header: false +title: About the Core Imaging Library (CIL) +teaser: A versatile python framework for tomographic imaging +--- + +WiP diff --git a/docs/pages/index.md b/docs/pages/index.md new file mode 100644 index 0000000000..b14adacdca --- /dev/null +++ b/docs/pages/index.md @@ -0,0 +1,48 @@ +--- +# https://github.com/Phlow/feeling-responsive/blob/gh-pages/pages/pages-root-folder/index.md +layout: frontpage +header: + image_fullwidth: https://ccpi.ac.uk/wp-content/uploads/2022/08/front-page-1125x800.png # ideally 600x80 pixels + title: 'CIL - Core Imaging Library' +widget1: + title: Examples + url: 'https://mybinder.org/v2/gh/TomographicImaging/CIL-Demos/HEAD?urlpath=lab/tree/binder%2Findex.ipynb' + image: https://ccpi.ac.uk/wp-content/uploads/2022/04/walnut_training.png + text: > + We have a repository with a large collection of Jupyter Notebooks which cover a wide range of topics, from basic usage to advanced reconstructions with iterative methods. +
+ Some examples without any local installation are provided in Binder. + Please click the button below to try them immediately in your browser. +widget2: + title: CIL Documentation + url: '/nightly/' + image: https://ccpi.ac.uk/wp-content/uploads/2022/11/CIL-logo-RGB.svg + text: > + CIL has a live documentation which gets updated regularly and built nightly. + We suggest to download and read the open access articles below, which provide very detailed information about CIL structure and usage. +widget3: + title: Papers + url: 'https://github.com/TomographicImaging/Paper-2021-RSTA-CIL-Part-II' + image: https://ccpi.ac.uk/wp-content/uploads/2022/10/RSTA_cover.png + text: > + Jørgensen JS et al. 2021 Core Imaging Library – Part I: a versatile python framework for tomographic imaging. Phil. Trans. R. Soc. A 20200192. +
+ The code to reproduce the results of the paper can be found at Paper-2021-RSTA-CIL-Part-I. +
+
+ Papoutsellis E et al. 2021 Core Imaging Library – Part II: multichannel reconstruction for dynamic and spectral tomography. Phil. Trans. R. Soc. A 20200193. +
+ The code to reproduce the results of the paper can be found at at Paper-2021-RSTA-CIL-Part-II. +callforaction: + url: https://ccpi.ac.uk/training + text: Training + style: alert +--- + +## A versatile python framework for tomographic imaging + +CIL is an **open-source** mainly Python framework for tomographic imaging for *cone* and *parallel beam* geometries. It comes with tools for **loading**, **preprocessing**, **reconstructing** and **visualising** tomographic data. + +CIL provides **optimised** standard methods such as *Filtered Back Projection* and *FDK* and an extensive **modular optimisation framework** for prototyping reconstruction methods including *sparsity* and *total variation* regularisation, useful when conventional filtered backprojection reconstruction do not lead to satisfactory results, as in highly noisy, incomplete, non-standard or multichannel data arising for example in *dynamic*, *spectral* and *in situ* tomography. + +CIL is open-source software released under the [Apache v2.0 licence](http://www.apache.org/licenses/LICENSE-2.0.html). diff --git a/docs/source/conf.py b/docs/source/conf.py index 8538ec6fe6..e0f348a186 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -29,7 +29,7 @@ # Project information project = 'CIL' copyright = '2017-2024' -author = 'CCPi developers' +author = 'CIL developers' version = version.version release = version _baseurl = f'/{getenv("GITHUB_REPOSITORY", "").split("/", 1)[-1]}/'.replace("//", "/") @@ -71,6 +71,8 @@ "logo": { "image_light": "https://ccpi.ac.uk/wp-content/uploads/2022/11/CIL-logo-RGB.svg", "image_dark": "https://ccpi.ac.uk/wp-content/uploads/2022/11/CIL-logo-RGB-reversed.svg", + "link": "/", + "alt_text": "CIL - Home", }, "show_version_warning_banner": True, "header_links_before_dropdown": 9, diff --git a/docs/source/developer_guide.rst b/docs/source/developer_guide.rst index 4568ff7ae2..eb434d86b9 100644 --- a/docs/source/developer_guide.rst +++ b/docs/source/developer_guide.rst @@ -1,21 +1,17 @@ -.. Copyright 2020 United Kingdom Research and Innovation - Copyright 2020 The University of Manchester - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Authors: - CIL Developers, listed at: https://github.com/TomographicImaging/CIL/blob/master/NOTICE.txt - Kyle Pidgeon (UKRI-STFC) +.. Copyright 2020 United Kingdom Research and Innovation + Copyright 2020 The University of Manchester + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + Authors: + CIL Developers, listed at: https://github.com/TomographicImaging/CIL/blob/master/NOTICE.txt + Kyle Pidgeon (UKRI-STFC) Developers' Guide ***************** @@ -92,7 +88,9 @@ Rendered Building documentation locally ------------------------------ -The easiest way to test changes to documentation is to build the docs locally. To do this, you will need a working ``cil`` installation. +The easiest way to test documentation changes is to open a pull request and `download the rendered documentation from the CI `_. + +Alternatively, to build the docs locally, you will need a working ``cil`` installation. For development of the documentation embedded within the source code itself (e.g. docstrings), you should build ``cil`` from source. The following steps can be used to create an environment that is suitable for building ``cil`` and its documentation, and to start @@ -102,15 +100,16 @@ a HTTP server to view the documentation. #. Update conda with ``conda update -n base -c defaults conda`` #. Follow the instructions `here `_ to create a conda environment and build ``cil`` from source #. Go to ``docs`` folder -#. Install packages from ``docs/docs_environment.yml`` (with 'name' changed to ENVIRONMENT_NAME) using ``conda env update -f docs_environment.yml`` -#. Download the notebooks for rendering in the documentation with ``python mkdemos.py`` -#. Build the documentation ``sphinx-build -b dirhtml source build`` -#. Start a HTTP server to serve documentation with ``python -m http.server --directory build`` +#. Install packages from ``docs_environment.yml`` +#. [Install Ruby version 3.2](https://www.ruby-lang.org/en/documentation/installation/#installers) +#. Install the web dependencies with ``make web-deps`` +#. Build the documentation with ``make dirhtml web`` +#. Start an HTTP server with ``make serve`` to access the docs via `localhost:8000 `_. Example: :: - git clone --recurse-submodule git@github.com:TomographicImaging/CIL.git + git clone --recurse-submodule git@github.com:TomographicImaging/CIL cd CIL sh scripts/create_local_env_for_cil_development_tests.sh -n NUMPY_VERSION -p PYTHON_VERSION -e ENVIRONMENT_NAME conda activate ENVIRONMENT_NAME @@ -119,14 +118,13 @@ Example: cd docs conda update -n base -c defaults conda conda env update -f docs_environment.yml # with the name field set to ENVIRONMENT_NAME - python mkdemos.py - sphinx-build -b dirhtml source build - python -m http.server -d build + make web-deps # install dependencies (requires ruby 3.2) + make dirhtml web serve Notebooks gallery ----------------- -The ``mkdemos.py`` script: +The ``mkdemos.py`` script (called by ``make dirhtml``): - downloads notebooks from external URLs to ``source/demos/*.ipynb`` - uses the ``demos-template.rst`` file to generate the gallery in ``source/demos.rst`` @@ -140,18 +138,14 @@ Make sure that each contributed file contains the following text enclosed in the :: -..Copyright 2022 United Kingdom Research and Innovation - Copyright 2022 The University of Manchester + Copyright [yyyy] United Kingdom Research and Innovation + Copyright [yyyy] The University of Manchester Copyright [yyyy] [name of copyright owner] - Author(s): [Author name, Author email (optional)] - Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/docs/source/index.rst b/docs/source/index.rst index 99d2968e09..7f93157df8 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,104 +1,92 @@ -.. Copyright 2019 United Kingdom Research and Innovation - Copyright 2019 The University of Manchester - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Authors: - CIL Developers, listed at: https://github.com/TomographicImaging/CIL/blob/master/NOTICE.txt - - -.. CCPi-Framework documentation master file, created by - sphinx-quickstart on Tue Mar 19 15:12:44 2019. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Welcome to CIL's documentation! -############################### - -The aim of this package is to enable rapid prototyping of optimisation-based -reconstruction problems, i.e. defining and solving different optimization problems to enforce different properties on the reconstructed image, while being -powerful enough to be employed on real scale problems. - -Firstly, it provides a framework to handle acquisition and reconstruction -data and metadata; it also provides a basic input/output package to read data -from different sources, e.g. Nikon X-Radia, NeXus. - -Secondly, it provides an object-oriented framework for defining mathematical -operators and functions as well a collection of useful example operators and -functions. Both smooth and non-smooth functions can be used. - -Further, it provides a number of high-level generic implementations of -optimisation algorithms to solve generically formulated optimisation problems -constructed from operator and function objects. - -Demos and Examples -================== -A number of demos can be found in the `CIL-Demos`_ repository. - -For detailed information refer to our articles and the repositories -with the code to reproduce the article's results. - -1. Jørgensen JS et al. 2021 Core Imaging Library Part I: a versatile python framework for tomographic imaging -https://doi.org/10.1098/rsta.2020.0192 . Phil. Trans. R. Soc. A 20200192. -The code to reproduce the article results. https://github.com/TomographicImaging/Paper-2021-RSTA-CIL-Part-I - -2. Papoutsellis E et al. 2021 Core Imaging Library - Part II: multichannel reconstruction for dynamic and spectral -tomography https://doi.org/10.1098/rsta.2020.0193 Phil. Trans. R. Soc. A 20200193. -The code to reproduce the article results. https://github.com/TomographicImaging/Paper-2021-RSTA-CIL-Part-II - - -Cite this work -============== - -If you use this software please consider citing one or both of the articles above. - -Software documentation Index -**************************** - -.. toctree:: - :maxdepth: 3 - :caption: Contents: - :name: mastertoc - - introduction - framework - io - optimisation - processors - recon - utilities - plugins - developer_guide - demos - -.. Indices and tables -.. ================== - -.. * :ref:`genindex` -.. * :ref:`modindex` -.. * :ref:`search` - -Contacts -======== - -Please refer to the main `CCPi website`_ for up-to-date information. - -The CCPi developers may be contacted: - -* by joining the `devel mailing list`_ -* on the CIL's GitHub repository page https://github.com/TomographicImaging/CIL.git or -* on the CIL Discord channel https://discord.gg/9NTWu9MEGq - -.. _devel mailing list: https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=CCPI-DEVEL -.. _CCPi website: https://www.ccpi.ac.uk -.. _CIL-Demos: https://github.com/vais-ral/CIL-Demos +.. Copyright 2019 United Kingdom Research and Innovation + Copyright 2019 The University of Manchester + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + Authors: + CIL Developers, listed at: https://github.com/TomographicImaging/CIL/blob/master/NOTICE.txt + +Welcome to CIL's documentation! +############################### + +The aim of this package is to enable rapid prototyping of optimisation-based +reconstruction problems, i.e. defining and solving different optimization problems to enforce different properties on the reconstructed image, while being +powerful enough to be employed on real scale problems. + +Firstly, it provides a framework to handle acquisition and reconstruction +data and metadata; it also provides a basic input/output package to read data +from different sources, e.g. Nikon X-Radia, NeXus. + +Secondly, it provides an object-oriented framework for defining mathematical +operators and functions as well a collection of useful example operators and +functions. Both smooth and non-smooth functions can be used. + +Further, it provides a number of high-level generic implementations of +optimisation algorithms to solve generically formulated optimisation problems +constructed from operator and function objects. + +Demos and Examples +================== +A number of demos can be found in the `CIL-Demos`_ repository. + +For detailed information refer to our articles and the repositories +with the code to reproduce the article's results. + +Cite this work +============== + +If you use this software please consider citing one or both of the articles below. + +1. Jørgensen JS et al. 2021 Core Imaging Library Part I: a versatile python framework for tomographic imaging +https://doi.org/10.1098/rsta.2020.0192 . Phil. Trans. R. Soc. A 20200192. +The code to reproduce the article results. https://github.com/TomographicImaging/Paper-2021-RSTA-CIL-Part-I + +2. Papoutsellis E et al. 2021 Core Imaging Library - Part II: multichannel reconstruction for dynamic and spectral +tomography https://doi.org/10.1098/rsta.2020.0193 Phil. Trans. R. Soc. A 20200193. +The code to reproduce the article results. https://github.com/TomographicImaging/Paper-2021-RSTA-CIL-Part-II + +Table of Contents +================= + +.. toctree:: + :maxdepth: 3 + :name: mastertoc + + introduction + framework + io + optimisation + processors + recon + utilities + plugins + developer_guide + demos + +.. Indices and tables +.. ================== + +.. * :ref:`genindex` +.. * :ref:`modindex` +.. * :ref:`search` + +Contacts +======== + +Please refer to the main `CCPi website`_ for up-to-date information. + +The CIL developers may be contacted: + +* by joining the `devel mailing list`_ +* on the CIL's GitHub repository page https://github.com/TomographicImaging/CIL or +* on the CIL Discord channel https://discord.gg/9NTWu9MEGq + +.. _devel mailing list: https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=CCPI-DEVEL +.. _CCPi website: https://www.ccpi.ac.uk +.. _CIL-Demos: https://github.com/vais-ral/CIL-Demos diff --git a/docs/source/refs.bib b/docs/source/refs.bib index 26c2e9f2cc..4ca6c4e543 100644 --- a/docs/source/refs.bib +++ b/docs/source/refs.bib @@ -1,46 +1,19 @@ -.. Copyright 2021 United Kingdom Research and Innovation - Copyright 2021 The University of Manchester - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Authors: - CIL Developers, listed at: https://github.com/TomographicImaging/CIL/blob/master/NOTICE.txt - - - @article{guler1992new, - title={New proximal point algorithms for convex minimization}, - author={G{\"u}ler, Osman}, - journal={SIAM Journal on Optimization}, - volume={2}, - number={4}, - pages={649--664}, - year={1992}, - publisher={SIAM} -} - - +title={New proximal point algorithms for convex minimization}, +author={G{\"u}ler, Osman}, +journal={SIAM Journal on Optimization}, +volume={2}, +number={4}, +pages={649--664}, +year={1992}, +publisher={SIAM}} @book{nesterov2003introductory, - title={Introductory lectures on convex optimization: A basic course}, - author={Nesterov, Yurii}, - volume={87}, - year={2003}, - publisher={Springer Science \& Business Media} -} - - - -@Article{CP2011, +title={Introductory lectures on convex optimization: A basic course}, +author={Nesterov, Yurii}, +volume={87}, +year={2003}, +publisher={Springer Science \& Business Media}} +@article{CP2011, author={Chambolle, Antonin and Pock, Thomas}, title={A First-Order Primal-Dual Algorithm for Convex Problems with Applications to Imaging}, @@ -51,110 +24,64 @@ @Article{CP2011 volume={40}, number={1}, pages={120-145}, -abstract={In this paper we study a first-order primal-dual algorithm for non-smooth convex optimization problems with known saddle-point structure. We prove convergence to a saddle-point with rate O(1/N) in finite dimensions for the complete class of problems. We further show accelerations of the proposed algorithm to yield improved rates on problems with some degree of smoothness. In particular we show that we can achieve O(1/N2) convergence on problems, where the primal or the dual objective is uniformly convex, and we can show linear convergence, i.e. O($\omega$N) for some $\omega$∈(0,1), on smooth problems. The wide applicability of the proposed algorithm is demonstrated on several imaging problems such as image denoising, image deconvolution, image inpainting, motion estimation and multi-label image segmentation.}, issn={1573-7683}, doi={10.1007/s10851-010-0251-1}, -url={https://doi.org/10.1007/s10851-010-0251-1} -} - - +url={https://doi.org/10.1007/s10851-010-0251-1}} @article{EZXC2010, -author = {Esser, Ernie and Zhang, Xiaoqun and Chan, Tony F.}, -title = {A General Framework for a Class of First Order Primal-Dual Algorithms for Convex Optimization in Imaging Science}, -journal = {SIAM Journal on Imaging Sciences}, -volume = {3}, -number = {4}, -pages = {1015-1046}, -year = {2010}, -doi = {10.1137/09076934X}, - -URL = { - https://doi.org/10.1137/09076934X - -}, -eprint = { - https://doi.org/10.1137/09076934X - -} - -} - - - +author={Esser, Ernie and Zhang, Xiaoqun and Chan, Tony F.}, +title={A General Framework for a Class of First Order Primal-Dual Algorithms for Convex Optimization in Imaging Science}, +journal={SIAM Journal on Imaging Sciences}, +volume={3}, +number={4}, +pages={1015-1046}, +year={2010}, +doi={10.1137/09076934X}, +URL={https://doi.org/10.1137/09076934X}, +eprint={https://doi.org/10.1137/09076934X}} @article{Papoutsellis_et_al_2021, -author = {Papoutsellis, Evangelos and Ametova, Evelina and Delplancke, Claire and Fardell, Gemma and J\"{o}rgensen, Jakob S. and Pasca, Edoardo and Turner, Martin and Warr, Ryan and Lionheart, William R. B. and Withers, Philip J. }, -title = {Core Imaging Library - Part II: multichannel reconstruction for dynamic and spectral tomography}, -journal = {Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences}, -volume = {379}, -number = {2204}, -pages = {20200193}, -year = {2021}, -doi = {10.1098/rsta.2020.0193}, - -URL = {https://royalsocietypublishing.org/doi/abs/10.1098/rsta.2020.0193}, -eprint = {https://royalsocietypublishing.org/doi/pdf/10.1098/rsta.2020.0193} -, - abstract = { The newly developed core imaging library (CIL) is a flexible plug and play library for tomographic imaging with a specific focus on iterative reconstruction. CIL provides building blocks for tailored regularized reconstruction algorithms and explicitly supports multichannel tomographic data. In the first part of this two-part publication, we introduced the fundamentals of CIL. This paper focuses on applications of CIL for multichannel data, e.g. dynamic and spectral. We formalize different optimization problems for colour processing, dynamic and hyperspectral tomography and demonstrate CIL’s capabilities for designing state-of-the-art reconstruction methods through case studies and code snapshots. This article is part of the theme issue β€˜Synergistic tomographic image reconstruction: part 2’. } -} - - - - - +author={Papoutsellis, Evangelos and Ametova, Evelina and Delplancke, Claire and Fardell, Gemma and J\"{o}rgensen, Jakob S. and Pasca, Edoardo and Turner, Martin and Warr, Ryan and Lionheart, William R. B. and Withers, Philip J. }, +title={Core Imaging Library - Part II: multichannel reconstruction for dynamic and spectral tomography}, +journal={Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences}, +volume={379}, +number={2204}, +pages={20200193}, +year={2021}, +doi={10.1098/rsta.2020.0193}, +URL={https://royalsocietypublishing.org/doi/abs/10.1098/rsta.2020.0193}, +eprint={https://royalsocietypublishing.org/doi/pdf/10.1098/rsta.2020.0193}} @article{Jorgensen_et_al_2021, -author = {J\"{o}rgensen, J. S. and Ametova, E. and Burca, G. and Fardell, G. and Papoutsellis, E. and Pasca, E. and Thielemans, K. and Turner, M. and Warr, R. and Lionheart, W. R. B. and Withers, P. J. }, -title = {Core Imaging Library - Part I: a versatile Python framework for tomographic imaging}, -journal = {Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences}, -volume = {379}, -number = {2204}, -pages = {20200192}, -year = {2021}, -doi = {10.1098/rsta.2020.0192}, - -URL = {https://royalsocietypublishing.org/doi/abs/10.1098/rsta.2020.0192}, -eprint = {https://royalsocietypublishing.org/doi/pdf/10.1098/rsta.2020.0192} -, - abstract = { We present the Core Imaging Library (CIL), an open-source Python framework for tomographic imaging with particular emphasis on reconstruction of challenging datasets. Conventional filtered back-projection reconstruction tends to be insufficient for highly noisy, incomplete, non-standard or multi-channel data arising for example in dynamic, spectral and in situ tomography. CIL provides an extensive modular optimization framework for prototyping reconstruction methods including sparsity and total variation regularization, as well as tools for loading, preprocessing and visualizing tomographic data. The capabilities of CIL are demonstrated on a synchrotron example dataset and three challenging cases spanning golden-ratio neutron tomography, cone-beam X-ray laminography and positron emission tomography. This article is part of the theme issue β€˜Synergistic tomographic image reconstruction: part 2’. } -} - - -@ARTICLE{BeckTeboulle_a, - author={Beck, Amir and Teboulle, Marc}, - journal={IEEE Transactions on Image Processing}, - title={Fast Gradient-Based Algorithms for Constrained Total Variation Image Denoising and Deblurring Problems}, - year={2009}, - volume={18}, - number={11}, - pages={2419-2434}, - doi={10.1109/TIP.2009.2028250}} - - +author={J\"{o}rgensen, J. S. and Ametova, E. and Burca, G. and Fardell, G. and Papoutsellis, E. and Pasca, E. and Thielemans, K. and Turner, M. and Warr, R. and Lionheart, W. R. B. and Withers, P. J. }, +title={Core Imaging Library - Part I: a versatile Python framework for tomographic imaging}, +journal={Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences}, +volume={379}, +number={2204}, +pages={20200192}, +year={2021}, +doi={10.1098/rsta.2020.0192}, +URL={https://royalsocietypublishing.org/doi/abs/10.1098/rsta.2020.0192}, +eprint={https://royalsocietypublishing.org/doi/pdf/10.1098/rsta.2020.0192}} +@article{BeckTeboulle_a, +author={Beck, Amir and Teboulle, Marc}, +journal={IEEE Transactions on Image Processing}, +title={Fast Gradient-Based Algorithms for Constrained Total Variation Image Denoising and Deblurring Problems}, +year={2009}, +volume={18}, +number={11}, +pages={2419-2434}, +doi={10.1109/TIP.2009.2028250}} @article{BeckTeboulle_b, -author = {Beck, Amir and Teboulle, Marc}, -title = {A Fast Iterative Shrinkage-Thresholding Algorithm for Linear Inverse Problems}, -journal = {SIAM Journal on Imaging Sciences}, -volume = {2}, -number = {1}, -pages = {183-202}, -year = {2009}, -doi = {10.1137/080716542}, - -URL = { - https://doi.org/10.1137/080716542 - -}, -eprint = { - https://doi.org/10.1137/080716542 - -} -, - abstract = { We consider the class of iterative shrinkage-thresholding algorithms (ISTA) for solving linear inverse problems arising in signal/image processing. This class of methods, which can be viewed as an extension of the classical gradient algorithm, is attractive due to its simplicity and thus is adequate for solving large-scale problems even with dense matrix data. However, such methods are also known to converge quite slowly. In this paper we present a new fast iterative shrinkage-thresholding algorithm (FISTA) which preserves the computational simplicity of ISTA but with a global rate of convergence which is proven to be significantly better, both theoretically and practically. Initial promising numerical results for wavelet-based image deblurring demonstrate the capabilities of FISTA which is shown to be faster than ISTA by several orders of magnitude. } -} - - -@Article{Rasch2020, -author={Rasch, Julian -and Chambolle, Antonin}, +author={Beck, Amir and Teboulle, Marc}, +title={A Fast Iterative Shrinkage-Thresholding Algorithm for Linear Inverse Problems}, +journal={SIAM Journal on Imaging Sciences}, +volume={2}, +number={1}, +pages={183-202}, +year={2009}, +doi={10.1137/080716542}, +URL={https://doi.org/10.1137/080716542}, +eprint={https://doi.org/10.1137/080716542}} +@article{Rasch2020, +author={Rasch, Julian and Chambolle, Antonin}, title={Inexact first-order primal--dual algorithms}, journal={Computational Optimization and Applications}, year={2020}, @@ -163,21 +90,18 @@ @Article{Rasch2020 volume={76}, number={2}, pages={381-430}, -abstract={We investigate the convergence of a recently popular class of first-order primal--dual algorithms for saddle point problems under the presence of errors in the proximal maps and gradients. We study several types of errors and show that, provided a sufficient decay of these errors, the same convergence rates as for the error-free algorithm can be established. More precisely, we prove the (optimal) {\$}{\$}O{\backslash}left( 1/N{\backslash}right){\$}{\$} convergence to a saddle point in finite dimensions for the class of non-smooth problems considered in this paper, and prove a {\$}{\$}O{\backslash}left( 1/N^2{\backslash}right){\$}{\$} or even linear {\$}{\$}O{\backslash}left( {\backslash}theta ^N{\backslash}right){\$}{\$} convergence rate if either the primal or dual objective respectively both are strongly convex. Moreover we show that also under a slower decay of errors we can establish rates, however slower and directly depending on the decay of the errors. We demonstrate the performance and practical use of the algorithms on the example of nested algorithms and show how they can be used to split the global objective more efficiently.}, issn={1573-2894}, doi={10.1007/s10589-020-00186-y}, url={https://doi.org/10.1007/s10589-020-00186-y}} - @book{Kak2001, - doi = {10.1137/1.9780898719277}, - url = {https://doi.org/10.1137/1.9780898719277}, - year = {2001}, - month = jan, - publisher = {Society for Industrial and Applied Mathematics}, - author = {Avinash C. Kak and Malcolm Slaney}, - title = {Principles of Computerized Tomographic Imaging}} - -@Article{Zhu2010, +doi={10.1137/1.9780898719277}, +url={https://doi.org/10.1137/1.9780898719277}, +year={2001}, +month=jan, +publisher={Society for Industrial and Applied Mathematics}, +author={Avinash C. Kak and Malcolm Slaney}, +title={Principles of Computerized Tomographic Imaging}} +@article{Zhu2010, author={Zhu, Mingqiang and Wright, Stephen J. and Chan, Tony F.}, @@ -189,65 +113,17 @@ @Article{Zhu2010 volume={47}, number={3}, pages={377-400}, -abstract={Image restoration models based on total variation (TV) have become popular since their introduction by Rudin, Osher, and Fatemi (ROF) in 1992. The dual formulation of this model has a quadratic objective with separable constraints, making projections onto the feasible set easy to compute. This paper proposes application of gradient projection (GP) algorithms to the dual formulation. We test variants of GP with different step length selection and line search strategies, including techniques based on the Barzilai-Borwein method. Global convergence can in some cases be proved by appealing to existing theory. We also propose a sequential quadratic programming (SQP) approach that takes account of the curvature of the boundary of the dual feasible set. Computational experiments show that the proposed approaches perform well in a wide range of applications and that some are significantly faster than previously proposed methods, particularly when only modest accuracy in the solution is required.}, issn={1573-2894}, doi={10.1007/s10589-008-9225-2}, -url={https://doi.org/10.1007/s10589-008-9225-2} -} - -@ARTICLE{BeckTeboulle_a, - author={Beck, Amir and Teboulle, Marc}, - journal={IEEE Transactions on Image Processing}, - title={Fast Gradient-Based Algorithms for Constrained Total Variation Image Denoising and Deblurring Problems}, - year={2009}, - volume={18}, - number={11}, - pages={2419-2434}, - doi={10.1109/TIP.2009.2028250}} - - -@article{BeckTeboulle_b, -author = {Beck, Amir and Teboulle, Marc}, -title = {A Fast Iterative Shrinkage-Thresholding Algorithm for Linear Inverse Problems}, -journal = {SIAM Journal on Imaging Sciences}, -volume = {2}, -number = {1}, -pages = {183-202}, -year = {2009}, -doi = {10.1137/080716542}, - -URL = { - https://doi.org/10.1137/080716542 - -}, -eprint = { - https://doi.org/10.1137/080716542 - -} -, - abstract = { We consider the class of iterative shrinkage-thresholding algorithms (ISTA) for solving linear inverse problems arising in signal/image processing. This class of methods, which can be viewed as an extension of the classical gradient algorithm, is attractive due to its simplicity and thus is adequate for solving large-scale problems even with dense matrix data. However, such methods are also known to converge quite slowly. In this paper we present a new fast iterative shrinkage-thresholding algorithm (FISTA) which preserves the computational simplicity of ISTA but with a global rate of convergence which is proven to be significantly better, both theoretically and practically. Initial promising numerical results for wavelet-based image deblurring demonstrate the capabilities of FISTA which is shown to be faster than ISTA by several orders of magnitude. } -} - - - +url={https://doi.org/10.1007/s10589-008-9225-2}} @article{CombettesValerie, -author = {Combettes, Patrick L. and Wajs, Val\'erie R.}, -title = {Signal Recovery by Proximal Forward-Backward Splitting}, -journal = {Multiscale Modeling \& Simulation}, -volume = {4}, -number = {4}, -pages = {1168-1200}, -year = {2005}, -doi = {10.1137/050626090}, - -URL = { - https://doi.org/10.1137/050626090 - -}, -eprint = { - https://doi.org/10.1137/050626090 - -} -, - abstract = { We show that various inverse problems in signal recovery can be formulated as the generic problem of minimizing the sum of two convex functions with certain regularity properties. This formulation makes it possible to derive existence, uniqueness, characterization, and stability results in a unified and standardized fashion for a large class of apparently disparate problems. Recent results on monotone operator splitting methods are applied to establish the convergence of a forward-backward algorithm to solve the generic problem. In turn, we recover, extend, and provide a simplified analysis for a variety of existing iterative methods. Applications to geometry/texture image decomposition schemes are also discussed. A novelty of our framework is to use extensively the notion of a proximity operator, which was introduced by Moreau in the 1960s. } -} +author={Combettes, Patrick L. and Wajs, Val\'erie R.}, +title={Signal Recovery by Proximal Forward-Backward Splitting}, +journal={Multiscale Modeling \& Simulation}, +volume={4}, +number={4}, +pages={1168-1200}, +year={2005}, +doi={10.1137/050626090}, +URL={https://doi.org/10.1137/050626090}, +eprint={https://doi.org/10.1137/050626090}}