Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 7 additions & 7 deletions docs/odin/odin-data-reduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"metadata": {},
"outputs": [],
"source": [
"tmpx3 = wf.compute(DetectorData[SampleRun])\n",
"tmpx3 = wf.compute(RawDetector[SampleRun])\n",
"tmpx3"
]
},
Expand Down Expand Up @@ -96,7 +96,7 @@
"metadata": {},
"outputs": [],
"source": [
"wf.visualize(DetectorTofData[SampleRun], graph_attr={\"rankdir\": \"LR\"})"
"wf.visualize(TofDetector[SampleRun], graph_attr={\"rankdir\": \"LR\"})"
]
},
{
Expand Down Expand Up @@ -135,7 +135,7 @@
"metadata": {},
"outputs": [],
"source": [
"sample_wavs = wf.compute(CountsWavelength[SampleRun])\n",
"sample_wavs = wf.compute(WavelengthDetector[SampleRun])\n",
"\n",
"sample_wavs.bins.concat().hist(wavelength=300).plot()"
]
Expand All @@ -158,7 +158,7 @@
"outputs": [],
"source": [
"wf[Filename[OpenBeamRun]] = odin.data.iron_simulation_ob_small()\n",
"openbeam_wavs = wf.compute(CountsWavelength[OpenBeamRun])\n",
"openbeam_wavs = wf.compute(WavelengthDetector[OpenBeamRun])\n",
"\n",
"openbeam_wavs.bins.concat().hist(wavelength=300).plot()"
]
Expand Down Expand Up @@ -213,7 +213,7 @@
"metadata": {},
"outputs": [],
"source": [
"masked = wf.compute(CountsMasked[SampleRun])\n",
"masked = wf.compute(CorrectedDetector[SampleRun])\n",
"\n",
"masked.hist().plot(aspect='equal')"
]
Expand All @@ -239,8 +239,8 @@
"wbins = sc.linspace('wavelength', 1.1, 9.4, 301, unit='angstrom')\n",
"\n",
"normalized = (\n",
" wf.compute(CountsMasked[SampleRun]).bins.concat().hist(wavelength=wbins) /\n",
" wf.compute(CountsMasked[OpenBeamRun]).bins.concat().hist(wavelength=wbins)\n",
" wf.compute(CorrectedDetector[SampleRun]).bins.concat().hist(wavelength=wbins) /\n",
" wf.compute(CorrectedDetector[OpenBeamRun]).bins.concat().hist(wavelength=wbins)\n",
")\n",
"\n",
"normalized.plot()"
Expand Down
3 changes: 2 additions & 1 deletion docs/odin/odin-make-tof-lookup-table.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"source": [
"import scipp as sc\n",
"from ess.reduce import time_of_flight\n",
"from ess.reduce.nexus.types import AnyRun\n",
"from ess.odin.beamline import choppers"
]
},
Expand All @@ -39,7 +40,7 @@
"disk_choppers = choppers(source_position)\n",
"\n",
"wf = time_of_flight.TofLookupTableWorkflow()\n",
"wf[time_of_flight.DiskChoppers] = disk_choppers\n",
"wf[time_of_flight.DiskChoppers[AnyRun]] = disk_choppers\n",
"wf[time_of_flight.SourcePosition] = source_position\n",
"wf[time_of_flight.NumberOfSimulatedNeutrons] = 200_000 # Increase this number for more reliable results\n",
"wf[time_of_flight.SimulationSeed] = 1234\n",
Expand Down
16 changes: 8 additions & 8 deletions docs/tbl/tbl-data-reduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"source": [
"wf[NeXusDetectorName] = \"ngem_detector\"\n",
"\n",
"wf.visualize(DetectorData[SampleRun], graph_attr={\"rankdir\": \"LR\"})"
"wf.visualize(RawDetector[SampleRun], graph_attr={\"rankdir\": \"LR\"})"
]
},
{
Expand All @@ -70,7 +70,7 @@
"metadata": {},
"outputs": [],
"source": [
"ngem = wf.compute(DetectorData[SampleRun])\n",
"ngem = wf.compute(RawDetector[SampleRun])\n",
"ngem"
]
},
Expand Down Expand Up @@ -99,7 +99,7 @@
"metadata": {},
"outputs": [],
"source": [
"wf.visualize(DetectorTofData[SampleRun], graph_attr={\"rankdir\": \"LR\"})"
"wf.visualize(TofDetector[SampleRun], graph_attr={\"rankdir\": \"LR\"})"
]
},
{
Expand Down Expand Up @@ -136,8 +136,8 @@
"metadata": {},
"outputs": [],
"source": [
"ngem_tofs = wf.compute(DetectorTofData[SampleRun])\n",
"ngem_wavs = wf.compute(CountsWavelength[SampleRun])\n",
"ngem_tofs = wf.compute(TofDetector[SampleRun])\n",
"ngem_wavs = wf.compute(WavelengthDetector[SampleRun])\n",
"\n",
"ngem_tofs.bins.concat().hist(tof=100).plot() + ngem_wavs.bins.concat().hist(wavelength=100).plot()"
]
Expand All @@ -162,7 +162,7 @@
"he3 = {}\n",
"for bank in ('he3_detector_bank0', 'he3_detector_bank1'):\n",
" he3_wf[NeXusDetectorName] = bank\n",
" he3[bank] = he3_wf.compute(DetectorData[SampleRun])"
" he3[bank] = he3_wf.compute(RawDetector[SampleRun])"
]
},
{
Expand Down Expand Up @@ -197,8 +197,8 @@
"\n",
"for bank in ('he3_detector_bank0', 'he3_detector_bank1'):\n",
" he3_wf[NeXusDetectorName] = bank\n",
" he3_tofs[bank] = he3_wf.compute(DetectorTofData[SampleRun]).bins.concat().hist(tof=100)\n",
" he3_wavs[bank] = he3_wf.compute(CountsWavelength[SampleRun]).bins.concat().hist(wavelength=100)\n",
" he3_tofs[bank] = he3_wf.compute(TofDetector[SampleRun]).bins.concat().hist(tof=100)\n",
" he3_wavs[bank] = he3_wf.compute(WavelengthDetector[SampleRun]).bins.concat().hist(wavelength=100)\n",
"\n",
"pp.plot(he3_tofs) + pp.plot(he3_wavs)"
]
Expand Down
5 changes: 3 additions & 2 deletions docs/tbl/tbl-make-tof-lookup-table.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"outputs": [],
"source": [
"import scipp as sc\n",
"from ess.reduce import time_of_flight"
"from ess.reduce import time_of_flight\n",
"from ess.reduce.nexus.types import AnyRun"
]
},
{
Expand All @@ -37,7 +38,7 @@
"source_position = sc.vector([0, 0, 0], unit='m')\n",
"\n",
"wf = time_of_flight.TofLookupTableWorkflow()\n",
"wf[time_of_flight.DiskChoppers] = {}\n",
"wf[time_of_flight.DiskChoppers[AnyRun]] = {}\n",
"wf[time_of_flight.SourcePosition] = source_position\n",
"wf[time_of_flight.NumberOfSimulatedNeutrons] = 200_000 # Increase this number for more reliable results\n",
"wf[time_of_flight.SimulationSeed] = 1234\n",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dependencies = [
"scippneutron>=24.12.0",
"scippnexus>=23.11.1",
"tifffile>=2024.7.2",
"essreduce>=25.10.0",
"essreduce>=25.11.0",
"scitiff>=25.7",
]

Expand Down
2 changes: 1 addition & 1 deletion requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ scipp>=25.4.0
scippneutron>=24.12.0
scippnexus>=23.11.1
tifffile>=2024.7.2
essreduce>=25.10.0
essreduce>=25.11.0
scitiff>=25.7
49 changes: 24 additions & 25 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SHA1:753ad79f56410b37320aff70f9bfd2977ec31d52
# SHA1:da99ba40cef426287cd34dd1a2b56aefd0cb24e6
#
# This file was generated by pip-compile-multi.
# To update, run:
Expand All @@ -15,7 +15,7 @@ attrs==25.4.0
# referencing
click==8.3.0
# via dask
cloudpickle==3.1.1
cloudpickle==3.1.2
# via dask
comm==0.2.3
# via ipywidgets
Expand All @@ -25,31 +25,31 @@ cyclebane==24.10.0
# via sciline
cycler==0.12.1
# via matplotlib
dask==2025.9.1
dask==2025.10.0
# via -r base.in
decorator==5.2.1
# via ipython
dnspython==2.8.0
# via email-validator
email-validator==2.3.0
# via scippneutron
essreduce==25.10.0
essreduce==25.11.0
# via -r base.in
executing==2.2.1
# via stack-data
fonttools==4.60.1
# via matplotlib
fsspec==2025.9.0
fsspec==2025.10.0
# via dask
graphviz==0.21
# via
# -r base.in
# plopp
h5py==3.14.0
h5py==3.15.1
# via
# scippneutron
# scippnexus
idna==3.10
idna==3.11
# via email-validator
importlib-metadata==8.7.0
# via dask
Expand All @@ -63,7 +63,7 @@ ipython==9.6.0
# ipywidgets
ipython-pygments-lexers==1.1.1
# via ipython
ipywidgets==8.1.7
ipywidgets==8.1.8
# via
# ipydatawidgets
# ipympl
Expand All @@ -75,7 +75,7 @@ jsonschema==4.25.1
# via scitiff
jsonschema-specifications==2025.9.1
# via jsonschema
jupyterlab-widgets==3.0.15
jupyterlab-widgets==3.0.16
# via ipywidgets
kiwisolver==1.4.9
# via matplotlib
Expand All @@ -90,15 +90,15 @@ matplotlib==3.10.7
# ipympl
# mpltoolbox
# plopp
matplotlib-inline==0.1.7
matplotlib-inline==0.2.1
# via ipython
mpltoolbox==25.5.0
mpltoolbox==25.10.0
# via
# plopp
# scippneutron
networkx==3.5
# via cyclebane
numpy==2.3.3
numpy==2.3.4
# via
# contourpy
# h5py
Expand All @@ -121,7 +121,7 @@ partd==1.4.2
# via dask
pexpect==4.9.0
# via ipython
pillow==11.3.0
pillow==12.0.0
# via
# ipympl
# matplotlib
Expand All @@ -135,11 +135,11 @@ ptyprocess==0.7.0
# via pexpect
pure-eval==0.2.3
# via stack-data
pydantic==2.12.0
pydantic==2.12.3
# via
# scippneutron
# scitiff
pydantic-core==2.41.1
pydantic-core==2.41.4
# via pydantic
pygments==2.19.2
# via
Expand All @@ -156,19 +156,19 @@ pythreejs==2.4.2
# via plopp
pyyaml==6.0.3
# via dask
referencing==0.36.2
referencing==0.37.0
# via
# jsonschema
# jsonschema-specifications
rpds-py==0.27.1
rpds-py==0.28.0
# via
# jsonschema
# referencing
sciline==25.8.0
sciline==25.11.1
# via
# -r base.in
# essreduce
scipp==25.8.0
scipp==25.11.0
# via
# -r base.in
# essreduce
Expand All @@ -185,7 +185,7 @@ scippnexus==25.6.0
# -r base.in
# essreduce
# scippneutron
scipy==1.16.2
scipy==1.16.3
# via
# scippneutron
# scippnexus
Expand All @@ -195,11 +195,11 @@ six==1.17.0
# via python-dateutil
stack-data==0.6.3
# via ipython
tifffile==2025.10.4
tifffile==2025.10.16
# via
# -r base.in
# scitiff
toolz==1.0.0
toolz==1.1.0
# via
# dask
# partd
Expand All @@ -211,21 +211,20 @@ traitlets==5.14.3
# matplotlib-inline
# pythreejs
# traittypes
traittypes==0.2.1
traittypes==0.2.3
# via ipydatawidgets
typing-extensions==4.15.0
# via
# ipython
# pydantic
# pydantic-core
# referencing
# sciline
# typing-inspection
typing-inspection==0.4.2
# via pydantic
wcwidth==0.2.14
# via prompt-toolkit
widgetsnbextension==4.0.14
widgetsnbextension==4.0.15
# via ipywidgets
zipp==3.23.0
# via importlib-metadata
Loading
Loading