Skip to content

Use normalisation in detector/q space to account for pixel differences #97

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 99 commits into from
Mar 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
bf1832d
Use normalisation in detector/q space to account for pixel differences
arm61 Feb 1, 2022
6781379
Apply automatic formatting
arm61 Feb 1, 2022
28fd9f1
Update docs/instruments/amor/amor_reduction.ipynb
arm61 Feb 1, 2022
5cdc027
Mention `inf` as well as `nan`
arm61 Feb 1, 2022
c219db9
Merge
arm61 Feb 1, 2022
377c3a0
Add footprint correction and super mirror calibration. Additionally, …
arm61 Feb 8, 2022
b3377c9
Merge branch 'main' into normalisation
arm61 Feb 8, 2022
2876432
flake8
arm61 Feb 8, 2022
405c2be
Merge branch 'normalisation' of github.com:scipp/ess into normalisation
arm61 Feb 8, 2022
719c7d3
Apply automatic formatting
arm61 Feb 8, 2022
3104687
close the div
nvaytet Feb 10, 2022
68c0119
Merge pull request #103 from scipp/fix_note_box_formatting
nvaytet Feb 10, 2022
9ceb5e1
Fix reference duplication
arm61 Feb 11, 2022
6e1c904
Merge
arm61 Feb 11, 2022
490ee4e
use <div> instead of <a> tag for citation links to work in sphinx
nvaytet Feb 11, 2022
60ac83c
Move to using div
arm61 Feb 11, 2022
00b7757
Remove .DS store
arm61 Feb 11, 2022
75f57f2
Apply automatic formatting
arm61 Feb 11, 2022
3feebf5
Merge pull request #104 from scipp/div_for_citation_links
jl-wynen Feb 14, 2022
63e29b7
add style guide for contributions
nvaytet Feb 14, 2022
3a1f7da
rework documentation section
nvaytet Feb 14, 2022
209ed3f
add section on code formatting
nvaytet Feb 14, 2022
c2eab12
add link to ess logging and change folder to docs
nvaytet Feb 14, 2022
03b535b
add note on using Harvard style
nvaytet Feb 14, 2022
3abe7c2
Merge pull request #105 from scipp/style_guide
nvaytet Feb 14, 2022
cb035fc
Fix repo URL in docs
jl-wynen Feb 15, 2022
b4fc680
Merge pull request #106 from scipp/fix-repo-url
nvaytet Feb 15, 2022
48262cc
Bump JamesIves/github-pages-deploy-action from 4.2.3 to 4.2.5
dependabot[bot] Feb 21, 2022
fd2eaf1
Merge pull request #109 from scipp/dependabot/github_actions/JamesIve…
jl-wynen Feb 22, 2022
8c1186d
Replace the division of the calibration with a multiplication and mak…
arm61 Feb 22, 2022
a978c41
Merge branch 'normalisation' of github.com:scipp/ess into normalisation
arm61 Feb 22, 2022
383b555
Creation of a calibrations module, changing to initialise as None
arm61 Feb 24, 2022
16bd048
Apply automatic formatting
arm61 Feb 24, 2022
dccabcb
Update docs/instruments/amor/amor_reduction.ipynb
arm61 Feb 24, 2022
b39a99e
Update docs/instruments/amor/amor_reduction.ipynb
arm61 Feb 24, 2022
06e18e5
Update docs/instruments/amor/amor_reduction.ipynb
arm61 Feb 24, 2022
1190811
Update docs/instruments/amor/amor_reduction.ipynb
arm61 Feb 24, 2022
5d0fe61
Add dependency on sphinx-autodoc-typehints
jl-wynen Feb 24, 2022
c9748a8
Use and config napoleaon extension
jl-wynen Feb 24, 2022
408fec5
Add missing None
arm61 Feb 24, 2022
719c0ac
Install sphinx_autodoc_typehints via workflow files
jl-wynen Feb 24, 2022
e7670bd
Remove sphinx_autodoc_typehints from requirements in meta.yaml
jl-wynen Feb 24, 2022
dc2acfc
Do not specify full version of package
jl-wynen Feb 24, 2022
adfa6ae
Download sphinx_autodoc_typehints manually
jl-wynen Feb 24, 2022
2232b99
Do not install autodoc-typehints in workflow file
jl-wynen Feb 24, 2022
f0f3334
Merge pull request #110 from scipp/napoleon-docs
nvaytet Feb 24, 2022
96ac92d
remove env file and add metatoenv script
nvaytet Feb 24, 2022
1f44b57
Set unit = None of mask
jl-wynen Feb 25, 2022
09ede70
Avoid duplicate target names
jl-wynen Feb 25, 2022
8044d2d
Update docs/instruments/amor/amor_reduction.ipynb
arm61 Feb 28, 2022
5588306
Changes following comments from Neil
arm61 Feb 28, 2022
5b36208
Merge branch 'normalisation' of github.com:scipp/ess into normalisation
arm61 Feb 28, 2022
04aa6da
Apply automatic formatting
arm61 Feb 28, 2022
dd77a14
add developer getting started
nvaytet Feb 28, 2022
baaa44e
change PYTHONPATH to pip install
nvaytet Feb 28, 2022
a47c702
Merge pull request #111 from scipp/remove_developer_env_file
nvaytet Feb 28, 2022
1d858e1
Merge branch 'main' into scippneutron-0.5
nvaytet Feb 28, 2022
3cd9e2b
use new scippneutron and mantid packages
nvaytet Feb 28, 2022
d2e519e
cleanup release notes
nvaytet Feb 28, 2022
522cb4e
update version selection menu
nvaytet Feb 28, 2022
4b869e6
Merge pull request #112 from scipp/scippneutron-0.5
nvaytet Feb 28, 2022
408b7db
ticking some more of Neils comments off
arm61 Mar 1, 2022
78599fd
Merge branch 'normalisation' of github.com:scipp/ess into normalisation
arm61 Mar 1, 2022
44b4f28
Use normalisation in detector/q space to account for pixel differences
arm61 Feb 1, 2022
a48dcd5
Mention `inf` as well as `nan`
arm61 Feb 1, 2022
30cf029
Apply automatic formatting
arm61 Feb 1, 2022
e4114b0
Add footprint correction and super mirror calibration. Additionally, …
arm61 Feb 8, 2022
ffcd890
flake8
arm61 Feb 8, 2022
741743b
Fix reference duplication
arm61 Feb 11, 2022
86c5785
Apply automatic formatting
arm61 Feb 8, 2022
c2651c4
Move to using div
arm61 Feb 11, 2022
7cd308c
Remove .DS store
arm61 Feb 11, 2022
6342cb4
Replace the division of the calibration with a multiplication and mak…
arm61 Feb 22, 2022
ce56175
Apply automatic formatting
arm61 Feb 11, 2022
e591b75
Creation of a calibrations module, changing to initialise as None
arm61 Feb 24, 2022
a27a0f4
Apply automatic formatting
arm61 Feb 24, 2022
dfdb055
Update docs/instruments/amor/amor_reduction.ipynb
arm61 Feb 24, 2022
87ec858
Update docs/instruments/amor/amor_reduction.ipynb
arm61 Feb 24, 2022
a8b9b4f
Update docs/instruments/amor/amor_reduction.ipynb
arm61 Feb 24, 2022
092ae9f
Update docs/instruments/amor/amor_reduction.ipynb
arm61 Feb 24, 2022
c83d363
Add missing None
arm61 Feb 24, 2022
b9f2edd
Changes following comments from Neil
arm61 Feb 28, 2022
f0eb0d4
Update docs/instruments/amor/amor_reduction.ipynb
arm61 Feb 28, 2022
d7e8ba0
ticking some more of Neils comments off
arm61 Mar 1, 2022
518aeb9
Apply automatic formatting
arm61 Feb 28, 2022
a31ceb3
Merge branch 'normalisation' of github.com:scipp/ess into normalisation
arm61 Mar 1, 2022
600728c
Trying to get changes to be respected
arm61 Mar 8, 2022
c4f7088
Add FWHM_TO_STD
arm61 Mar 15, 2022
4e7ce46
Apply automatic formatting
arm61 Mar 15, 2022
537cf90
Use suggstion from Simon for calibration
arm61 Mar 15, 2022
4a9dd2c
Metadata removed
arm61 Mar 15, 2022
b8247bd
Merge branch 'normalisation' of github.com:scipp/ess into normalisation
arm61 Mar 15, 2022
6ecf2d3
Apply automatic formatting
arm61 Mar 15, 2022
910c09d
Update docs/instruments/amor/amor_reduction.ipynb
arm61 Mar 16, 2022
5b12203
Improve the wording to explain the main and add the functions for con…
arm61 Mar 18, 2022
804d9d0
Merge
arm61 Mar 18, 2022
f4cb4d0
Comments from Neil
arm61 Mar 18, 2022
cc5bd8e
Remove whitespace
arm61 Mar 18, 2022
e2a88c8
Apply automatic formatting
arm61 Mar 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pr_and_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
fetch-depth: 0 # history required so cmake can determine version
- uses: conda-incubator/setup-miniconda@v2
- run: conda install --channel conda-forge --yes conda-build mamba boa
- run: conda mambabuild --channel conda-forge --channel scipp --no-anaconda-upload --override-channels --output-folder conda/package conda
- run: conda mambabuild --channel conda-forge --channel scipp --channel mantid --no-anaconda-upload --override-channels --output-folder conda/package conda

- uses: actions/upload-artifact@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/weekly_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
fetch-depth: 0 # history required so cmake can determine version
- uses: conda-incubator/setup-miniconda@v2
- run: conda install --channel conda-forge --yes conda-build mamba boa
- run: conda mambabuild --channel conda-forge --channel scipp --no-anaconda-upload --override-channels --output-folder conda/package conda
- run: conda mambabuild --channel conda-forge --channel scipp --channel mantid --no-anaconda-upload --override-channels --output-folder conda/package conda

- uses: actions/upload-artifact@v2
with:
Expand All @@ -63,7 +63,7 @@ jobs:
- uses: actions/download-artifact@v2
- run: anaconda --token ${{ secrets.ANACONDATOKEN }} upload --user scipp --label ${{ env.conda_label }} $(ls conda-package-*/*/*.tar.bz2)

- uses: JamesIves/github-pages-deploy-action@v4.2.3
- uses: JamesIves/github-pages-deploy-action@v4.2.5
with:
branch: gh-pages
folder: DocumentationHTML
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This supersedes scripts in [ess-legacy](https://github.com/scipp/ess-legacy)
This is built on and complemented by neutron and technique specific support available in
[scippneutron](https://github.com/scipp/scippneutron).

Please read the [contribution](contributing.md) guidelines before making additions.
Please read the [contribution guidelines](https://scipp.github.io/ess/developer/style-guide.html) before making additions.

# Branch organisation

Expand Down
7 changes: 5 additions & 2 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ requirements:
- ipywidgets
- matplotlib
- pooch
- scippneutron>=0.4.2
- scippneutron>=0.5
- scipy
- tifffile

Expand All @@ -25,7 +25,7 @@ test:
- ess.reflectometry
requires:
- ipympl
- mantid-framework
- mantid
- pytest
- pandoc
- pythreejs
Expand All @@ -34,6 +34,7 @@ test:
- sphinx-book-theme
- sphinx-copybutton
- nbsphinx
- pip
source_files:
- tests/
- docs/
Expand All @@ -45,6 +46,8 @@ build:
number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}
noarch: python
script:
- wget https://files.pythonhosted.org/packages/04/51/4b4a0740fbde50408a2f956cbb190bdc01f1c7a562627e7f102b6a30d9b4/sphinx_autodoc_typehints-1.17.0-py3-none-any.whl
- pip install sphinx_autodoc_typehints-1.17.0-py3-none-any.whl
- pip install .

about:
Expand Down
25 changes: 0 additions & 25 deletions contributing.md

This file was deleted.

21 changes: 21 additions & 0 deletions developer-extra.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2022 Scipp contributors (https://github.com/scipp)

# This file adds optional dependencies for local development.
# It should be used in combination with the metatoenv.py script to generate a complete
# developer environment:
#
# python tools/metatoenv.py --dir=conda --env-file=ess-developer.yml \
# --channels=conda-forge,scipp --merge-with=developer-extra.yml

name: developer-extra

channels:
- conda-forge

dependencies:
- yapf
- flake8
- pip:
- nb-clean
- sphinx-autodoc-typehints>=1.17.0
6 changes: 6 additions & 0 deletions docs/_templates/topbar/launchbuttons.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
<a class="dropdown-buttons"
href="https://scipp.github.io/ess"><button type="button"
class="btn btn-secondary topbarbtn">latest</button></a>
<a class="dropdown-buttons"
href="https://scipp.github.io/ess/release/0.4.0"><button type="button"
class="btn btn-secondary topbarbtn">v0.4</button></a>
<a class="dropdown-buttons"
href="https://scipp.github.io/ess/release/0.3.0"><button type="button"
class="btn btn-secondary topbarbtn">v0.3</button></a>
<a class="dropdown-buttons"
href="https://scipp.github.io/ess/release/0.2.0"><button type="button"
class="btn btn-secondary topbarbtn">v0.2</button></a>
Expand Down
40 changes: 2 additions & 38 deletions docs/about/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,14 @@
Release Notes
=============

v0.4.0 (unreleased)
-------------------

Features
~~~~~~~~
v0.4.0 (February 2022)
----------------------

Breaking changes
~~~~~~~~~~~~~~~~

* When doing ``import ess``, all the submodules (``amor``, ``reflectometry``, and ``wfm``) are no longer directly available as ``ess.amor``. Instead, we now rely on simply doing ``from ess import amor`` or ``import ess.sans as sans`` `#102 <https://github.com/scipp/ess/pull/102>`_.

Bugfixes
~~~~~~~~

Deprecations
~~~~~~~~~~~~

Stability, Maintainability, and Testing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Contributors
~~~~~~~~~~~~

Expand All @@ -39,18 +27,6 @@ Features
* Implemented a logging framework for reflectometry and Amor `#93 <https://github.com/scipp/ess/pull/93>`_.
* Added the ``sans.to_I_of_Q`` workflow to reduce SANS2D data, as well as notebooks that describe the workflow and illustrate its usage `#60 <https://github.com/scipp/ess/pull/60>`_.

Breaking changes
~~~~~~~~~~~~~~~~

Bugfixes
~~~~~~~~

Deprecations
~~~~~~~~~~~~

Stability, Maintainability, and Testing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Contributors
~~~~~~~~~~~~

Expand All @@ -62,9 +38,6 @@ and Jan-Lukas Wynen :sup:`a`
v0.2.0 (January 2022)
---------------------

Features
~~~~~~~~

Breaking changes
~~~~~~~~~~~~~~~~

Expand All @@ -75,15 +48,6 @@ Breaking changes
* The unit conversion (computing wavelength and Q) now use ``transform_coords``.
* The Amor reduction notebook from ``ess-notebooks`` has been imported into the ``ess`` repository.

Bugfixes
~~~~~~~~

Deprecations
~~~~~~~~~~~~

Stability, Maintainability, and Testing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Contributors
~~~~~~~~~~~~

Expand Down
22 changes: 20 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.mathjax',
'sphinx.ext.doctest',
'sphinx.ext.napoleon',
'sphinx_autodoc_typehints',
'sphinx_copybutton',
'IPython.sphinxext.ipython_directive',
'IPython.sphinxext.ipython_console_highlighting',
Expand All @@ -63,6 +65,22 @@
# For a nice example see how xarray handles its API documentation.
autosummary_generate = True

napoleon_google_docstring = False
napoleon_numpy_docstring = True
napoleon_use_param = True
napoleon_use_rtype = False
napoleon_preprocess_types = True
napoleon_type_aliases = {
# objects without namespace: scipp
"DataArray": "~scipp.DataArray",
"Dataset": "~scipp.Dataset",
"Variable": "~scipp.Variable",
# objects without namespace: numpy
"ndarray": "~numpy.ndarray",
}
typehints_defaults = 'comma'
typehints_use_rtype = False

templates_path = ['_templates']

# The suffix(es) of source filenames.
Expand Down Expand Up @@ -92,7 +110,7 @@
#
html_theme_options = {
"logo_only": True,
"repository_url": "https://github.com/scipp/scipp",
"repository_url": "https://github.com/scipp/ess",
"repository_branch": "main",
"path_to_docs": "docs",
"use_repository_button": True,
Expand Down
61 changes: 61 additions & 0 deletions docs/developer/getting-started.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Getting Started
===============

Getting the source code
~~~~~~~~~~~~~~~~~~~~~~~

To get a copy of the code, you need to clone the git repository (either via SSH or HTTPS)
from `GitHub <https://github.com/scipp/ess>`_.
Once you have done this, go inside the top-level folder of the repository.

.. code-block:: bash

cd ess

Creating a development environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To install all non-optional dependencies for a complete development environment,
we recommend creating a ``conda`` environment from a generated ``ess-developer.yml``
file.
We use the ``tools/metatoenv.py`` script to merge the dependencies in the
``conda/meta.yaml`` and ``developer-extra.yml`` files into a single
``ess-developer.yml`` file.

.. code-block:: bash

python tools/metatoenv.py --dir=conda --env-file=ess-developer.yml \
--channels=conda-forge,scipp,mantid --merge-with=developer-extra.yml
conda env create -f ess-developer.yml
conda activate ess-developer

Once you have activated the environment, you want to ``pip`` install it locally using

.. code-block:: bash

python -m pip install -e .


Running the unit tests
~~~~~~~~~~~~~~~~~~~~~~

To run the unit tests, simply

.. code-block:: bash

cd tests/
python -m pytest

Building Documentation
~~~~~~~~~~~~~~~~~~~~~~

To build the documentation:

.. code-block:: bash

cd docs
sphinx-build -b html . build

This will build the documentation inside the ``docs/build`` folder.
If rebuilding the documentation is slow it can be quicker to remove the docs build
directory and start a fresh build.
Loading