Skip to content

Commit

Permalink
Merge branch 'main' into display-transmission
Browse files Browse the repository at this point in the history
  • Loading branch information
jokasimr authored Jan 20, 2025
2 parents 3401b79 + 63440c2 commit aee7dc8
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 51 deletions.
3 changes: 2 additions & 1 deletion docs/user-guide/dream/workflow-widget-dream.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"id": "2",
"metadata": {
"editable": true,
"nbsphinx": "hidden",
"slideshow": {
"slide_type": ""
},
Expand All @@ -65,7 +66,7 @@
"# Set parameters\n",
"pbox._input_widgets[Filename[SampleRun]].children[0].value = dream.data.simulated_diamond_sample()\n",
"pbox._input_widgets[Filename[VanadiumRun]].children[0].value = dream.data.simulated_vanadium_sample()\n",
"pbox._input_widgets[DspacingBins].children[0].fields[\"stop\"].value = 2.3434\n",
"pbox._input_widgets[DspacingBins].fields[\"stop\"].value = 2.3434\n",
"# Run the workflow\n",
"rbox = wfw.result_box\n",
"rbox.run_button.click()"
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.10"
# Make sure to list one dependency per line.
dependencies = [
"dask",
"essreduce>=24.11.3",
"essreduce>=24.12.0",
"graphviz",
"numpy",
"plopp",
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# --- END OF CUSTOM SECTION ---
# The following was generated by 'tox -e deps', DO NOT EDIT MANUALLY!
dask
essreduce>=24.11.3
essreduce>=24.12.0
graphviz
numpy
plopp
Expand Down
24 changes: 11 additions & 13 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# SHA1:6b89155439eb051cb7a3ca3e31678c9fa96a6f5a
# SHA1:1c545a5dfb8b66d23509534f3ddf41f94ead839c
#
# This file is autogenerated by pip-compile-multi
# To update, run:
#
# pip-compile-multi
#
asttokens==2.4.1
asttokens==3.0.0
# via stack-data
click==8.1.7
# via dask
Expand All @@ -19,17 +19,17 @@ cyclebane==24.10.0
# via sciline
cycler==0.12.1
# via matplotlib
dask==2024.11.2
dask==2024.12.1
# via -r base.in
decorator==5.1.1
# via ipython
essreduce==24.11.3
essreduce==24.12.0
# via -r base.in
exceptiongroup==1.2.2
# via ipython
executing==2.1.0
# via stack-data
fonttools==4.55.0
fonttools==4.55.3
# via matplotlib
fsspec==2024.10.0
# via dask
Expand All @@ -43,7 +43,7 @@ importlib-metadata==8.5.0
# via dask
ipydatawidgets==4.3.5
# via pythreejs
ipython==8.29.0
ipython==8.30.0
# via ipywidgets
ipywidgets==8.1.5
# via
Expand All @@ -57,7 +57,7 @@ kiwisolver==1.4.7
# via matplotlib
locket==1.0.0
# via partd
matplotlib==3.9.2
matplotlib==3.10.0
# via
# mpltoolbox
# plopp
Expand All @@ -67,7 +67,7 @@ mpltoolbox==24.5.1
# via scippneutron
networkx==3.4.2
# via cyclebane
numpy==2.1.3
numpy==2.2.0
# via
# -r base.in
# contourpy
Expand Down Expand Up @@ -123,7 +123,7 @@ scipp==24.11.2
# essreduce
# scippneutron
# scippnexus
scippneutron==24.11.0
scippneutron==24.12.0
# via
# -r base.in
# essreduce
Expand All @@ -136,10 +136,8 @@ scipy==1.14.1
# via
# scippneutron
# scippnexus
six==1.16.0
# via
# asttokens
# python-dateutil
six==1.17.0
# via python-dateutil
stack-data==0.6.3
# via ipython
toolz==1.0.0
Expand Down
8 changes: 4 additions & 4 deletions requirements/basetest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# pip-compile-multi
#
certifi==2024.8.30
certifi==2024.12.14
# via requests
charset-normalizer==3.4.0
# via requests
Expand All @@ -15,7 +15,7 @@ idna==3.10
# via requests
iniconfig==2.0.0
# via pytest
numpy==2.1.3
numpy==2.2.0
# via pandas
packaging==24.2
# via
Expand All @@ -29,15 +29,15 @@ pluggy==1.5.0
# via pytest
pooch==1.8.2
# via -r basetest.in
pytest==8.3.3
pytest==8.3.4
# via -r basetest.in
python-dateutil==2.9.0.post0
# via pandas
pytz==2024.2
# via pandas
requests==2.32.3
# via pooch
six==1.16.0
six==1.17.0
# via python-dateutil
tomli==2.2.1
# via pytest
Expand Down
2 changes: 1 addition & 1 deletion requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
cachetools==5.5.0
# via tox
certifi==2024.8.30
certifi==2024.12.14
# via requests
chardet==5.2.0
# via tox
Expand Down
22 changes: 10 additions & 12 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
-r wheels.txt
annotated-types==0.7.0
# via pydantic
anyio==4.6.2.post1
anyio==4.7.0
# via
# httpx
# jupyter-server
Expand All @@ -40,7 +40,7 @@ h11==0.14.0
# via httpcore
httpcore==1.0.7
# via httpx
httpx==0.27.2
httpx==0.28.1
# via jupyterlab
isoduration==20.11.0
# via jsonschema
Expand All @@ -55,7 +55,7 @@ jsonschema[format-nongpl]==4.23.0
# jupyter-events
# jupyterlab-server
# nbformat
jupyter-events==0.10.0
jupyter-events==0.11.0
# via jupyter-server
jupyter-lsp==2.2.5
# via jupyterlab
Expand All @@ -67,7 +67,7 @@ jupyter-server==2.14.2
# notebook-shim
jupyter-server-terminals==0.5.3
# via jupyter-server
jupyterlab==4.3.1
jupyterlab==4.3.4
# via -r dev.in
jupyterlab-server==2.27.3
# via jupyterlab
Expand All @@ -83,15 +83,15 @@ pip-tools==7.4.1
# via pip-compile-multi
plumbum==1.9.0
# via copier
prometheus-client==0.21.0
prometheus-client==0.21.1
# via jupyter-server
pycparser==2.22
# via cffi
pydantic==2.10.2
pydantic==2.10.4
# via copier
pydantic-core==2.27.1
pydantic-core==2.27.2
# via pydantic
python-json-logger==2.0.7
python-json-logger==3.2.1
# via jupyter-events
questionary==1.10.0
# via copier
Expand All @@ -106,16 +106,14 @@ rfc3986-validator==0.1.1
send2trash==1.8.3
# via jupyter-server
sniffio==1.3.1
# via
# anyio
# httpx
# via anyio
terminado==0.18.1
# via
# jupyter-server
# jupyter-server-terminals
toposort==1.10
# via pip-compile-multi
types-python-dateutil==2.9.0.20241003
types-python-dateutil==2.9.0.20241206
# via arrow
uri-template==1.3.0
# via jsonschema
Expand Down
18 changes: 8 additions & 10 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ accessible-pygments==0.0.5
# via pydata-sphinx-theme
alabaster==1.0.0
# via sphinx
attrs==24.2.0
attrs==24.3.0
# via
# jsonschema
# referencing
Expand All @@ -24,11 +24,11 @@ beautifulsoup4==4.12.3
# pydata-sphinx-theme
bleach==6.2.0
# via nbconvert
certifi==2024.8.30
certifi==2024.12.14
# via requests
charset-normalizer==3.4.0
# via requests
debugpy==1.8.9
debugpy==1.8.11
# via ipykernel
defusedxml==0.7.1
# via nbconvert
Expand All @@ -40,18 +40,16 @@ docutils==0.21.2
# pydata-sphinx-theme
# sphinx
# sphinxcontrib-bibtex
fastjsonschema==2.21.0
fastjsonschema==2.21.1
# via nbformat
idna==3.10
# via requests
imagesize==1.4.1
# via sphinx
ipykernel==6.29.5
# via -r docs.in
ipympl==0.9.4
ipympl==0.9.5
# via -r docs.in
ipython-genutils==0.2.0
# via ipympl
jinja2==3.1.4
# via
# myst-parser
Expand Down Expand Up @@ -93,7 +91,7 @@ mistune==3.0.2
# via nbconvert
myst-parser==4.0.0
# via -r docs.in
nbclient==0.10.0
nbclient==0.10.2
# via nbconvert
nbconvert==7.16.4
# via nbsphinx
Expand Down Expand Up @@ -126,7 +124,7 @@ pybtex==0.24.0
# sphinxcontrib-bibtex
pybtex-docutils==1.0.3
# via sphinxcontrib-bibtex
pydata-sphinx-theme==0.16.0
pydata-sphinx-theme==0.16.1
# via -r docs.in
pytz==2024.2
# via pandas
Expand All @@ -142,7 +140,7 @@ requests==2.32.3
# via
# pooch
# sphinx
rpds-py==0.21.0
rpds-py==0.22.3
# via
# jsonschema
# referencing
Expand Down
10 changes: 5 additions & 5 deletions requirements/nightly.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# pip-compile-multi
#
-r basetest.txt
asttokens==2.4.1
asttokens==3.0.0
# via stack-data
click==8.1.7
# via dask
Expand All @@ -20,15 +20,15 @@ cyclebane==24.10.0
# via sciline
cycler==0.12.1
# via matplotlib
dask==2024.11.2
dask==2024.12.1
# via -r nightly.in
decorator==5.1.1
# via ipython
essreduce @ git+https://github.com/scipp/essreduce@main
# via -r nightly.in
executing==2.1.0
# via stack-data
fonttools==4.55.0
fonttools==4.55.3
# via matplotlib
fsspec==2024.10.0
# via dask
Expand All @@ -42,7 +42,7 @@ importlib-metadata==8.5.0
# via dask
ipydatawidgets==4.3.5
# via pythreejs
ipython==8.29.0
ipython==8.30.0
# via ipywidgets
ipywidgets==8.1.5
# via
Expand All @@ -56,7 +56,7 @@ kiwisolver==1.4.7
# via matplotlib
locket==1.0.0
# via partd
matplotlib==3.9.2
matplotlib==3.10.0
# via
# mpltoolbox
# plopp
Expand Down
6 changes: 5 additions & 1 deletion src/ess/dream/io/geant4.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
NeXusDetectorName,
Position,
RunType,
SampleRun,
VanadiumRun,
)
from ess.reduce.nexus.types import CalibratedBeamline
from ess.reduce.nexus.workflow import GenericNeXusWorkflow
Expand Down Expand Up @@ -271,7 +273,9 @@ def LoadGeant4Workflow() -> sciline.Pipeline:
"""
Workflow for loading NeXus data.
"""
wf = GenericNeXusWorkflow()
wf = GenericNeXusWorkflow(
run_types=[SampleRun, VanadiumRun], monitor_types=[CaveMonitor]
)
wf.insert(extract_geant4_detector)
wf.insert(load_geant4_csv)
wf.insert(load_mcstas_monitor)
Expand Down
7 changes: 5 additions & 2 deletions src/ess/powder/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,20 @@
CaveMonitor = reduce_t.Monitor1
MonitorData = reduce_t.MonitorData
MonitorPositionOffset = reduce_t.MonitorPositionOffset
MonitorType = reduce_t.MonitorType
NeXusDetectorName = reduce_t.NeXusDetectorName
NeXusMonitorName = reduce_t.NeXusName
NeXusComponent = reduce_t.NeXusComponent
RunType = reduce_t.RunType
SampleRun = reduce_t.SampleRun
Position = reduce_t.Position
VanadiumRun = reduce_t.VanadiumRun

DetectorBankSizes = reduce_t.DetectorBankSizes

RunType = TypeVar("RunType", SampleRun, VanadiumRun)
# Include Monitor2 because a single constraint is not allowed.
# We will eventually have more than one...
MonitorType = TypeVar("MonitorType", CaveMonitor, reduce_t.Monitor2)


# 2 Workflow parameters

Expand Down

0 comments on commit aee7dc8

Please sign in to comment.