Skip to content

Commit acf1cba

Browse files
authored
Merge pull request #50 from scipp/new-sciline-release
Compatibility with new sciline
2 parents 449ed90 + 657957c commit acf1cba

File tree

11 files changed

+57
-50
lines changed

11 files changed

+57
-50
lines changed

docs/user-guide/amor/amor-reduction.ipynb

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -147,19 +147,20 @@
147147
"metadata": {},
148148
"outputs": [],
149149
"source": [
150-
"workflow[Filename[SampleRun]] = amor.data.amor_sample_run(608)\n",
151-
"workflow[SampleRotation[SampleRun]] = sc.scalar(0.85, unit='deg')\n",
152-
"ioq8 = workflow.compute(NormalizedIofQ).hist()\n",
153-
"\n",
154-
"workflow[Filename[SampleRun]] = amor.data.amor_sample_run(609)\n",
155-
"workflow[SampleRotation[SampleRun]] = sc.scalar(2.25, unit='deg')\n",
156-
"ioq9 = workflow.compute(NormalizedIofQ).hist()\n",
150+
"runs = {\n",
151+
" '608': sc.scalar(0.85, unit='deg'),\n",
152+
" '609': sc.scalar(2.25, unit='deg'),\n",
153+
" '610': sc.scalar(3.65, unit='deg'),\n",
154+
" '611': sc.scalar(5.05, unit='deg'),\n",
155+
"}\n",
157156
"\n",
158-
"workflow[Filename[SampleRun]] = amor.data.amor_sample_run(610)\n",
159-
"workflow[SampleRotation[SampleRun]] = sc.scalar(3.65, unit='deg')\n",
160-
"ioq10 = workflow.compute(NormalizedIofQ).hist()\n",
157+
"results = {}\n",
158+
"for file, angle in runs.items():\n",
159+
" workflow[Filename[SampleRun]] = amor.data.amor_sample_run(file)\n",
160+
" workflow[SampleRotation[SampleRun]] = angle\n",
161+
" results[file] = workflow.compute(NormalizedIofQ).hist()\n",
161162
"\n",
162-
"sc.plot({'608': ioq8, '609': ioq9, '610': ioq10}, norm='log', vmin=1e-4)"
163+
"sc.plot(results, norm='log', vmin=1e-4)"
163164
]
164165
},
165166
{
@@ -353,7 +354,8 @@
353354
"mimetype": "text/x-python",
354355
"name": "python",
355356
"nbconvert_exporter": "python",
356-
"pygments_lexer": "ipython3"
357+
"pygments_lexer": "ipython3",
358+
"version": "3.10.13"
357359
}
358360
},
359361
"nbformat": 4,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dependencies = [
3636
"plopp",
3737
"pythreejs",
3838
"orsopy",
39-
"sciline>=23.9.1",
39+
"sciline>=24.6.0",
4040
"scipp>=23.8.0",
4141
"scippneutron>=23.9.0",
4242
"essreduce",

requirements/base.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ graphviz
88
plopp
99
pythreejs
1010
orsopy
11-
sciline>=23.9.1
11+
sciline>=24.6.0
1212
scipp>=23.8.0
1313
scippneutron>=23.9.0
1414
essreduce

requirements/base.txt

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SHA1:1b431955cc8f1e9144b3b02f13d86b0693935140
1+
# SHA1:e11d135cfcc0ae8694f1a9061a0aaea415f470f2
22
#
33
# This file is autogenerated by pip-compile-multi
44
# To update, run:
@@ -19,9 +19,11 @@ comm==0.2.2
1919
# via ipywidgets
2020
contourpy==1.2.1
2121
# via matplotlib
22+
cyclebane==24.6.0
23+
# via sciline
2224
cycler==0.12.1
2325
# via matplotlib
24-
dask==2024.5.2
26+
dask==2024.6.0
2527
# via -r base.in
2628
decorator==5.1.1
2729
# via ipython
@@ -65,7 +67,9 @@ matplotlib==3.9.0
6567
# via plopp
6668
matplotlib-inline==0.1.7
6769
# via ipython
68-
numpy==1.26.4
70+
networkx==3.3
71+
# via cyclebane
72+
numpy==2.0.0
6973
# via
7074
# contourpy
7175
# h5py
@@ -92,7 +96,7 @@ pillow==10.3.0
9296
# via matplotlib
9397
platformdirs==4.2.2
9498
# via pooch
95-
plopp==24.5.0
99+
plopp==24.6.0
96100
# via
97101
# -r base.in
98102
# scippneutron
@@ -121,7 +125,7 @@ pyyaml==6.0.1
121125
# orsopy
122126
requests==2.32.3
123127
# via pooch
124-
sciline==24.4.1
128+
sciline==24.6.0
125129
# via -r base.in
126130
scipp==24.5.1
127131
# via
@@ -131,7 +135,7 @@ scipp==24.5.1
131135
# scippnexus
132136
scippneutron==24.5.0
133137
# via -r base.in
134-
scippnexus==24.3.1
138+
scippnexus==24.6.0
135139
# via
136140
# essreduce
137141
# scippneutron
@@ -161,7 +165,7 @@ traittypes==0.2.1
161165
# via ipydatawidgets
162166
typing-extensions==4.12.2
163167
# via ipython
164-
urllib3==2.2.1
168+
urllib3==2.2.2
165169
# via requests
166170
wcwidth==0.2.13
167171
# via prompt-toolkit

requirements/ci.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ colorama==0.4.6
1717
# via tox
1818
distlib==0.3.8
1919
# via virtualenv
20-
filelock==3.14.0
20+
filelock==3.15.1
2121
# via
2222
# tox
2323
# virtualenv
@@ -50,7 +50,7 @@ tomli==2.0.1
5050
# tox
5151
tox==4.15.1
5252
# via -r ci.in
53-
urllib3==2.2.1
53+
urllib3==2.2.2
5454
# via requests
5555
virtualenv==20.26.2
5656
# via tox

requirements/dev.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jinja2-ansible-filters==1.3.2
4848
# via copier
4949
json5==0.9.25
5050
# via jupyterlab-server
51-
jsonpointer==2.4
51+
jsonpointer==3.0.0
5252
# via jsonschema
5353
jsonschema[format-nongpl]==4.22.0
5454
# via
@@ -87,7 +87,7 @@ prometheus-client==0.20.0
8787
# via jupyter-server
8888
pycparser==2.22
8989
# via cffi
90-
pydantic==2.7.3
90+
pydantic==2.7.4
9191
# via copier
9292
pydantic-core==2.18.4
9393
# via pydantic

requirements/docs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ docutils==0.21.2
3434
# nbsphinx
3535
# pydata-sphinx-theme
3636
# sphinx
37-
fastjsonschema==2.19.1
37+
fastjsonschema==2.20.0
3838
# via nbformat
3939
imagesize==1.4.1
4040
# via sphinx

requirements/nightly.txt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ cyclebane==24.6.0
2424
# via sciline
2525
cycler==0.12.1
2626
# via matplotlib
27-
dask==2024.5.2
27+
dask==2024.6.0
2828
# via -r nightly.in
2929
decorator==5.1.1
3030
# via ipython
@@ -63,17 +63,22 @@ kiwisolver==1.4.5
6363
locket==1.0.0
6464
# via partd
6565
matplotlib==3.9.0
66-
# via plopp
66+
# via
67+
# mpltoolbox
68+
# plopp
6769
matplotlib-inline==0.1.7
6870
# via ipython
71+
mpltoolbox==24.5.1
72+
# via scippneutron
6973
networkx==3.3
7074
# via cyclebane
71-
numpy==1.26.4
75+
numpy==2.0.0
7276
# via
7377
# contourpy
7478
# h5py
7579
# ipydatawidgets
7680
# matplotlib
81+
# mpltoolbox
7782
# pythreejs
7883
# scipp
7984
# scippneutron
@@ -160,7 +165,7 @@ traittypes==0.2.1
160165
# via ipydatawidgets
161166
typing-extensions==4.12.2
162167
# via ipython
163-
urllib3==2.2.1
168+
urllib3==2.2.2
164169
# via requests
165170
wcwidth==0.2.13
166171
# via prompt-toolkit

requirements/static.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ cfgv==3.4.0
99
# via pre-commit
1010
distlib==0.3.8
1111
# via virtualenv
12-
filelock==3.14.0
12+
filelock==3.15.1
1313
# via virtualenv
1414
identify==2.5.36
1515
# via pre-commit

src/ess/reflectometry/orso.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import os
1111
import platform
1212
from datetime import datetime, timezone
13-
from typing import Any, NewType, Optional
13+
from typing import Any, NewType
1414

1515
from dateutil.parser import parse as parse_datetime
1616
from orsopy.fileio import base as orso_base
@@ -109,8 +109,8 @@ def parse_orso_sample(filename: Filename[SampleRun]) -> OrsoSample:
109109

110110
def build_orso_measurement(
111111
sample_filename: Filename[SampleRun],
112-
reference_filename: Optional[Filename[ReferenceRun]],
113-
instrument: Optional[OrsoInstrument],
112+
reference_filename: Filename[ReferenceRun],
113+
instrument: OrsoInstrument,
114114
) -> OrsoMeasurement:
115115
"""Assemble ORSO measurement metadata."""
116116
# TODO populate timestamp
@@ -133,7 +133,7 @@ def build_orso_measurement(
133133
)
134134

135135

136-
def build_orso_reduction(creator: Optional[OrsoCreator]) -> OrsoReduction:
136+
def build_orso_reduction(creator: OrsoCreator) -> OrsoReduction:
137137
"""Construct ORSO reduction metadata.
138138
139139
This assumes that ess.reflectometry is the primary piece of software
@@ -157,10 +157,10 @@ def build_orso_reduction(creator: Optional[OrsoCreator]) -> OrsoReduction:
157157

158158

159159
def build_orso_data_source(
160-
owner: Optional[OrsoOwner],
161-
sample: Optional[OrsoSample],
162-
experiment: Optional[OrsoExperiment],
163-
measurement: Optional[OrsoMeasurement],
160+
owner: OrsoOwner,
161+
sample: OrsoSample,
162+
experiment: OrsoExperiment,
163+
measurement: OrsoMeasurement,
164164
) -> OrsoDataSource:
165165
"""Assemble an ORSO DataSource."""
166166
return OrsoDataSource(

0 commit comments

Comments
 (0)