Skip to content

Polarization correction #122

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

Open
wants to merge 54 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
8768696
docs: polarization calibration prototype
jokasimr Feb 25, 2025
f78be6c
docs: include figures
jokasimr Feb 25, 2025
0c686af
docs: add header
jokasimr Feb 25, 2025
a25ef55
changes
jokasimr Feb 27, 2025
d22df0f
feat: implement calibration and reduction
jokasimr Feb 27, 2025
e3bb2c1
refactor: move test code to tests, add docstrings
jokasimr Mar 18, 2025
2e50d3b
feat: draft sciline domain types
jokasimr Mar 18, 2025
7b70b11
test: solve recovers expected parameters
jokasimr Mar 18, 2025
ab78efb
test: stacking logic in linsolve
jokasimr Mar 18, 2025
fc20fd0
fix: remove unused
jokasimr Mar 19, 2025
893abdb
fix: add position already in reduction to lz
jokasimr Mar 19, 2025
0fb609a
fix: calibration on lz grid, compute Q on lz grid for sample + add ma…
jokasimr Mar 19, 2025
727bf44
docs: add esspolarization + tox -e deps
jokasimr Mar 20, 2025
ec48ec6
docs: add example reducing polarized mcstas data
jokasimr Mar 31, 2025
e9acb7c
fix: move factor from normalization to polarization matrix
jokasimr Apr 1, 2025
6e11c7d
fix: use pandas to load csv
jokasimr Apr 1, 2025
381227e
fix: tweak center of incident angle for mcstas data
jokasimr Apr 1, 2025
0329a22
fix: old value was better
jokasimr Apr 2, 2025
179aaef
fix: tests
jokasimr Apr 2, 2025
261ac50
feat: make normalization able to handle different kinds of references
jokasimr Apr 2, 2025
cca0ce5
fix: no need to have two reduce to Q functions
jokasimr Apr 4, 2025
4930b00
docs: stap template
jokasimr Apr 4, 2025
725ee1d
fix: remove unnecessary
jokasimr Apr 7, 2025
91fb8cd
deps: add ipympl to docs
jokasimr Apr 9, 2025
8d9ba1d
Merge branch 'polcal' of github.com:scipp/essreflectometry into polcal
jokasimr Apr 9, 2025
6089d41
docs: remove polarization notebook
jokasimr Apr 9, 2025
f8083b2
docs: remove polarization notebook from docs
jokasimr Apr 9, 2025
d7d31c0
docs: remove polarization correction experiment notebook
jokasimr Apr 9, 2025
b187fbd
Merge branch 'main' into polcal
jokasimr Apr 9, 2025
6e1a83f
docs: remove figures
jokasimr Apr 9, 2025
1c92913
Merge branch 'polcal' of github.com:scipp/essreflectometry into polcal
jokasimr Apr 9, 2025
c5610b7
fix: use np.kron to construct calibration matrix
jokasimr Apr 25, 2025
0913455
deps: use latest sciline for new Scope
jokasimr Apr 25, 2025
4099486
fix: use dims arg to do concatenation
jokasimr Apr 28, 2025
f6764bb
refactor: implement container for polarization calibration parameters
jokasimr Apr 28, 2025
be37702
fix: better doc comment + fix typo
jokasimr Apr 28, 2025
76bcf3c
Merge remote-tracking branch 'origin/main' into polcal
jokasimr Apr 28, 2025
7d1753c
Merge branch 'main' into polcal
jokasimr Apr 28, 2025
ca28f99
fix: reimplement kron, numpy and scipp doesn't play nicely in this case
jokasimr Apr 29, 2025
e0db8f0
fix: don't assume only dimension of 1d reference is Q
jokasimr Apr 29, 2025
e72eb85
docs: add notebook and data for test case with simulated spin flip sa…
jokasimr Apr 29, 2025
dc36161
Update src/ess/estia/calibration.py
jokasimr Apr 30, 2025
3f7182b
Apply automatic formatting
pre-commit-ci-lite[bot] Apr 30, 2025
9aaf79d
docs: add new example notebook to index
jokasimr Apr 30, 2025
e801737
Merge branch 'polcal' of github.com:scipp/essreflectometry into polcal
jokasimr Apr 30, 2025
889ecc5
docs: fix hader
jokasimr Apr 30, 2025
8d071c7
docs: fix sample names
jokasimr Apr 30, 2025
8843f96
Merge remote-tracking branch 'origin/main' into polcal
jokasimr May 27, 2025
b6e0484
Merge remote-tracking branch 'origin/main' into polcal
jokasimr May 27, 2025
8be1834
ci: update pooch data
jokasimr May 27, 2025
9bafe51
fix: add Q approximation to reduced reference
jokasimr May 27, 2025
89c3293
docs: update example notebook
jokasimr Jun 2, 2025
280c6a9
refactor: remove old polarization implementation
jokasimr Jun 2, 2025
7e18c82
refactor: remove unused
jokasimr Jun 2, 2025
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
1 change: 1 addition & 0 deletions docs/user-guide/estia/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
maxdepth: 1
---
estia-mcstas-reduction
simulated-spin-flip-sample
```
419 changes: 419 additions & 0 deletions docs/user-guide/estia/simulated-spin-flip-sample.ipynb

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ dependencies = [
"graphviz",
"plopp",
"orsopy",
"sciline>=24.6.0",
"sciline>=25.4.1",
"scipp>=24.09.1", # Fixed new hist/bin API
"scippneutron>=24.7.0",
"scippnexus>=24.9.1",
"essreduce",
"esspolarization",
"pandas",
]

Expand Down
3 changes: 2 additions & 1 deletion requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ python-dateutil
graphviz
plopp
orsopy
sciline>=24.6.0
sciline>=25.4.1
scipp>=24.09.1
scippneutron>=24.7.0
scippnexus>=24.9.1
essreduce
esspolarization
pandas
40 changes: 24 additions & 16 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SHA1:e1f1193e2c78c1dda6ffc784197fb6babbad9245
# SHA1:1888e0e692750ba07b4d62e47028d8355dc46d3b
#
# This file was generated by pip-compile-multi.
# To update, run:
Expand All @@ -7,7 +7,7 @@
#
annotated-types==0.7.0
# via pydantic
click==8.2.0
click==8.2.1
# via dask
cloudpickle==3.1.1
# via dask
Expand All @@ -17,28 +17,34 @@ cyclebane==24.10.0
# via sciline
cycler==0.12.1
# via matplotlib
dask==2025.5.0
# via -r base.in
dask==2025.5.1
# via
# -r base.in
# esspolarization
dnspython==2.7.0
# via email-validator
email-validator==2.2.0
# via scippneutron
essreduce==25.5.1
esspolarization==25.3.0
# via -r base.in
essreduce==25.5.3
# via
# -r base.in
# esspolarization
fonttools==4.58.0
# via matplotlib
fsspec==2025.5.0
fsspec==2025.5.1
# via dask
graphviz==0.20.3
# via -r base.in
# via
# -r base.in
# esspolarization
h5py==3.13.0
# via
# scippneutron
# scippnexus
idna==3.10
# via email-validator
importlib-metadata==8.7.0
# via dask
kiwisolver==1.4.8
# via matplotlib
lazy-loader==0.4
Expand All @@ -51,13 +57,14 @@ matplotlib==3.10.3
# via
# mpltoolbox
# plopp
mpltoolbox==25.4.0
mpltoolbox==25.5.0
# via scippneutron
networkx==3.4.2
# via cyclebane
numpy==2.2.6
numpy==1.26.4
# via
# contourpy
# esspolarization
# h5py
# matplotlib
# pandas
Expand All @@ -81,7 +88,7 @@ plopp==25.5.0
# via
# -r base.in
# scippneutron
pydantic==2.11.4
pydantic==2.11.5
# via scippneutron
pydantic-core==2.33.2
# via pydantic
Expand All @@ -100,13 +107,15 @@ pyyaml==6.0.2
# via
# dask
# orsopy
sciline==25.5.1
sciline==25.5.2
# via
# -r base.in
# esspolarization
# essreduce
scipp==25.5.0
# via
# -r base.in
# esspolarization
# essreduce
# scippneutron
# scippnexus
Expand All @@ -121,6 +130,7 @@ scippnexus==25.4.0
# scippneutron
scipy==1.15.3
# via
# esspolarization
# scippneutron
# scippnexus
six==1.17.0
Expand All @@ -135,9 +145,7 @@ typing-extensions==4.13.2
# pydantic-core
# sciline
# typing-inspection
typing-inspection==0.4.0
typing-inspection==0.4.1
# via pydantic
tzdata==2025.2
# via pandas
zipp==3.21.0
# via importlib-metadata
6 changes: 0 additions & 6 deletions requirements/basetest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ certifi==2025.4.26
# via requests
charset-normalizer==3.4.2
# via requests
exceptiongroup==1.3.0
# via pytest
idna==3.10
# via requests
iniconfig==2.1.0
Expand All @@ -29,9 +27,5 @@ pytest==8.3.5
# via -r basetest.in
requests==2.32.3
# via pooch
tomli==2.2.1
# via pytest
typing-extensions==4.13.2
# via exceptiongroup
urllib3==2.4.0
# via requests
8 changes: 1 addition & 7 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# requirements upgrade
#
cachetools==5.5.2
cachetools==6.0.0
# via tox
certifi==2025.4.26
# via requests
Expand Down Expand Up @@ -44,14 +44,8 @@ requests==2.32.3
# via -r ci.in
smmap==5.0.2
# via gitdb
tomli==2.2.1
# via
# pyproject-api
# tox
tox==4.26.0
# via -r ci.in
typing-extensions==4.13.2
# via tox
urllib3==2.4.0
# via requests
virtualenv==20.31.2
Expand Down
2 changes: 1 addition & 1 deletion requirements/dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
-r test.in
-r wheels.in
copier
jupyterlab
jupyterlab>=4.4.3
pip-compile-multi
pre-commit
8 changes: 4 additions & 4 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SHA1:efd19a3a98c69fc3d6d6233ed855de7e4a208f74
# SHA1:d4ffe53db30990b73c1af821d46399aafea47d77
#
# This file was generated by pip-compile-multi.
# To update, run:
Expand Down Expand Up @@ -48,7 +48,7 @@ json5==0.12.0
# via jupyterlab-server
jsonpointer==3.0.0
# via jsonschema
jsonschema[format-nongpl]==4.23.0
jsonschema[format-nongpl]==4.24.0
# via
# jupyter-events
# jupyterlab-server
Expand All @@ -65,7 +65,7 @@ jupyter-server==2.16.0
# notebook-shim
jupyter-server-terminals==0.5.3
# via jupyter-server
jupyterlab==4.4.2
jupyterlab==4.4.3
# via -r dev.in
jupyterlab-server==2.27.3
# via jupyterlab
Expand All @@ -75,7 +75,7 @@ overrides==7.7.0
# via jupyter-server
pathspec==0.12.1
# via copier
pip-compile-multi==3.0.0
pip-compile-multi==3.1.0
# via -r dev.in
pip-tools==7.4.1
# via pip-compile-multi
Expand Down
19 changes: 9 additions & 10 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ beautifulsoup4==4.13.4
# pydata-sphinx-theme
bleach[css]==6.2.0
# via nbconvert
bqplot==0.12.44
bqplot==0.12.45
# via ipydatagrid
certifi==2025.4.26
# via requests
Expand All @@ -48,8 +48,6 @@ docutils==0.21.2
# nbsphinx
# pydata-sphinx-theme
# sphinx
exceptiongroup==1.3.0
# via ipython
executing==2.2.0
# via stack-data
fastjsonschema==2.21.1
Expand All @@ -64,12 +62,14 @@ ipykernel==6.29.5
# via -r docs.in
ipympl==0.9.7
# via -r docs.in
ipython==8.36.0
ipython==9.2.0
# via
# -r docs.in
# ipykernel
# ipympl
# ipywidgets
ipython-pygments-lexers==1.1.1
# via ipython
ipytree==0.2.2
# via -r docs.in
ipywidgets==8.1.7
Expand All @@ -87,15 +87,15 @@ jinja2==3.1.6
# nbconvert
# nbsphinx
# sphinx
jsonschema==4.23.0
jsonschema==4.24.0
# via nbformat
jsonschema-specifications==2025.4.1
# via jsonschema
jupyter-client==8.6.3
# via
# ipykernel
# nbclient
jupyter-core==5.7.2
jupyter-core==5.8.1
# via
# ipykernel
# jupyter-client
Expand Down Expand Up @@ -167,6 +167,7 @@ pygments==2.19.1
# via
# accessible-pygments
# ipython
# ipython-pygments-lexers
# nbconvert
# pydata-sphinx-theme
# sphinx
Expand All @@ -182,7 +183,7 @@ requests==2.32.3
# via
# pooch
# sphinx
rpds-py==0.25.0
rpds-py==0.25.1
# via
# jsonschema
# referencing
Expand Down Expand Up @@ -221,9 +222,7 @@ stack-data==0.6.3
# via ipython
tinycss2==1.4.0
# via bleach
tomli==2.2.1
# via sphinx
tornado==6.5
tornado==6.5.1
# via
# ipykernel
# jupyter-client
Expand Down
1 change: 1 addition & 0 deletions requirements/nightly.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ python-dateutil
graphviz
orsopy
essreduce
esspolarization
pandas
pytest
pooch
Expand Down
Loading
Loading