essdiffraction 25.5.1__tar.gz → 25.6.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.
Files changed (140) hide show
  1. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/.copier-answers.ess.yml +1 -1
  2. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/.github/ISSUE_TEMPLATE/high-level-requirement.yml +8 -0
  3. {essdiffraction-25.5.1/src/essdiffraction.egg-info → essdiffraction-25.6.0}/PKG-INFO +3 -3
  4. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/user-guide/common/vanadium_processing.ipynb +35 -44
  5. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/user-guide/dream/dream-advanced-powder-reduction.ipynb +25 -26
  6. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/pyproject.toml +2 -2
  7. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/requirements/base.in +2 -2
  8. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/requirements/base.txt +11 -11
  9. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/requirements/basetest.txt +2 -2
  10. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/requirements/ci.txt +3 -3
  11. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/requirements/dev.txt +5 -7
  12. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/requirements/docs.txt +5 -5
  13. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/requirements/mypy.txt +5 -3
  14. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/requirements/nightly.txt +9 -9
  15. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/requirements/static.txt +3 -3
  16. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/requirements/test.txt +2 -2
  17. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/requirements/wheels.txt +2 -2
  18. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/dream/beamline.py +11 -3
  19. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/dream/data.py +18 -2
  20. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/dream/workflow.py +33 -17
  21. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/powder/calibration.py +4 -2
  22. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/powder/conversion.py +11 -10
  23. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/powder/correction.py +52 -39
  24. essdiffraction-25.6.0/src/ess/powder/grouping.py +141 -0
  25. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/powder/masking.py +2 -2
  26. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/powder/types.py +21 -6
  27. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/snspowder/powgen/workflow.py +13 -2
  28. {essdiffraction-25.5.1 → essdiffraction-25.6.0/src/essdiffraction.egg-info}/PKG-INFO +3 -3
  29. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/essdiffraction.egg-info/requires.txt +2 -2
  30. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/tests/dream/geant4_reduction_test.py +4 -5
  31. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/tests/powder/correction_test.py +53 -43
  32. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/tests/snspowder/powgen/powgen_reduction_test.py +11 -4
  33. essdiffraction-25.5.1/src/ess/powder/grouping.py +0 -56
  34. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/.copier-answers.yml +0 -0
  35. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/.github/dependabot.yml +0 -0
  36. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/.github/workflows/ci.yml +0 -0
  37. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/.github/workflows/docs.yml +0 -0
  38. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/.github/workflows/nightly_at_main.yml +0 -0
  39. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/.github/workflows/nightly_at_release.yml +0 -0
  40. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/.github/workflows/python-version-ci +0 -0
  41. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/.github/workflows/release.yml +0 -0
  42. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/.github/workflows/test.yml +0 -0
  43. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/.github/workflows/unpinned.yml +0 -0
  44. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/.github/workflows/weekly_windows_macos.yml +0 -0
  45. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/.gitignore +0 -0
  46. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/.pre-commit-config.yaml +0 -0
  47. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/.python-version +0 -0
  48. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/CODE_OF_CONDUCT.md +0 -0
  49. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/CONTRIBUTING.md +0 -0
  50. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/LICENSE +0 -0
  51. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/MANIFEST.in +0 -0
  52. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/README.md +0 -0
  53. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/conda/meta.yaml +0 -0
  54. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/_static/anaconda-icon.js +0 -0
  55. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/_static/favicon.svg +0 -0
  56. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/_static/logo-dark.svg +0 -0
  57. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/_static/logo.svg +0 -0
  58. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/_static/thumbnails/dream_advanced_powder_reduction_dark.svg +0 -0
  59. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/_static/thumbnails/dream_advanced_powder_reduction_light.svg +0 -0
  60. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/_static/thumbnails/dream_basic_powder_reduction_dark.svg +0 -0
  61. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/_static/thumbnails/dream_basic_powder_reduction_light.svg +0 -0
  62. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/_templates/class-template.rst +0 -0
  63. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/_templates/doc_version.html +0 -0
  64. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/_templates/module-template.rst +0 -0
  65. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/about/bibliography.rst +0 -0
  66. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/about/index.md +0 -0
  67. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/api-reference/index.md +0 -0
  68. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/bibliography.bib +0 -0
  69. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/conf.py +0 -0
  70. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/developer/coding-conventions.md +0 -0
  71. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/developer/dependency-management.md +0 -0
  72. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/developer/getting-started.md +0 -0
  73. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/developer/index.md +0 -0
  74. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/index.md +0 -0
  75. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/user-guide/common/index.md +0 -0
  76. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/user-guide/dream/dream-detector-diagnostics.ipynb +0 -0
  77. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/user-guide/dream/dream-instrument-view.ipynb +0 -0
  78. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/user-guide/dream/dream-powder-reduction.ipynb +0 -0
  79. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/user-guide/dream/dream-visualize-absorption.ipynb +0 -0
  80. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/user-guide/dream/index.md +0 -0
  81. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/user-guide/dream/workflow-widget-dream.ipynb +0 -0
  82. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/user-guide/index.md +0 -0
  83. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/user-guide/installation.md +0 -0
  84. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/user-guide/sns-instruments/POWGEN_data_reduction.ipynb +0 -0
  85. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/docs/user-guide/sns-instruments/index.md +0 -0
  86. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/requirements/basetest.in +0 -0
  87. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/requirements/ci.in +0 -0
  88. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/requirements/dev.in +0 -0
  89. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/requirements/docs.in +0 -0
  90. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/requirements/make_base.py +0 -0
  91. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/requirements/mypy.in +0 -0
  92. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/requirements/nightly.in +0 -0
  93. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/requirements/static.in +0 -0
  94. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/requirements/test.in +0 -0
  95. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/requirements/wheels.in +0 -0
  96. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/resources/logo.svg +0 -0
  97. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/setup.cfg +0 -0
  98. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/diffraction/__init__.py +0 -0
  99. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/diffraction/py.typed +0 -0
  100. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/dream/__init__.py +0 -0
  101. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/dream/diagnostics.py +0 -0
  102. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/dream/instrument_view.py +0 -0
  103. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/dream/io/__init__.py +0 -0
  104. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/dream/io/cif.py +0 -0
  105. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/dream/io/geant4.py +0 -0
  106. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/dream/io/nexus.py +0 -0
  107. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/dream/parameters.py +0 -0
  108. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/dream/py.typed +0 -0
  109. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/powder/__init__.py +0 -0
  110. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/powder/_util.py +0 -0
  111. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/powder/filtering.py +0 -0
  112. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/powder/logging.py +0 -0
  113. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/powder/py.typed +0 -0
  114. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/powder/smoothing.py +0 -0
  115. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/powder/transform.py +0 -0
  116. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/snspowder/powgen/__init__.py +0 -0
  117. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/snspowder/powgen/beamline.py +0 -0
  118. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/snspowder/powgen/calibration.py +0 -0
  119. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/snspowder/powgen/data.py +0 -0
  120. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/snspowder/powgen/instrument_view.py +0 -0
  121. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/ess/snspowder/powgen/peaks.py +0 -0
  122. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/essdiffraction.egg-info/SOURCES.txt +0 -0
  123. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/essdiffraction.egg-info/dependency_links.txt +0 -0
  124. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/src/essdiffraction.egg-info/top_level.txt +0 -0
  125. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/tests/conftest.py +0 -0
  126. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/tests/dream/diagnostics_test.py +0 -0
  127. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/tests/dream/instrument_view_test.py +0 -0
  128. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/tests/dream/io/cif_test.py +0 -0
  129. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/tests/dream/io/geant4_test.py +0 -0
  130. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/tests/dream/io/nexus_test.py +0 -0
  131. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/tests/package_test.py +0 -0
  132. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/tests/powder/conversion_test.py +0 -0
  133. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/tests/powder/filtering_test.py +0 -0
  134. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/tests/powder/transform_test.py +0 -0
  135. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/tests/snspowder/powgen/load_test.py +0 -0
  136. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/tools/docs/dream-thumbnails.ipynb +0 -0
  137. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/tools/dream-make-tof-lookup-table.ipynb +0 -0
  138. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/tools/preprocess_pg3_files.ipynb +0 -0
  139. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/tools/shrink_nexus.py +0 -0
  140. {essdiffraction-25.5.1 → essdiffraction-25.6.0}/tox.ini +0 -0
@@ -1,3 +1,3 @@
1
1
  # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2
- _commit: d1d5caa
2
+ _commit: 34ca4ba
3
3
  _src_path: https://github.com/scipp/ess_template
@@ -79,6 +79,14 @@ body:
79
79
  description: How can we test this requirement? Links to tests data and reference data, or other suggestions.
80
80
  validations:
81
81
  required: true
82
+ - type: textarea
83
+ id: existingimplementations
84
+ attributes:
85
+ label: Existing implementations
86
+ description: Are there any existing implementations or proof-of-concept implementations that we can imitate? This field is specifically for linking to source code.
87
+ placeholder: "Example: See this repository ... This script implements the procedure: https://file-storage.server.eu/script.code."
88
+ validations:
89
+ required: false
82
90
  - type: textarea
83
91
  id: comments
84
92
  attributes:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: essdiffraction
3
- Version: 25.5.1
3
+ Version: 25.6.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,13 +22,13 @@ Requires-Python: >=3.10
22
22
  Description-Content-Type: text/markdown
23
23
  License-File: LICENSE
24
24
  Requires-Dist: dask
25
- Requires-Dist: essreduce>=25.05.2
25
+ Requires-Dist: essreduce>=25.05.3
26
26
  Requires-Dist: graphviz
27
27
  Requires-Dist: numpy
28
28
  Requires-Dist: plopp>=25.03.0
29
29
  Requires-Dist: pythreejs
30
30
  Requires-Dist: sciline>=25.04.1
31
- Requires-Dist: scipp>=24.09.1
31
+ Requires-Dist: scipp>=25.05.1
32
32
  Requires-Dist: scippneutron>=25.02.0
33
33
  Requires-Dist: scippnexus>=23.12.0
34
34
  Requires-Dist: tof>=25.01.2
@@ -72,7 +72,9 @@
72
72
  "\n",
73
73
  "workflow[UncertaintyBroadcastMode] = UncertaintyBroadcastMode.drop\n",
74
74
  "\n",
75
- "workflow[TofMask] = lambda x: (x < sc.scalar(0.0, unit=\"us\")) | (x > sc.scalar(16666.67, unit=\"us\"))\n",
75
+ "workflow[TofMask] = lambda x: (x < sc.scalar(0.0, unit=\"us\")) | (\n",
76
+ " x > sc.scalar(16666.67, unit=\"us\")\n",
77
+ ")\n",
76
78
  "workflow[TwoThetaMask] = None\n",
77
79
  "workflow[WavelengthMask] = None\n",
78
80
  "\n",
@@ -114,7 +116,7 @@
114
116
  "metadata": {},
115
117
  "outputs": [],
116
118
  "source": [
117
- "peaked_data.hist().plot()"
119
+ "peaked_data.plot()"
118
120
  ]
119
121
  },
120
122
  {
@@ -150,24 +152,6 @@
150
152
  "cell_type": "markdown",
151
153
  "id": "10",
152
154
  "metadata": {},
153
- "source": [
154
- "We need to histogram the data to perform fits:"
155
- ]
156
- },
157
- {
158
- "cell_type": "code",
159
- "execution_count": null,
160
- "id": "11",
161
- "metadata": {},
162
- "outputs": [],
163
- "source": [
164
- "peak_histogram = peaked_data.hist()"
165
- ]
166
- },
167
- {
168
- "cell_type": "markdown",
169
- "id": "12",
170
- "metadata": {},
171
155
  "source": [
172
156
  "The fits require a bin-center coordinate, so convert from bin-edges:"
173
157
  ]
@@ -175,17 +159,17 @@
175
159
  {
176
160
  "cell_type": "code",
177
161
  "execution_count": null,
178
- "id": "13",
162
+ "id": "11",
179
163
  "metadata": {},
180
164
  "outputs": [],
181
165
  "source": [
182
- "to_fit = peak_histogram.copy(deep=False)\n",
166
+ "to_fit = peaked_data.copy(deep=False)\n",
183
167
  "to_fit.coords['dspacing'] = sc.midpoints(to_fit.coords['dspacing'])"
184
168
  ]
185
169
  },
186
170
  {
187
171
  "cell_type": "markdown",
188
- "id": "14",
172
+ "id": "12",
189
173
  "metadata": {},
190
174
  "source": [
191
175
  "Perform the fits:"
@@ -194,7 +178,7 @@
194
178
  {
195
179
  "cell_type": "code",
196
180
  "execution_count": null,
197
- "id": "15",
181
+ "id": "13",
198
182
  "metadata": {},
199
183
  "outputs": [],
200
184
  "source": [
@@ -203,7 +187,7 @@
203
187
  },
204
188
  {
205
189
  "cell_type": "markdown",
206
- "id": "16",
190
+ "id": "14",
207
191
  "metadata": {},
208
192
  "source": [
209
193
  "Remove the fitted peaks to obtain the incoherent scattering.\n",
@@ -218,18 +202,18 @@
218
202
  {
219
203
  "cell_type": "code",
220
204
  "execution_count": null,
221
- "id": "17",
205
+ "id": "15",
222
206
  "metadata": {},
223
207
  "outputs": [],
224
208
  "source": [
225
209
  "incoherent = scn.peaks.remove_peaks(sc.values(to_fit), fit_results)\n",
226
- "incoherent.coords['dspacing'] = peak_histogram.coords['dspacing']\n",
210
+ "incoherent.coords['dspacing'] = peaked_data.coords['dspacing']\n",
227
211
  "incoherent.plot()"
228
212
  ]
229
213
  },
230
214
  {
231
215
  "cell_type": "markdown",
232
- "id": "18",
216
+ "id": "16",
233
217
  "metadata": {},
234
218
  "source": [
235
219
  "We can further inspect the results.\n",
@@ -262,7 +246,7 @@
262
246
  {
263
247
  "cell_type": "code",
264
248
  "execution_count": null,
265
- "id": "19",
249
+ "id": "17",
266
250
  "metadata": {},
267
251
  "outputs": [],
268
252
  "source": [
@@ -272,29 +256,36 @@
272
256
  " fit_results: list[scn.peaks.FitResult],\n",
273
257
  " peak_estimates: sc.Variable,\n",
274
258
  " *,\n",
275
- " xlim: tuple[sc.Variable, sc.Variable] | None=None,\n",
259
+ " xlim: tuple[sc.Variable, sc.Variable] | None = None,\n",
276
260
  "):\n",
277
261
  " if xlim is not None:\n",
262
+ "\n",
278
263
  " def in_range(x: sc.Variable) -> bool:\n",
279
264
  " return sc.isfinite(x) and (xlim[0] <= x) and (x < xlim[1])\n",
280
- " data = data[data.dim, xlim[0]:xlim[1]]\n",
281
- " removed = removed[removed.dim, xlim[0]:xlim[1]]\n",
282
- " fit_results, peak_estimates = zip(*(\n",
283
- " (r, e)\n",
284
- " for r, e in zip(fit_results, peak_estimates, strict=True)\n",
285
- " if in_range(r.window[0]) and in_range(r.window[1])\n",
286
- " ), strict=True)\n",
265
+ "\n",
266
+ " data = data[data.dim, xlim[0] : xlim[1]]\n",
267
+ " removed = removed[removed.dim, xlim[0] : xlim[1]]\n",
268
+ " fit_results, peak_estimates = zip(\n",
269
+ " *(\n",
270
+ " (r, e)\n",
271
+ " for r, e in zip(fit_results, peak_estimates, strict=True)\n",
272
+ " if in_range(r.window[0]) and in_range(r.window[1])\n",
273
+ " ),\n",
274
+ " strict=True,\n",
275
+ " )\n",
287
276
  "\n",
288
277
  " # The actual data\n",
289
278
  " plot_data = {'data': data, 'removed': removed}\n",
290
279
  " linestyles = {}\n",
291
280
  " markers = {}\n",
292
- " colors = {'data': 'C0','removed': 'C2'}\n",
281
+ " colors = {'data': 'C0', 'removed': 'C2'}\n",
293
282
  "\n",
294
283
  " # Overlay with fit models evaluated at optimized parameters\n",
295
284
  " for i, result in enumerate(fit_results):\n",
296
285
  " if all(not sc.isnan(param).value for param in result.popt.values()):\n",
297
- " best_fit = data[data.dim, result.window[0] : result.window[1]].copy(deep=False)\n",
286
+ " best_fit = data[data.dim, result.window[0] : result.window[1]].copy(\n",
287
+ " deep=False\n",
288
+ " )\n",
298
289
  " best_fit.coords[best_fit.dim] = sc.midpoints(best_fit.coords[best_fit.dim])\n",
299
290
  " best_fit.data = result.eval_model(best_fit.coords[best_fit.dim])\n",
300
291
  "\n",
@@ -340,12 +331,12 @@
340
331
  {
341
332
  "cell_type": "code",
342
333
  "execution_count": null,
343
- "id": "20",
334
+ "id": "18",
344
335
  "metadata": {},
345
336
  "outputs": [],
346
337
  "source": [
347
338
  "peak_removal_diagnostic(\n",
348
- " peak_histogram,\n",
339
+ " peaked_data,\n",
349
340
  " incoherent,\n",
350
341
  " fit_results,\n",
351
342
  " peak_estimates,\n",
@@ -355,12 +346,12 @@
355
346
  {
356
347
  "cell_type": "code",
357
348
  "execution_count": null,
358
- "id": "21",
349
+ "id": "19",
359
350
  "metadata": {},
360
351
  "outputs": [],
361
352
  "source": [
362
353
  "peak_removal_diagnostic(\n",
363
- " peak_histogram,\n",
354
+ " peaked_data,\n",
364
355
  " incoherent,\n",
365
356
  " fit_results,\n",
366
357
  " peak_estimates,\n",
@@ -370,7 +361,7 @@
370
361
  },
371
362
  {
372
363
  "cell_type": "markdown",
373
- "id": "22",
364
+ "id": "20",
374
365
  "metadata": {},
375
366
  "source": [
376
367
  "The resulting data array `incoherent` can be saved and used in the main workflow [POWGEN_data_reduction](../sns-instruments/POWGEN_data_reduction.rst) to replace `FocussedDataDspacing[VanadiumRun]`."
@@ -140,8 +140,9 @@
140
140
  "metadata": {},
141
141
  "outputs": [],
142
142
  "source": [
143
- "grouped_dspacing.hist().plot(title=grouped_dspacing.coords['detector'].value.capitalize(),\n",
144
- " norm=\"log\")"
143
+ "grouped_dspacing.hist().plot(\n",
144
+ " title=grouped_dspacing.coords['detector'].value.capitalize(), norm=\"log\"\n",
145
+ ")"
145
146
  ]
146
147
  },
147
148
  {
@@ -170,7 +171,9 @@
170
171
  "metadata": {},
171
172
  "outputs": [],
172
173
  "source": [
173
- "workflow = dream.DreamGeant4Workflow(run_norm=powder.RunNormalization.monitor_integrated)\n",
174
+ "workflow = dream.DreamGeant4Workflow(\n",
175
+ " run_norm=powder.RunNormalization.monitor_integrated\n",
176
+ ")\n",
174
177
  "\n",
175
178
  "workflow[Filename[SampleRun]] = dream.data.simulated_diamond_sample()\n",
176
179
  "workflow[Filename[VanadiumRun]] = dream.data.simulated_vanadium_sample()\n",
@@ -326,14 +329,8 @@
326
329
  "metadata": {},
327
330
  "outputs": [],
328
331
  "source": [
329
- "intermediates = workflow.compute(\n",
330
- " (\n",
331
- " DataWithScatteringCoordinates[SampleRun],\n",
332
- " MaskedData[SampleRun],\n",
333
- " )\n",
334
- ")\n",
335
- "\n",
336
- "intermediates[DataWithScatteringCoordinates[SampleRun]]"
332
+ "intermediates = workflow.compute((CountsWavelength[SampleRun], MaskedData[SampleRun]))\n",
333
+ "intermediates[CountsWavelength[SampleRun]]"
337
334
  ]
338
335
  },
339
336
  {
@@ -344,9 +341,9 @@
344
341
  "outputs": [],
345
342
  "source": [
346
343
  "two_theta = sc.linspace(\"two_theta\", 0.8, 2.4, 301, unit=\"rad\")\n",
347
- "intermediates[MaskedData[SampleRun]].hist(\n",
348
- " two_theta=two_theta, wavelength=300\n",
349
- ").plot(norm=\"log\")"
344
+ "intermediates[MaskedData[SampleRun]].hist(two_theta=two_theta, wavelength=300).plot(\n",
345
+ " norm=\"log\"\n",
346
+ ")"
350
347
  ]
351
348
  },
352
349
  {
@@ -419,12 +416,13 @@
419
416
  "source": [
420
417
  "detector_names = [\"mantle\", \"endcap_forward\", \"endcap_backward\", \"high_resolution\"]\n",
421
418
  "parameter_table = pd.DataFrame(\n",
422
- " {NeXusDetectorName: detector_names},\n",
423
- " index=detector_names\n",
419
+ " {NeXusDetectorName: detector_names}, index=detector_names\n",
424
420
  ").rename_axis(index='detector')\n",
425
421
  "\n",
426
422
  "all_detector_workflow = workflow.copy()\n",
427
- "mapped = all_detector_workflow[EmptyCanSubtractedIofDspacing[SampleRun]].map(parameter_table)\n",
423
+ "mapped = all_detector_workflow[EmptyCanSubtractedIofDspacing[SampleRun]].map(\n",
424
+ " parameter_table\n",
425
+ ")\n",
428
426
  "all_detector_workflow[EmptyCanSubtractedIofDspacing[SampleRun]] = mapped.reduce(\n",
429
427
  " func=powder.grouping.collect_detectors\n",
430
428
  ")"
@@ -446,9 +444,7 @@
446
444
  "outputs": [],
447
445
  "source": [
448
446
  "all_detector_workflow.visualize(\n",
449
- " EmptyCanSubtractedIofDspacing[SampleRun],\n",
450
- " graph_attr={\"rankdir\": \"LR\"},\n",
451
- " compact=True\n",
447
+ " EmptyCanSubtractedIofDspacing[SampleRun], graph_attr={\"rankdir\": \"LR\"}, compact=True\n",
452
448
  ")"
453
449
  ]
454
450
  },
@@ -533,14 +529,17 @@
533
529
  " sc.linspace(dim=\"two_theta\", unit=\"rad\", start=2.91, stop=3.11, num=51),\n",
534
530
  "]\n",
535
531
  "parameter_table = pd.DataFrame(\n",
536
- " {NeXusDetectorName: detector_names,\n",
537
- " TwoThetaBins: two_theta_bins,\n",
538
- " },\n",
539
- " index=detector_names\n",
532
+ " {\n",
533
+ " NeXusDetectorName: detector_names,\n",
534
+ " TwoThetaBins: two_theta_bins,\n",
535
+ " },\n",
536
+ " index=detector_names,\n",
540
537
  ").rename_axis(index='detector')\n",
541
538
  "\n",
542
539
  "all_detector_workflow = workflow.copy()\n",
543
- "mapped = all_detector_workflow[EmptyCanSubtractedIofDspacingTwoTheta[SampleRun]].map(parameter_table)\n",
540
+ "mapped = all_detector_workflow[EmptyCanSubtractedIofDspacingTwoTheta[SampleRun]].map(\n",
541
+ " parameter_table\n",
542
+ ")\n",
544
543
  "all_detector_workflow[EmptyCanSubtractedIofDspacingTwoTheta[SampleRun]] = mapped.reduce(\n",
545
544
  " func=powder.grouping.collect_detectors\n",
546
545
  ")"
@@ -556,7 +555,7 @@
556
555
  "all_detector_workflow.visualize(\n",
557
556
  " EmptyCanSubtractedIofDspacingTwoTheta[SampleRun],\n",
558
557
  " graph_attr={\"rankdir\": \"LR\"},\n",
559
- " compact=True\n",
558
+ " compact=True,\n",
560
559
  ")"
561
560
  ]
562
561
  },
@@ -32,13 +32,13 @@ requires-python = ">=3.10"
32
32
  # Make sure to list one dependency per line.
33
33
  dependencies = [
34
34
  "dask",
35
- "essreduce>=25.05.2",
35
+ "essreduce>=25.05.3",
36
36
  "graphviz",
37
37
  "numpy",
38
38
  "plopp>=25.03.0",
39
39
  "pythreejs",
40
40
  "sciline>=25.04.1",
41
- "scipp>=24.09.1",
41
+ "scipp>=25.05.1",
42
42
  "scippneutron>=25.02.0",
43
43
  "scippnexus>=23.12.0",
44
44
  "tof>=25.01.2",
@@ -3,13 +3,13 @@
3
3
  # --- END OF CUSTOM SECTION ---
4
4
  # The following was generated by 'tox -e deps', DO NOT EDIT MANUALLY!
5
5
  dask
6
- essreduce>=25.05.2
6
+ essreduce>=25.05.3
7
7
  graphviz
8
8
  numpy
9
9
  plopp>=25.03.0
10
10
  pythreejs
11
11
  sciline>=25.04.1
12
- scipp>=24.09.1
12
+ scipp>=25.05.1
13
13
  scippneutron>=25.02.0
14
14
  scippnexus>=23.12.0
15
15
  tof>=25.01.2
@@ -1,9 +1,9 @@
1
- # SHA1:60cb3370153cfec27ffbe68c100df7aa10faaed0
1
+ # SHA1:81114073dd5e4b765405b54b3976f92d6a96439b
2
2
  #
3
- # This file was generated by pip-compile-multi.
3
+ # This file is autogenerated by pip-compile-multi
4
4
  # To update, run:
5
5
  #
6
- # requirements upgrade
6
+ # pip-compile-multi
7
7
  #
8
8
  annotated-types==0.7.0
9
9
  # via pydantic
@@ -29,15 +29,15 @@ dnspython==2.7.0
29
29
  # via email-validator
30
30
  email-validator==2.2.0
31
31
  # via scippneutron
32
- essreduce==25.5.2
32
+ essreduce==25.5.3
33
33
  # via -r base.in
34
34
  exceptiongroup==1.3.0
35
35
  # via ipython
36
36
  executing==2.2.0
37
37
  # via stack-data
38
- fonttools==4.58.0
38
+ fonttools==4.58.1
39
39
  # via matplotlib
40
- fsspec==2025.5.0
40
+ fsspec==2025.5.1
41
41
  # via dask
42
42
  graphviz==0.20.3
43
43
  # via -r base.in
@@ -51,7 +51,7 @@ importlib-metadata==8.7.0
51
51
  # via dask
52
52
  ipydatawidgets==4.3.5
53
53
  # via pythreejs
54
- ipython==8.36.0
54
+ ipython==8.37.0
55
55
  # via ipywidgets
56
56
  ipywidgets==8.1.7
57
57
  # via
@@ -76,7 +76,7 @@ matplotlib==3.10.3
76
76
  # plopp
77
77
  matplotlib-inline==0.1.7
78
78
  # via ipython
79
- mpltoolbox==25.4.0
79
+ mpltoolbox==25.5.0
80
80
  # via scippneutron
81
81
  networkx==3.4.2
82
82
  # via cyclebane
@@ -115,7 +115,7 @@ ptyprocess==0.7.0
115
115
  # via pexpect
116
116
  pure-eval==0.2.3
117
117
  # via stack-data
118
- pydantic==2.11.4
118
+ pydantic==2.11.5
119
119
  # via scippneutron
120
120
  pydantic-core==2.33.2
121
121
  # via pydantic
@@ -136,7 +136,7 @@ sciline==25.5.2
136
136
  # via
137
137
  # -r base.in
138
138
  # essreduce
139
- scipp==25.5.0
139
+ scipp==25.5.1
140
140
  # via
141
141
  # -r base.in
142
142
  # essreduce
@@ -191,5 +191,5 @@ wcwidth==0.2.13
191
191
  # via prompt-toolkit
192
192
  widgetsnbextension==4.0.14
193
193
  # via ipywidgets
194
- zipp==3.21.0
194
+ zipp==3.22.0
195
195
  # via importlib-metadata
@@ -1,9 +1,9 @@
1
1
  # SHA1:c4f3e9aaa3abd10fcdf497bea14415857f62cc89
2
2
  #
3
- # This file was generated by pip-compile-multi.
3
+ # This file is autogenerated by pip-compile-multi
4
4
  # To update, run:
5
5
  #
6
- # requirements upgrade
6
+ # pip-compile-multi
7
7
  #
8
8
  certifi==2025.4.26
9
9
  # via requests
@@ -1,11 +1,11 @@
1
1
  # SHA1:6344d52635ea11dca331a3bc6eb1833c4c64d585
2
2
  #
3
- # This file was generated by pip-compile-multi.
3
+ # This file is autogenerated by pip-compile-multi
4
4
  # To update, run:
5
5
  #
6
- # requirements upgrade
6
+ # pip-compile-multi
7
7
  #
8
- cachetools==5.5.2
8
+ cachetools==6.0.0
9
9
  # via tox
10
10
  certifi==2025.4.26
11
11
  # via requests
@@ -1,9 +1,9 @@
1
1
  # SHA1:efd19a3a98c69fc3d6d6233ed855de7e4a208f74
2
2
  #
3
- # This file was generated by pip-compile-multi.
3
+ # This file is autogenerated by pip-compile-multi
4
4
  # To update, run:
5
5
  #
6
- # requirements upgrade
6
+ # pip-compile-multi
7
7
  #
8
8
  -r base.txt
9
9
  -r ci.txt
@@ -48,7 +48,7 @@ json5==0.12.0
48
48
  # via jupyterlab-server
49
49
  jsonpointer==3.0.0
50
50
  # via jsonschema
51
- jsonschema[format-nongpl]==4.23.0
51
+ jsonschema[format-nongpl]==4.24.0
52
52
  # via
53
53
  # jupyter-events
54
54
  # jupyterlab-server
@@ -65,7 +65,7 @@ jupyter-server==2.16.0
65
65
  # notebook-shim
66
66
  jupyter-server-terminals==0.5.3
67
67
  # via jupyter-server
68
- jupyterlab==4.4.2
68
+ jupyterlab==4.4.3
69
69
  # via -r dev.in
70
70
  jupyterlab-server==2.27.3
71
71
  # via jupyterlab
@@ -73,9 +73,7 @@ notebook-shim==0.2.4
73
73
  # via jupyterlab
74
74
  overrides==7.7.0
75
75
  # via jupyter-server
76
- pathspec==0.12.1
77
- # via copier
78
- pip-compile-multi==3.0.0
76
+ pip-compile-multi==3.1.0
79
77
  # via -r dev.in
80
78
  pip-tools==7.4.1
81
79
  # via pip-compile-multi
@@ -1,9 +1,9 @@
1
1
  # SHA1:f334aa080c9558edc1a060050a0ddfab6eb8d408
2
2
  #
3
- # This file was generated by pip-compile-multi.
3
+ # This file is autogenerated by pip-compile-multi
4
4
  # To update, run:
5
5
  #
6
- # requirements upgrade
6
+ # pip-compile-multi
7
7
  #
8
8
  -r base.txt
9
9
  accessible-pygments==0.0.5
@@ -54,7 +54,7 @@ jinja2==3.1.6
54
54
  # nbconvert
55
55
  # nbsphinx
56
56
  # sphinx
57
- jsonschema==4.23.0
57
+ jsonschema==4.24.0
58
58
  # via nbformat
59
59
  jsonschema-specifications==2025.4.1
60
60
  # via jsonschema
@@ -62,7 +62,7 @@ jupyter-client==8.6.3
62
62
  # via
63
63
  # ipykernel
64
64
  # nbclient
65
- jupyter-core==5.7.2
65
+ jupyter-core==5.8.1
66
66
  # via
67
67
  # ipykernel
68
68
  # jupyter-client
@@ -180,7 +180,7 @@ tinycss2==1.4.0
180
180
  # via bleach
181
181
  tomli==2.2.1
182
182
  # via sphinx
183
- tornado==6.5
183
+ tornado==6.5.1
184
184
  # via
185
185
  # ipykernel
186
186
  # jupyter-client
@@ -1,12 +1,14 @@
1
1
  # SHA1:859ef9c15e5e57c6c91510133c01f5751feee941
2
2
  #
3
- # This file was generated by pip-compile-multi.
3
+ # This file is autogenerated by pip-compile-multi
4
4
  # To update, run:
5
5
  #
6
- # requirements upgrade
6
+ # pip-compile-multi
7
7
  #
8
8
  -r test.txt
9
- mypy==1.15.0
9
+ mypy==1.16.0
10
10
  # via -r mypy.in
11
11
  mypy-extensions==1.1.0
12
12
  # via mypy
13
+ pathspec==0.12.1
14
+ # via mypy
@@ -1,9 +1,9 @@
1
1
  # SHA1:366263fa92dc0eb9f81d46f056e0c80a931f671e
2
2
  #
3
- # This file was generated by pip-compile-multi.
3
+ # This file is autogenerated by pip-compile-multi
4
4
  # To update, run:
5
5
  #
6
- # requirements upgrade
6
+ # pip-compile-multi
7
7
  #
8
8
  --index-url https://pypi.anaconda.org/scipp-nightly-wheels/simple/
9
9
  --extra-index-url https://pypi.org/simple
@@ -44,9 +44,9 @@ exceptiongroup==1.3.0
44
44
  # pytest
45
45
  executing==2.2.0
46
46
  # via stack-data
47
- fonttools==4.58.0
47
+ fonttools==4.58.1
48
48
  # via matplotlib
49
- fsspec==2025.5.0
49
+ fsspec==2025.5.1
50
50
  # via dask
51
51
  graphviz==0.20.3
52
52
  # via -r nightly.in
@@ -64,7 +64,7 @@ iniconfig==2.1.0
64
64
  # via pytest
65
65
  ipydatawidgets==4.3.5
66
66
  # via pythreejs
67
- ipython==8.36.0
67
+ ipython==8.37.0
68
68
  # via ipywidgets
69
69
  ipywidgets==8.1.7
70
70
  # via
@@ -89,7 +89,7 @@ matplotlib==3.10.3
89
89
  # plopp
90
90
  matplotlib-inline==0.1.7
91
91
  # via ipython
92
- mpltoolbox==25.4.0
92
+ mpltoolbox==25.5.0
93
93
  # via scippneutron
94
94
  networkx==3.4.2
95
95
  # via cyclebane
@@ -139,7 +139,7 @@ ptyprocess==0.7.0
139
139
  # via pexpect
140
140
  pure-eval==0.2.3
141
141
  # via stack-data
142
- pydantic==2.11.4
142
+ pydantic==2.11.5
143
143
  # via scippneutron
144
144
  pydantic-core==2.33.2
145
145
  # via pydantic
@@ -210,7 +210,7 @@ traitlets==5.14.3
210
210
  # traittypes
211
211
  traittypes==0.2.1
212
212
  # via ipydatawidgets
213
- typing-extensions==4.13.2
213
+ typing-extensions==4.14.0rc1
214
214
  # via
215
215
  # exceptiongroup
216
216
  # ipython
@@ -228,5 +228,5 @@ wcwidth==0.2.13
228
228
  # via prompt-toolkit
229
229
  widgetsnbextension==4.0.14
230
230
  # via ipywidgets
231
- zipp==3.21.0
231
+ zipp==3.22.0
232
232
  # via importlib-metadata
@@ -1,9 +1,9 @@
1
1
  # SHA1:5a0b1bb22ae805d8aebba0f3bf05ab91aceae0d8
2
2
  #
3
- # This file was generated by pip-compile-multi.
3
+ # This file is autogenerated by pip-compile-multi
4
4
  # To update, run:
5
5
  #
6
- # requirements upgrade
6
+ # pip-compile-multi
7
7
  #
8
8
  cfgv==3.4.0
9
9
  # via pre-commit
@@ -11,7 +11,7 @@ distlib==0.3.9
11
11
  # via virtualenv
12
12
  filelock==3.18.0
13
13
  # via virtualenv
14
- identify==2.6.10
14
+ identify==2.6.12
15
15
  # via pre-commit
16
16
  nodeenv==1.9.1
17
17
  # via pre-commit