essdiffraction 26.8.1__tar.gz → 26.10.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {essdiffraction-26.8.1/src/essdiffraction.egg-info → essdiffraction-26.10.0}/PKG-INFO +5 -2
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/api-reference/index.md +18 -3
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/user-guide/beer/beer_modulation_mcstas.ipynb +12 -12
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/user-guide/beer/beer_powder_mcstas_analytical.ipynb +7 -6
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/pyproject.toml +3 -1
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/beer/__init__.py +4 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/beer/mcstas/__init__.py +2 -4
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/beer/mcstas/load.py +101 -55
- essdiffraction-26.10.0/src/ess/beer/workflow.py +221 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/dream/beamline.py +109 -113
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/dream/workflows.py +2 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/powder/__init__.py +2 -0
- essdiffraction-26.10.0/src/ess/powder/binning.py +70 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/powder/calibration.py +19 -4
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/powder/conversion.py +14 -0
- essdiffraction-26.10.0/src/ess/powder/grouping.py +264 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/powder/types.py +17 -1
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/snspowder/powgen/workflow.py +2 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0/src/essdiffraction.egg-info}/PKG-INFO +5 -2
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/essdiffraction.egg-info/SOURCES.txt +3 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/essdiffraction.egg-info/requires.txt +5 -1
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/essdiffraction.egg-info/scm_file_list.json +3 -0
- essdiffraction-26.10.0/src/essdiffraction.egg-info/scm_version.json +8 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/tests/beer/mcstas_reduction_test.py +139 -23
- essdiffraction-26.10.0/tests/powder/binning_test.py +79 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/tests/powder/conversion_test.py +32 -1
- essdiffraction-26.10.0/tests/powder/grouping_test.py +150 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/tests/snspowder/powgen/powgen_reduction_test.py +1 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/tools/docs/beer-thumbnails.ipynb +2 -2
- essdiffraction-26.8.1/src/ess/beer/workflow.py +0 -162
- essdiffraction-26.8.1/src/ess/powder/grouping.py +0 -141
- essdiffraction-26.8.1/src/essdiffraction.egg-info/scm_version.json +0 -8
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/LICENSE +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/README.md +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/_static/anaconda-icon.js +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/_static/essdiffraction-search-logo.png +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/_static/favicon.svg +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/_static/logo-dark.svg +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/_static/logo.svg +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/_static/thumbnails/beer_mcstas_dark.svg +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/_static/thumbnails/beer_mcstas_light.svg +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/_static/thumbnails/beer_powder_reduction_dark.svg +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/_static/thumbnails/beer_powder_reduction_light.svg +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/_static/thumbnails/dream_advanced_powder_reduction_dark.svg +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/_static/thumbnails/dream_advanced_powder_reduction_light.svg +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/_static/thumbnails/dream_basic_powder_reduction_dark.svg +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/_static/thumbnails/dream_basic_powder_reduction_light.svg +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/_templates/class-template.rst +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/_templates/doc_version.html +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/_templates/layout.html +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/_templates/module-template.rst +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/about/bibliography.rst +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/about/index.md +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/bibliography.bib +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/conf.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/developer/coding-conventions.md +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/developer/dependency-management.md +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/developer/getting-started.md +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/developer/index.md +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/index.md +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/user-guide/beer/index.md +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/user-guide/common/index.md +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/user-guide/common/vanadium_processing.ipynb +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/user-guide/dream/dream-advanced-powder-reduction.ipynb +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/user-guide/dream/dream-detector-diagnostics.ipynb +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/user-guide/dream/dream-instrument-view.ipynb +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/user-guide/dream/dream-make-wavelength-lookup-table.ipynb +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/user-guide/dream/dream-powder-reduction.ipynb +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/user-guide/dream/dream-visualize-absorption.ipynb +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/user-guide/dream/index.md +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/user-guide/dream/workflow-widget-dream.ipynb +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/user-guide/index.md +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/user-guide/installation.md +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/user-guide/magic/index.md +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/user-guide/sns-instruments/POWGEN_data_reduction.ipynb +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/user-guide/sns-instruments/index.md +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/resources/logo.svg +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/setup.cfg +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/beer/clustering.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/beer/conversions.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/beer/data.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/beer/io.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/beer/mcstas/beamline.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/beer/peakfinding.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/beer/types.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/diffraction/__init__.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/diffraction/pdf.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/diffraction/peaks.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/diffraction/py.typed +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/dream/__init__.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/dream/data.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/dream/diagnostics.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/dream/instrument_view.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/dream/io/__init__.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/dream/io/_common.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/dream/io/cif.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/dream/io/geant4.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/dream/io/xye.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/dream/parameters.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/dream/py.typed +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/magic/__init__.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/magic/beamline.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/magic/data.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/magic/types.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/magic/workflow.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/powder/_util.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/powder/correction.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/powder/filtering.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/powder/logging.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/powder/masking.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/powder/py.typed +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/powder/smoothing.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/powder/workflow.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/snspowder/powgen/__init__.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/snspowder/powgen/beamline.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/snspowder/powgen/calibration.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/snspowder/powgen/data.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/snspowder/powgen/instrument_view.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/ess/snspowder/powgen/peaks.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/essdiffraction.egg-info/dependency_links.txt +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/src/essdiffraction.egg-info/top_level.txt +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/tests/beer/mcstas_beamline_test.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/tests/conftest.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/tests/diffraction/pdf_test.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/tests/diffraction/peaks_test.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/tests/dream/diagnostics_test.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/tests/dream/geant4_reduction_test.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/tests/dream/instrument_view_test.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/tests/dream/io/cif_test.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/tests/dream/io/geant4_test.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/tests/dream/workflows/dream_generic_workflow_test.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/tests/magic/workflow_test.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/tests/package_test.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/tests/powder/correction_test.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/tests/powder/filtering_test.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/tests/snspowder/powgen/load_test.py +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/tools/docs/dream-thumbnails.ipynb +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/tools/preprocess_pg3_files.ipynb +0 -0
- {essdiffraction-26.8.1 → essdiffraction-26.10.0}/tools/shrink_nexus.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: essdiffraction
|
|
3
|
-
Version: 26.
|
|
3
|
+
Version: 26.10.0
|
|
4
4
|
Summary: Diffraction data reduction for the European Spallation Source
|
|
5
5
|
Author: Scipp contributors
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -22,7 +22,7 @@ Description-Content-Type: text/markdown
|
|
|
22
22
|
License-File: LICENSE
|
|
23
23
|
Requires-Dist: dask>=2022.1.0
|
|
24
24
|
Requires-Dist: graphviz>=0.20
|
|
25
|
-
Requires-Dist: essreduce>=26.6.
|
|
25
|
+
Requires-Dist: essreduce>=26.6.1
|
|
26
26
|
Requires-Dist: mcstastox>=0.0.11
|
|
27
27
|
Requires-Dist: numpy>=2
|
|
28
28
|
Requires-Dist: plopp>=26.5.0
|
|
@@ -30,6 +30,7 @@ Requires-Dist: tof>=25.12.0
|
|
|
30
30
|
Requires-Dist: ncrystal[cif]>=4.1.0
|
|
31
31
|
Requires-Dist: spglib!=2.7,>=2.0.0
|
|
32
32
|
Provides-Extra: test
|
|
33
|
+
Requires-Dist: numba>=0.63; extra == "test"
|
|
33
34
|
Requires-Dist: pandas>=2.1.2; extra == "test"
|
|
34
35
|
Requires-Dist: pooch>=1.5; extra == "test"
|
|
35
36
|
Requires-Dist: pytest>=9.0; extra == "test"
|
|
@@ -53,6 +54,8 @@ Requires-Dist: sphinx-design>=0.5.0; extra == "docs"
|
|
|
53
54
|
Requires-Dist: sphinxcontrib-bibtex>=2.5.0; extra == "docs"
|
|
54
55
|
Requires-Dist: pyarrow>=12.0.0; extra == "docs"
|
|
55
56
|
Requires-Dist: pythreejs>=2.4.1; extra == "docs"
|
|
57
|
+
Provides-Extra: all
|
|
58
|
+
Requires-Dist: essdiffraction[docs,test]; extra == "all"
|
|
56
59
|
Dynamic: license-file
|
|
57
60
|
|
|
58
61
|
[](CODE_OF_CONDUCT.md)
|
|
@@ -120,15 +120,30 @@
|
|
|
120
120
|
```{eval-rst}
|
|
121
121
|
.. currentmodule:: ess.beer
|
|
122
122
|
|
|
123
|
+
.. autosummary::
|
|
124
|
+
:toctree: ../generated/functions
|
|
125
|
+
|
|
126
|
+
BeerModulationAutoMcStasWorkflow
|
|
127
|
+
BeerModulationKnownPeaksMcStasWorkflow
|
|
128
|
+
BeerPowderWorkflow
|
|
129
|
+
BeerPowderMcStasWorkflow
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Deprecated workflows
|
|
133
|
+
|
|
134
|
+
These names remain available for existing code. Use the replacement named in each
|
|
135
|
+
function's documentation and deprecation warning.
|
|
136
|
+
|
|
137
|
+
```{eval-rst}
|
|
138
|
+
.. currentmodule:: ess.beer
|
|
139
|
+
|
|
123
140
|
.. autosummary::
|
|
124
141
|
:toctree: ../generated/functions
|
|
125
142
|
|
|
126
143
|
BeerMcStasWorkflowPulseShaping
|
|
127
|
-
BeerModMcStasWorkflowKnownPeaks
|
|
128
144
|
BeerModMcStasWorkflow
|
|
129
|
-
|
|
145
|
+
BeerModMcStasWorkflowKnownPeaks
|
|
130
146
|
BeerPowderWorkflowAnalytical
|
|
131
|
-
BeerPowderMcStasWorkflow
|
|
132
147
|
```
|
|
133
148
|
|
|
134
149
|
### Top-level functions
|
{essdiffraction-26.8.1 → essdiffraction-26.10.0}/docs/user-guide/beer/beer_modulation_mcstas.ipynb
RENAMED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"%matplotlib ipympl\n",
|
|
19
19
|
"import plopp as pp\n",
|
|
20
20
|
"\n",
|
|
21
|
-
"from ess.beer import
|
|
21
|
+
"from ess.beer import BeerModulationAutoMcStasWorkflow, BeerModulationKnownPeaksMcStasWorkflow\n",
|
|
22
22
|
"from ess.beer.data import mcstas_silicon_new_model, silicon_peaks_array\n",
|
|
23
23
|
"from ess.beer.types import *\n",
|
|
24
24
|
"from ess.powder.types import *\n",
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
"metadata": {},
|
|
166
166
|
"outputs": [],
|
|
167
167
|
"source": [
|
|
168
|
-
"wf =
|
|
168
|
+
"wf = BeerModulationKnownPeaksMcStasWorkflow()\n",
|
|
169
169
|
"wf[DetectorBank] = DetectorBank.north\n",
|
|
170
170
|
"wf[Filename[SampleRun]] = mcstas_silicon_new_model(7)\n",
|
|
171
171
|
"wf[DHKLList] = silicon_peaks_array()\n",
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
"metadata": {},
|
|
219
219
|
"outputs": [],
|
|
220
220
|
"source": [
|
|
221
|
-
"wf =
|
|
221
|
+
"wf = BeerModulationAutoMcStasWorkflow()\n",
|
|
222
222
|
"wf[Filename[SampleRun]] = mcstas_silicon_new_model(7)\n",
|
|
223
223
|
"\n",
|
|
224
224
|
"results = {}\n",
|
|
@@ -279,7 +279,7 @@
|
|
|
279
279
|
"metadata": {},
|
|
280
280
|
"outputs": [],
|
|
281
281
|
"source": [
|
|
282
|
-
"wf =
|
|
282
|
+
"wf = BeerModulationKnownPeaksMcStasWorkflow()\n",
|
|
283
283
|
"wf[DetectorBank] = DetectorBank.south\n",
|
|
284
284
|
"wf[Filename[SampleRun]] = mcstas_silicon_new_model(8)\n",
|
|
285
285
|
"wf[DHKLList] = silicon_peaks_array()\n",
|
|
@@ -328,7 +328,7 @@
|
|
|
328
328
|
"metadata": {},
|
|
329
329
|
"outputs": [],
|
|
330
330
|
"source": [
|
|
331
|
-
"wf =
|
|
331
|
+
"wf = BeerModulationAutoMcStasWorkflow()\n",
|
|
332
332
|
"wf[Filename[SampleRun]] = mcstas_silicon_new_model(8)\n",
|
|
333
333
|
"\n",
|
|
334
334
|
"results = {}\n",
|
|
@@ -389,7 +389,7 @@
|
|
|
389
389
|
"metadata": {},
|
|
390
390
|
"outputs": [],
|
|
391
391
|
"source": [
|
|
392
|
-
"wf =
|
|
392
|
+
"wf = BeerModulationKnownPeaksMcStasWorkflow()\n",
|
|
393
393
|
"wf[DetectorBank] = DetectorBank.south\n",
|
|
394
394
|
"wf[Filename[SampleRun]] = mcstas_silicon_new_model(9)\n",
|
|
395
395
|
"wf[DHKLList] = silicon_peaks_array()\n",
|
|
@@ -438,7 +438,7 @@
|
|
|
438
438
|
"metadata": {},
|
|
439
439
|
"outputs": [],
|
|
440
440
|
"source": [
|
|
441
|
-
"wf =
|
|
441
|
+
"wf = BeerModulationAutoMcStasWorkflow()\n",
|
|
442
442
|
"wf[Filename[SampleRun]] = mcstas_silicon_new_model(9)\n",
|
|
443
443
|
"\n",
|
|
444
444
|
"results = {}\n",
|
|
@@ -499,7 +499,7 @@
|
|
|
499
499
|
"metadata": {},
|
|
500
500
|
"outputs": [],
|
|
501
501
|
"source": [
|
|
502
|
-
"wf =
|
|
502
|
+
"wf = BeerModulationKnownPeaksMcStasWorkflow()\n",
|
|
503
503
|
"wf[DetectorBank] = DetectorBank.south\n",
|
|
504
504
|
"wf[Filename[SampleRun]] = mcstas_silicon_new_model(10)\n",
|
|
505
505
|
"wf[DHKLList] = silicon_peaks_array()\n",
|
|
@@ -548,7 +548,7 @@
|
|
|
548
548
|
"metadata": {},
|
|
549
549
|
"outputs": [],
|
|
550
550
|
"source": [
|
|
551
|
-
"wf =
|
|
551
|
+
"wf = BeerModulationAutoMcStasWorkflow()\n",
|
|
552
552
|
"wf[Filename[SampleRun]] = mcstas_silicon_new_model(10)\n",
|
|
553
553
|
"\n",
|
|
554
554
|
"results = {}\n",
|
|
@@ -609,7 +609,7 @@
|
|
|
609
609
|
"metadata": {},
|
|
610
610
|
"outputs": [],
|
|
611
611
|
"source": [
|
|
612
|
-
"wf =
|
|
612
|
+
"wf = BeerModulationKnownPeaksMcStasWorkflow()\n",
|
|
613
613
|
"wf[DetectorBank] = DetectorBank.south\n",
|
|
614
614
|
"wf[Filename[SampleRun]] = mcstas_silicon_new_model(16)\n",
|
|
615
615
|
"wf[DHKLList] = silicon_peaks_array()\n",
|
|
@@ -658,7 +658,7 @@
|
|
|
658
658
|
"metadata": {},
|
|
659
659
|
"outputs": [],
|
|
660
660
|
"source": [
|
|
661
|
-
"wf =
|
|
661
|
+
"wf = BeerModulationAutoMcStasWorkflow()\n",
|
|
662
662
|
"wf[Filename[SampleRun]] = mcstas_silicon_new_model(16)\n",
|
|
663
663
|
"\n",
|
|
664
664
|
"results = {}\n",
|
|
@@ -713,7 +713,7 @@
|
|
|
713
713
|
"name": "python",
|
|
714
714
|
"nbconvert_exporter": "python",
|
|
715
715
|
"pygments_lexer": "ipython3",
|
|
716
|
-
"version": "3.
|
|
716
|
+
"version": "3.12.13"
|
|
717
717
|
}
|
|
718
718
|
},
|
|
719
719
|
"nbformat": 4,
|
|
@@ -80,7 +80,12 @@
|
|
|
80
80
|
"outputs": [],
|
|
81
81
|
"source": [
|
|
82
82
|
"workflow[DetectorBank] = DetectorBank.north\n",
|
|
83
|
-
"
|
|
83
|
+
"\n",
|
|
84
|
+
"# Select the number of dspacing bins.\n",
|
|
85
|
+
"# By default the range of `DspacingBins` (the binning in dspacing) is\n",
|
|
86
|
+
"# selected to be the dspacing range covered by the instrument.\n",
|
|
87
|
+
"workflow[DspacingNBins] = 1000\n",
|
|
88
|
+
"workflow.compute(DspacingBins)"
|
|
84
89
|
]
|
|
85
90
|
},
|
|
86
91
|
{
|
|
@@ -198,8 +203,6 @@
|
|
|
198
203
|
" title=\"Intensity over dspacing\",\n",
|
|
199
204
|
" xlabel=r\"$d$-spacing [$\\AA$]\",\n",
|
|
200
205
|
" ylabel=f\"Intensity [{histogram.unit}]\",\n",
|
|
201
|
-
" xmin=sc.scalar(0.6, unit=\"angstrom\"),\n",
|
|
202
|
-
" xmax=sc.scalar(2.0, unit=\"angstrom\"),\n",
|
|
203
206
|
")\n",
|
|
204
207
|
"\n",
|
|
205
208
|
"ymin, ymax = fig.ax.get_ylim()\n",
|
|
@@ -308,8 +311,6 @@
|
|
|
308
311
|
" },\n",
|
|
309
312
|
" xlabel=r\"$d$-spacing [$\\AA$]\",\n",
|
|
310
313
|
" ylabel=f\"Intensity [{histogram.unit}]\",\n",
|
|
311
|
-
" xmin=sc.scalar(0.6, unit=\"angstrom\"),\n",
|
|
312
|
-
" xmax=sc.scalar(2.0, unit=\"angstrom\"),\n",
|
|
313
314
|
")\n",
|
|
314
315
|
"\n",
|
|
315
316
|
"ymin, ymax = fig.ax.get_ylim()\n",
|
|
@@ -337,7 +338,7 @@
|
|
|
337
338
|
"name": "python",
|
|
338
339
|
"nbconvert_exporter": "python",
|
|
339
340
|
"pygments_lexer": "ipython3",
|
|
340
|
-
"version": "3.
|
|
341
|
+
"version": "3.12.13"
|
|
341
342
|
}
|
|
342
343
|
},
|
|
343
344
|
"nbformat": 4,
|
|
@@ -31,7 +31,7 @@ requires-python = ">=3.12"
|
|
|
31
31
|
dependencies = [
|
|
32
32
|
"dask>=2022.1.0",
|
|
33
33
|
"graphviz>=0.20",
|
|
34
|
-
"essreduce>=26.6.
|
|
34
|
+
"essreduce>=26.6.1",
|
|
35
35
|
"mcstastox>=0.0.11",
|
|
36
36
|
"numpy>=2",
|
|
37
37
|
"plopp>=26.5.0",
|
|
@@ -44,6 +44,7 @@ dynamic = ["version"]
|
|
|
44
44
|
|
|
45
45
|
[project.optional-dependencies]
|
|
46
46
|
test = [
|
|
47
|
+
"numba>=0.63",
|
|
47
48
|
"pandas>=2.1.2",
|
|
48
49
|
"pooch>=1.5",
|
|
49
50
|
"pytest>=9.0",
|
|
@@ -71,6 +72,7 @@ docs = [
|
|
|
71
72
|
"pyarrow>=12.0.0",
|
|
72
73
|
"pythreejs>=2.4.1",
|
|
73
74
|
]
|
|
75
|
+
all = ["essdiffraction[test,docs]"]
|
|
74
76
|
|
|
75
77
|
[project.urls]
|
|
76
78
|
"Bug Tracker" = "https://github.com/scipp/ess/issues"
|
|
@@ -13,6 +13,8 @@ from .workflow import (
|
|
|
13
13
|
BeerMcStasWorkflowPulseShaping,
|
|
14
14
|
BeerModMcStasWorkflow,
|
|
15
15
|
BeerModMcStasWorkflowKnownPeaks,
|
|
16
|
+
BeerModulationAutoMcStasWorkflow,
|
|
17
|
+
BeerModulationKnownPeaksMcStasWorkflow,
|
|
16
18
|
BeerPowderMcStasWorkflow,
|
|
17
19
|
BeerPowderWorkflow,
|
|
18
20
|
BeerPowderWorkflowAnalytical,
|
|
@@ -30,6 +32,8 @@ __all__ = [
|
|
|
30
32
|
'BeerMcStasWorkflowPulseShaping',
|
|
31
33
|
'BeerModMcStasWorkflow',
|
|
32
34
|
'BeerModMcStasWorkflowKnownPeaks',
|
|
35
|
+
'BeerModulationAutoMcStasWorkflow',
|
|
36
|
+
'BeerModulationKnownPeaksMcStasWorkflow',
|
|
33
37
|
'BeerPowderMcStasWorkflow',
|
|
34
38
|
'BeerPowderWorkflow',
|
|
35
39
|
'BeerPowderWorkflowAnalytical',
|
|
@@ -11,9 +11,8 @@ from .beamline import (
|
|
|
11
11
|
from .load import (
|
|
12
12
|
chopper_mode_from_mcstas_mode,
|
|
13
13
|
load_beer_mcstas,
|
|
14
|
+
load_beer_mcstas_geometry,
|
|
14
15
|
load_beer_mcstas_monitor,
|
|
15
|
-
load_beer_mcstas_monitor_provider,
|
|
16
|
-
load_beer_mcstas_provider,
|
|
17
16
|
mcstas_choppers,
|
|
18
17
|
mcstas_detector_ltotal,
|
|
19
18
|
mcstas_providers,
|
|
@@ -26,9 +25,8 @@ __all__ = [
|
|
|
26
25
|
'PulseShapingMode',
|
|
27
26
|
'chopper_mode_from_mcstas_mode',
|
|
28
27
|
'load_beer_mcstas',
|
|
28
|
+
'load_beer_mcstas_geometry',
|
|
29
29
|
'load_beer_mcstas_monitor',
|
|
30
|
-
'load_beer_mcstas_monitor_provider',
|
|
31
|
-
'load_beer_mcstas_provider',
|
|
32
30
|
'mcstas_choppers',
|
|
33
31
|
'mcstas_detector_ltotal',
|
|
34
32
|
'mcstas_providers',
|
|
@@ -7,7 +7,7 @@ from pathlib import Path
|
|
|
7
7
|
import mcstastox
|
|
8
8
|
import scipp as sc
|
|
9
9
|
import scippnexus as snx
|
|
10
|
-
from ess.powder.types import CaveMonitor, RunType, WavelengthMonitor
|
|
10
|
+
from ess.powder.types import CaveMonitor, EmptyDetector, RunType, WavelengthMonitor
|
|
11
11
|
|
|
12
12
|
from ess.reduce.nexus.types import DiskChoppers, Position
|
|
13
13
|
from ess.reduce.unwrap.types import DetectorLtotal
|
|
@@ -24,9 +24,8 @@ _MCSTAS_T_OFFSET = sc.scalar(1.6, unit='ms')
|
|
|
24
24
|
__all__ = [
|
|
25
25
|
'chopper_mode_from_mcstas_mode',
|
|
26
26
|
'load_beer_mcstas',
|
|
27
|
+
'load_beer_mcstas_geometry',
|
|
27
28
|
'load_beer_mcstas_monitor',
|
|
28
|
-
'load_beer_mcstas_monitor_provider',
|
|
29
|
-
'load_beer_mcstas_provider',
|
|
30
29
|
'mcstas_choppers',
|
|
31
30
|
'mcstas_detector_ltotal',
|
|
32
31
|
'mcstas_providers',
|
|
@@ -62,6 +61,25 @@ def _detector_components(data: mcstastox.Read, bank: DetectorBank) -> list[str]:
|
|
|
62
61
|
)
|
|
63
62
|
|
|
64
63
|
|
|
64
|
+
def _load_position_table(data: mcstastox.Read, components: list[str]) -> sc.DataArray:
|
|
65
|
+
"""Load pixel positions for selected detector components."""
|
|
66
|
+
position_tables = []
|
|
67
|
+
for component in components:
|
|
68
|
+
positions = data.get_component_global(component)
|
|
69
|
+
begin, end = data.pixel_range[component]
|
|
70
|
+
position_tables.append(
|
|
71
|
+
sc.DataArray(
|
|
72
|
+
sc.vectors(dims=['pixel_id'], values=positions, unit='m'),
|
|
73
|
+
coords={
|
|
74
|
+
'pixel_id': sc.arange(
|
|
75
|
+
'pixel_id', int(begin), int(end) + 1, dtype='int32'
|
|
76
|
+
)
|
|
77
|
+
},
|
|
78
|
+
)
|
|
79
|
+
)
|
|
80
|
+
return sc.sort(sc.concat(position_tables, dim='pixel_id'), key='pixel_id')
|
|
81
|
+
|
|
82
|
+
|
|
65
83
|
def _load_events(data: mcstastox.Read, components: list[str]) -> sc.DataArray:
|
|
66
84
|
"""Load weighted events and pixel positions for selected components only.
|
|
67
85
|
|
|
@@ -86,34 +104,23 @@ def _load_events(data: mcstastox.Read, components: list[str]) -> sc.DataArray:
|
|
|
86
104
|
),
|
|
87
105
|
't': sc.array(dims=['events'], values=event_data['t'], unit='s'),
|
|
88
106
|
},
|
|
89
|
-
)
|
|
90
|
-
|
|
91
|
-
position_tables = []
|
|
92
|
-
for component in components:
|
|
93
|
-
positions = data.get_component_global(component)
|
|
94
|
-
begin, end = data.pixel_range[component]
|
|
95
|
-
position_tables.append(
|
|
96
|
-
sc.DataArray(
|
|
97
|
-
sc.vectors(dims=['pixel_id'], values=positions, unit='m'),
|
|
98
|
-
coords={
|
|
99
|
-
'pixel_id': sc.arange(
|
|
100
|
-
'pixel_id', int(begin), int(end) + 1, dtype='int32'
|
|
101
|
-
)
|
|
102
|
-
},
|
|
103
|
-
)
|
|
104
|
-
)
|
|
107
|
+
)
|
|
105
108
|
|
|
106
|
-
position_table =
|
|
107
|
-
events.coords['
|
|
108
|
-
|
|
109
|
-
)[events.coords['pixel_id']]
|
|
109
|
+
position_table = _load_position_table(data, components)
|
|
110
|
+
events = events.group(position_table.coords['pixel_id'])
|
|
111
|
+
events.coords['position'] = position_table.data
|
|
110
112
|
return events
|
|
111
113
|
|
|
112
114
|
|
|
115
|
+
def _load_mode(data: mcstastox.Read) -> str:
|
|
116
|
+
mode = data.file['entry1/simulation/Param/mode'][0]
|
|
117
|
+
return mode.decode() if isinstance(mode, bytes) else str(mode)
|
|
118
|
+
|
|
119
|
+
|
|
113
120
|
def load_beer_mcstas(
|
|
114
|
-
filename:
|
|
121
|
+
filename: Filename[RunType],
|
|
115
122
|
bank: DetectorBank,
|
|
116
|
-
) ->
|
|
123
|
+
) -> RawDetector[RunType]:
|
|
117
124
|
"""Load a detector bank from a BEER McStas file."""
|
|
118
125
|
if not isinstance(bank, DetectorBank):
|
|
119
126
|
raise ValueError(
|
|
@@ -122,25 +129,64 @@ def load_beer_mcstas(
|
|
|
122
129
|
)
|
|
123
130
|
|
|
124
131
|
if bank == DetectorBank.both:
|
|
125
|
-
return
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
132
|
+
return RawDetector[RunType](
|
|
133
|
+
sc.concat(
|
|
134
|
+
[
|
|
135
|
+
load_beer_mcstas(filename, bank)
|
|
136
|
+
for bank in (DetectorBank.south, DetectorBank.north)
|
|
137
|
+
],
|
|
138
|
+
dim='pixel_id',
|
|
139
|
+
)
|
|
131
140
|
)
|
|
132
141
|
|
|
133
142
|
filename = Path(filename)
|
|
134
143
|
with mcstastox.Read(filename.parent, filename.name) as data:
|
|
135
|
-
mode = data
|
|
136
|
-
mode = mode.decode() if isinstance(mode, bytes) else str(mode)
|
|
144
|
+
mode = _load_mode(data)
|
|
137
145
|
events = _load_events(data, _detector_components(data, bank))
|
|
138
146
|
|
|
139
147
|
events.coords['mode'] = sc.scalar(mode)
|
|
140
148
|
events.bins.coords['event_time_offset'] = (
|
|
141
149
|
events.bins.coords.pop('t') + _MCSTAS_T_OFFSET.to(unit='s')
|
|
142
150
|
) % sc.scalar(1 / 14, unit='s')
|
|
143
|
-
return events
|
|
151
|
+
return RawDetector[RunType](events)
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
def load_beer_mcstas_geometry(
|
|
155
|
+
filename: Filename[RunType],
|
|
156
|
+
bank: DetectorBank,
|
|
157
|
+
) -> EmptyDetector[RunType]:
|
|
158
|
+
"""Load detector geometry from a BEER McStas file without loading events."""
|
|
159
|
+
if not isinstance(bank, DetectorBank):
|
|
160
|
+
raise ValueError(
|
|
161
|
+
'bank must be ``DetectorBank.north``, '
|
|
162
|
+
'``DetectorBank.south``, or ``DetectorBank.both``'
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
if bank == DetectorBank.both:
|
|
166
|
+
return EmptyDetector[RunType](
|
|
167
|
+
sc.concat(
|
|
168
|
+
[
|
|
169
|
+
load_beer_mcstas_geometry(filename, bank)
|
|
170
|
+
for bank in (DetectorBank.south, DetectorBank.north)
|
|
171
|
+
],
|
|
172
|
+
dim='pixel_id',
|
|
173
|
+
)
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
filename = Path(filename)
|
|
177
|
+
with mcstastox.Read(filename.parent, filename.name) as data:
|
|
178
|
+
positions = _load_position_table(data, _detector_components(data, bank))
|
|
179
|
+
|
|
180
|
+
pixel_id = positions.coords['pixel_id']
|
|
181
|
+
return EmptyDetector[RunType](
|
|
182
|
+
sc.DataArray(
|
|
183
|
+
pixel_id,
|
|
184
|
+
coords={
|
|
185
|
+
'pixel_id': pixel_id,
|
|
186
|
+
'position': positions.data,
|
|
187
|
+
},
|
|
188
|
+
)
|
|
189
|
+
)
|
|
144
190
|
|
|
145
191
|
|
|
146
192
|
def _to_edges(centers: sc.Variable) -> sc.Variable:
|
|
@@ -155,7 +201,9 @@ def _to_edges(centers: sc.Variable) -> sc.Variable:
|
|
|
155
201
|
)
|
|
156
202
|
|
|
157
203
|
|
|
158
|
-
def load_beer_mcstas_monitor(
|
|
204
|
+
def load_beer_mcstas_monitor(
|
|
205
|
+
filename: Filename[RunType],
|
|
206
|
+
) -> WavelengthMonitor[RunType, CaveMonitor]:
|
|
159
207
|
"""Load the BEER McStas wavelength monitor."""
|
|
160
208
|
filename = Path(filename)
|
|
161
209
|
with mcstastox.Read(filename.parent, filename.name) as data:
|
|
@@ -191,21 +239,7 @@ def load_beer_mcstas_monitor(filename: str | Path) -> sc.DataArray:
|
|
|
191
239
|
),
|
|
192
240
|
},
|
|
193
241
|
)
|
|
194
|
-
return da
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
def load_beer_mcstas_provider(
|
|
198
|
-
fname: Filename[RunType], bank: DetectorBank
|
|
199
|
-
) -> RawDetector[RunType]:
|
|
200
|
-
"""Sciline provider for loading BEER McStas detector data."""
|
|
201
|
-
return load_beer_mcstas(fname, bank)
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
def load_beer_mcstas_monitor_provider(
|
|
205
|
-
fname: Filename[RunType],
|
|
206
|
-
) -> WavelengthMonitor[RunType, CaveMonitor]:
|
|
207
|
-
"""Sciline provider for loading the BEER McStas wavelength monitor."""
|
|
208
|
-
return load_beer_mcstas_monitor(fname)
|
|
242
|
+
return WavelengthMonitor[RunType, CaveMonitor](da)
|
|
209
243
|
|
|
210
244
|
|
|
211
245
|
_MCSTAS_CHOPPER_MODES = {
|
|
@@ -287,22 +321,34 @@ def mcstas_choppers(
|
|
|
287
321
|
return simulation_choppers(mode, source_position)
|
|
288
322
|
|
|
289
323
|
|
|
324
|
+
def _mcstas_choppers_from_file(
|
|
325
|
+
fname: Filename[RunType],
|
|
326
|
+
source_position: Position[snx.NXsource, RunType],
|
|
327
|
+
) -> DiskChoppers[RunType]:
|
|
328
|
+
"""Return BEER choppers without loading detector events."""
|
|
329
|
+
fname = Path(fname)
|
|
330
|
+
with mcstastox.Read(fname.parent, fname.name) as data:
|
|
331
|
+
mode = chopper_mode_from_mcstas_mode(_load_mode(data))
|
|
332
|
+
return simulation_choppers(mode, source_position)
|
|
333
|
+
|
|
334
|
+
|
|
290
335
|
def mcstas_detector_ltotal(
|
|
291
|
-
|
|
336
|
+
detector: EmptyDetector[RunType],
|
|
292
337
|
source_position: Position[snx.NXsource, RunType],
|
|
293
338
|
sample_position: Position[snx.NXsample, RunType],
|
|
294
339
|
) -> DetectorLtotal[RunType]:
|
|
295
340
|
"""Return moderator-to-detector flight path lengths for BEER McStas data."""
|
|
296
341
|
source_to_sample = sc.norm(sample_position - source_position)
|
|
297
|
-
sample_to_detector = sc.norm(
|
|
342
|
+
sample_to_detector = sc.norm(detector.coords['position'] - sample_position)
|
|
298
343
|
return source_to_sample + sample_to_detector
|
|
299
344
|
|
|
300
345
|
|
|
301
346
|
mcstas_providers = (
|
|
302
|
-
|
|
303
|
-
|
|
347
|
+
load_beer_mcstas,
|
|
348
|
+
load_beer_mcstas_geometry,
|
|
349
|
+
load_beer_mcstas_monitor,
|
|
304
350
|
mcstas_source_position,
|
|
305
351
|
mcstas_sample_position,
|
|
306
|
-
|
|
352
|
+
_mcstas_choppers_from_file,
|
|
307
353
|
mcstas_detector_ltotal,
|
|
308
354
|
)
|