Skip to content
Open
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
13 changes: 8 additions & 5 deletions docs/user-guide/dream/dream-make-tof-lookup-table.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
"id": "4",
"metadata": {},
"source": [
"Note that possible configurations are `high_flux`, `high_flux_BC215`, `high_flux_BC240`, and `high_resolution`.\n",
"\n",
"## Setting up the workflow"
]
},
Expand All @@ -60,13 +62,13 @@
"source": [
"wf = time_of_flight.TofLookupTableWorkflow()\n",
"\n",
"wf[time_of_flight.LtotalRange] = sc.scalar(60.0, unit=\"m\"), sc.scalar(80.0, unit=\"m\")\n",
"wf[time_of_flight.LtotalRange] = sc.scalar(5.0, unit=\"m\"), sc.scalar(80.0, unit=\"m\")\n",
"wf[time_of_flight.NumberOfSimulatedNeutrons] = 200_000 # Increase this number for more reliable results\n",
"wf[time_of_flight.SourcePosition] = sc.vector([0, 0, 0], unit='m')\n",
"wf[time_of_flight.DiskChoppers[AnyRun]] = disk_choppers\n",
"wf[time_of_flight.DistanceResolution] = sc.scalar(0.1, unit=\"m\")\n",
"wf[time_of_flight.TimeResolution] = sc.scalar(250.0, unit='us')\n",
"wf[time_of_flight.LookupTableRelativeErrorThreshold] = 0.02\n",
"wf[time_of_flight.LookupTableRelativeErrorThreshold] = 1.0\n",
"wf[time_of_flight.PulsePeriod] = 1.0 / sc.scalar(14.0, unit=\"Hz\")\n",
"wf[time_of_flight.PulseStride] = 1\n",
"wf[time_of_flight.PulseStrideOffset] = None"
Expand All @@ -88,7 +90,7 @@
"outputs": [],
"source": [
"table = wf.compute(time_of_flight.TimeOfFlightLookupTable)\n",
"table"
"table.array"
]
},
{
Expand Down Expand Up @@ -116,7 +118,7 @@
"metadata": {},
"outputs": [],
"source": [
"table.save_hdf5('DREAM-high-flux-tof-lookup-table.h5')"
"table.save_hdf5('DREAM-high-flux-tof-lut-5m-80m.h5')"
]
}
],
Expand All @@ -135,7 +137,8 @@
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3"
"pygments_lexer": "ipython3",
"version": "3.12.12"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ requires-python = ">=3.11"
# Make sure to list one dependency per line.
dependencies = [
"dask>=2022.1.0",
"essreduce>=25.12.1",
"essreduce>=26.2.0",
"graphviz",
"numpy>=2",
"plopp>=25.07.0",
Expand Down
4 changes: 2 additions & 2 deletions requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# --- END OF CUSTOM SECTION ---
# The following was generated by 'tox -e deps', DO NOT EDIT MANUALLY!
dask>=2022.1.0
essreduce>=25.12.1
essreduce>=26.2.0
graphviz
numpy>=1.25
numpy>=2
plopp>=25.07.0
pythreejs>=2.4.1
sciline>=25.04.1
Expand Down
16 changes: 8 additions & 8 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SHA1:40cd03cd4a9e9632db0eebb7d094cb1a55638372
# SHA1:951a9b0eb3b03cee1aa0600155d26e49ef83cfc2
#
# This file was generated by pip-compile-multi.
# To update, run:
Expand Down Expand Up @@ -27,15 +27,15 @@ cyclebane==24.10.0
# via sciline
cycler==0.12.1
# via matplotlib
dask==2026.1.1
dask==2026.1.2
# 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==26.1.1
essreduce==26.2.0
# via -r base.in
executing==2.2.1
# via stack-data
Expand All @@ -59,7 +59,7 @@ importlib-metadata==8.7.1
# via dask
ipydatawidgets==4.3.5
# via pythreejs
ipython==9.9.0
ipython==9.10.0
# via ipywidgets
ipython-pygments-lexers==1.1.1
# via ipython
Expand Down Expand Up @@ -97,7 +97,7 @@ ncrystal-python==4.2.12
# via ncrystal
networkx==3.6.1
# via cyclebane
numpy==2.4.1
numpy==2.4.2
# via
# -r base.in
# ase
Expand Down Expand Up @@ -132,7 +132,7 @@ plopp==25.11.0
# -r base.in
# scippneutron
# tof
pooch==1.8.2
pooch==1.9.0
# via tof
prompt-toolkit==3.0.52
# via ipython
Expand Down Expand Up @@ -164,7 +164,7 @@ sciline==25.11.1
# via
# -r base.in
# essreduce
scipp==26.1.0
scipp==26.1.1
# via
# -r base.in
# essreduce
Expand Down Expand Up @@ -219,7 +219,7 @@ typing-inspection==0.4.2
# via pydantic
urllib3==2.6.3
# via requests
wcwidth==0.3.0
wcwidth==0.5.3
# via prompt-toolkit
widgetsnbextension==4.0.15
# via ipywidgets
Expand Down
8 changes: 4 additions & 4 deletions requirements/basetest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ idna==3.11
# via requests
iniconfig==2.3.0
# via pytest
ipython==9.9.0
ipython==9.10.0
# via ipywidgets
ipython-pygments-lexers==1.1.1
# via ipython
Expand All @@ -33,7 +33,7 @@ jupyterlab-widgets==3.0.16
# via ipywidgets
matplotlib-inline==0.2.1
# via ipython
numpy==2.4.1
numpy==2.4.2
# via pandas
packaging==26.0
# via
Expand All @@ -49,7 +49,7 @@ platformdirs==4.5.1
# via pooch
pluggy==1.6.0
# via pytest
pooch==1.8.2
pooch==1.9.0
# via -r basetest.in
prompt-toolkit==3.0.52
# via ipython
Expand Down Expand Up @@ -81,7 +81,7 @@ typing-extensions==4.15.0
# via ipython
urllib3==2.6.3
# via requests
wcwidth==0.3.0
wcwidth==0.5.3
# via prompt-toolkit
widgetsnbextension==4.0.15
# via ipywidgets
2 changes: 1 addition & 1 deletion requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# requirements upgrade
#
cachetools==6.2.4
cachetools==7.0.0
# via tox
certifi==2026.1.4
# via requests
Expand Down
6 changes: 3 additions & 3 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async-lru==2.1.0
# via jupyterlab
cffi==2.0.0
# via argon2-cffi-bindings
copier==9.11.2
copier==9.11.3
# via -r dev.in
dunamai==1.25.0
# via copier
Expand Down Expand Up @@ -65,7 +65,7 @@ jupyter-server==2.17.0
# notebook-shim
jupyter-server-terminals==0.5.4
# via jupyter-server
jupyterlab==4.5.2
jupyterlab==4.5.3
# via -r dev.in
jupyterlab-server==2.28.0
# via jupyterlab
Expand Down Expand Up @@ -115,7 +115,7 @@ webcolors==25.10.0
# via jsonschema
websocket-client==1.9.0
# via jupyter-server
wheel==0.46.2
wheel==0.46.3
# via pip-tools

# The following packages are considered to be unsafe in a requirements file:
Expand Down
8 changes: 4 additions & 4 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ attrs==25.4.0
# referencing
autodoc-pydantic==2.2.0
# via -r docs.in
babel==2.17.0
babel==2.18.0
# via
# pydata-sphinx-theme
# sphinx
Expand All @@ -26,7 +26,7 @@ beautifulsoup4==4.14.3
# pydata-sphinx-theme
bleach[css]==6.3.0
# via nbconvert
debugpy==1.8.19
debugpy==1.8.20
# via ipykernel
defusedxml==0.7.1
# via nbconvert
Expand Down Expand Up @@ -89,7 +89,7 @@ myst-parser==5.0.0
# via -r docs.in
nbclient==0.10.4
# via nbconvert
nbconvert==7.16.6
nbconvert==7.17.0
# via nbsphinx
nbformat==5.10.4
# via
Expand All @@ -104,7 +104,7 @@ pandas==3.0.0
# via -r docs.in
pandocfilters==1.5.1
# via nbconvert
psutil==7.2.1
psutil==7.2.2
# via ipykernel
pyarrow==23.0.0
# via -r docs.in
Expand Down
2 changes: 1 addition & 1 deletion requirements/mypy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ mypy==1.19.1
# via -r mypy.in
mypy-extensions==1.1.0
# via mypy
pathspec==1.0.3
pathspec==1.0.4
# via mypy
2 changes: 1 addition & 1 deletion requirements/nightly.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# The following was generated by 'tox -e deps', DO NOT EDIT MANUALLY!
dask>=2022.1.0
graphviz
numpy>=1.25
numpy>=2
pythreejs>=2.4.1
ncrystal[cif]>=4.1.0
spglib!=2.7
Expand Down
13 changes: 6 additions & 7 deletions requirements/nightly.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SHA1:c7ea57c5e953bfa839536ce478aea6b0964cf25a
# SHA1:02c4ca6025e8a899b9987d08704c722ee69e177a
#
# This file was generated by pip-compile-multi.
# To update, run:
Expand Down Expand Up @@ -30,7 +30,7 @@ cyclebane==24.10.0
# via sciline
cycler==0.12.1
# via matplotlib
dask==2026.1.1
dask==2026.1.2
# via -r nightly.in
decorator==5.2.1
# via ipython
Expand Down Expand Up @@ -64,7 +64,7 @@ iniconfig==2.3.0
# via pytest
ipydatawidgets==4.3.5
# via pythreejs
ipython==9.9.0
ipython==9.10.0
# via ipywidgets
ipython-pygments-lexers==1.1.1
# via ipython
Expand Down Expand Up @@ -103,12 +103,11 @@ ncrystal-python==4.2.12
# via ncrystal
networkx==3.6.1
# via cyclebane
numpy==2.3.5
numpy==2.4.2
# via
# -r nightly.in
# ase
# contourpy
# essreduce
# h5py
# ipydatawidgets
# matplotlib
Expand Down Expand Up @@ -145,7 +144,7 @@ plopp @ git+https://github.com/scipp/plopp@main
# tof
pluggy==1.6.0
# via pytest
pooch==1.8.2
pooch==1.9.0
# via
# -r nightly.in
# tof
Expand Down Expand Up @@ -238,7 +237,7 @@ typing-inspection==0.4.2
# via pydantic
urllib3==2.6.3
# via requests
wcwidth==0.3.0
wcwidth==0.5.3
# via prompt-toolkit
widgetsnbextension==4.0.15
# via ipywidgets
Expand Down
18 changes: 14 additions & 4 deletions src/ess/dream/beamline.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ def choppers(configuration: InstrumentConfiguration) -> dict[str, DiskChopper]:
"""Return the chopper configuration for the given instrument configuration."""

match configuration:
case InstrumentConfiguration.high_flux:
case (
InstrumentConfiguration.high_flux
| InstrumentConfiguration.high_flux_BC215
| InstrumentConfiguration.high_flux_BC240
):
return {
"psc1": DiskChopper(
frequency=sc.scalar(14.0, unit="Hz"),
Expand Down Expand Up @@ -115,9 +119,15 @@ def choppers(configuration: InstrumentConfiguration) -> dict[str, DiskChopper]:
"bcc": DiskChopper(
frequency=sc.scalar(112.0, unit="Hz"),
beam_position=sc.scalar(0.0, unit="deg"),
phase=sc.scalar(215 - 180, unit="deg"),
# Use 240 to reduce overlap between frames
# phase=sc.scalar(240 - 180, unit="deg"),
phase=sc.scalar(
(
240
if configuration == InstrumentConfiguration.high_flux_BC240
else 215
)
- 180,
unit="deg",
),
axle_position=sc.vector(value=[0, 0, 9.78], unit="m"),
slit_begin=sc.array(
dims=["cutout"], values=[-36.875, 143.125], unit="deg"
Expand Down
Loading
Loading