essreduce 25.9.0__py3-none-any.whl → 25.10.0__py3-none-any.whl

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.
@@ -0,0 +1,17 @@
1
+ # SPDX-License-Identifier: BSD-3-Clause
2
+ # Copyright (c) 2025 Scipp contributors (https://github.com/scipp)
3
+ """Data files bundled with ESSreduce.
4
+
5
+ This module requires the Pooch package which is not a hard dependency of ESSreduce.
6
+ It has to be installed separately with either pip or conda.
7
+ """
8
+
9
+ from ._registry import Entry, LocalRegistry, PoochRegistry, Registry, make_registry
10
+
11
+ __all__ = [
12
+ 'Entry',
13
+ 'LocalRegistry',
14
+ 'PoochRegistry',
15
+ 'Registry',
16
+ 'make_registry',
17
+ ]
@@ -0,0 +1,355 @@
1
+ # SPDX-License-Identifier: BSD-3-Clause
2
+ # Copyright (c) 2025 Scipp contributors (https://github.com/scipp)
3
+
4
+ from __future__ import annotations
5
+
6
+ import hashlib
7
+ import os
8
+ from abc import ABC, abstractmethod
9
+ from collections.abc import Mapping
10
+ from dataclasses import dataclass
11
+ from functools import cache
12
+ from pathlib import Path
13
+ from typing import Any
14
+
15
+ _LOCAL_CACHE_ENV_VAR = "SCIPP_DATA_DIR"
16
+ _LOCAL_REGISTRY_ENV_VAR = "SCIPP_OVERRIDE_DATA_DIR"
17
+
18
+
19
+ def make_registry(
20
+ prefix: str,
21
+ files: Mapping[str, str | Entry],
22
+ *,
23
+ version: str,
24
+ base_url: str = "https://public.esss.dk/groups/scipp",
25
+ retry_if_failed: int = 3,
26
+ ) -> Registry:
27
+ """Create a file registry object.
28
+
29
+ By default, this function creates a :class:`PoochRegistry` to download files
30
+ via HTTP from an online file store.
31
+ This can be overridden by setting the environment variable `SCIPP_DATA_DIR` to a
32
+ path on the local file system.
33
+ In this case, a :class:`LocalRegistry` is returned.
34
+
35
+ Files are specified as a dict using either the Pooch string format explicitly
36
+ constructed :class:`Entry` objects:
37
+
38
+ >>> from ess.reduce.data import Entry
39
+ >>> files = {
40
+ ... "file1.dat": "md5:1234567890abcdef",
41
+ ... "file2.csv": Entry(alg="md5", chk="abcdef123456789"),
42
+ ... "folder/nested.dat": "blake2b:1234567890abcdef",
43
+ ... "zipped.zip": Entry(alg="blake2b", chk="abcdef123456789", unzip=True),
44
+ ... }
45
+
46
+ In the example above, the specifications for ``file1.dat`` and ``file2.csv`` are
47
+ essentially equivalent.
48
+ ``folder/nested.dat`` is a file in a subfolder.
49
+ Paths like this must always use forward slashes (/) even on Windows.
50
+
51
+ As shown above, it is possible to automatically unzip
52
+ files by specifying ``unzip=True``.
53
+ When calling ``registry.get_path("zipped.zip")`` the file will be unzipped and
54
+ a path to the content is returned.
55
+ This expects that there is only a single file in the zip archive.
56
+
57
+ The complete path to the source file is constructed as follows:
58
+
59
+ - Pooch: ``{base_url}/{prefix}/{version}/{name}``
60
+ - Local: ``{SCIPP_OVERRIDE_DATA_DIR}/{prefix}/{version}/{name}``
61
+
62
+ When using Pooch, files are downloaded to the user's cache directory.
63
+ This can be controlled with the environment variable ``SCIPP_CACHE_DIR``.
64
+
65
+ Parameters
66
+ ----------
67
+ prefix:
68
+ Prefix to add to all file names.
69
+ files:
70
+ Mapping of file names to checksums or :class:`Entry` objects.
71
+ version:
72
+ A version string for the files.
73
+ base_url:
74
+ URL for the online file store.
75
+ Ignored if the override environment variable is set.
76
+ retry_if_failed:
77
+ Number of retries when downloading a file.
78
+ Ignored if the override environment variable is set.
79
+
80
+ Returns
81
+ -------
82
+ :
83
+ Either a :class:`PoochRegistry` or :class:`LocalRegistry`.
84
+ """
85
+ if (override := os.environ.get(_LOCAL_REGISTRY_ENV_VAR)) is not None:
86
+ return LocalRegistry(
87
+ _check_local_override_path(override),
88
+ prefix,
89
+ files,
90
+ version=version,
91
+ base_url=base_url,
92
+ retry_if_failed=retry_if_failed,
93
+ )
94
+ return PoochRegistry(
95
+ prefix,
96
+ files,
97
+ version=version,
98
+ base_url=base_url,
99
+ retry_if_failed=retry_if_failed,
100
+ )
101
+
102
+
103
+ def _check_local_override_path(override: str) -> Path:
104
+ path = Path(override)
105
+ if not path.is_dir():
106
+ raise ValueError(
107
+ f"The data override path '{override}' is not a directory. If you want to "
108
+ "download files instead, unset the environment variable "
109
+ f"{_LOCAL_REGISTRY_ENV_VAR}."
110
+ )
111
+ return path
112
+
113
+
114
+ @dataclass(frozen=True, slots=True)
115
+ class Entry:
116
+ """An entry in a registry."""
117
+
118
+ chk: str
119
+ """Checksum."""
120
+ alg: str
121
+ """Checksum algorithm."""
122
+ unzip: bool = False
123
+ """Whether to unzip the file."""
124
+
125
+ @classmethod
126
+ def from_pooch_string(cls, pooch_string: str) -> Entry:
127
+ alg, chk = pooch_string.split(":")
128
+ return cls(chk=chk, alg=alg)
129
+
130
+
131
+ class Registry(ABC):
132
+ def __init__(self, files: Mapping[str, str | Entry]) -> None:
133
+ self._files = _to_file_entries(files)
134
+
135
+ @abstractmethod
136
+ def get_path(self, name: str) -> Path:
137
+ """Get the path to a file in the registry.
138
+
139
+ Depending on the implementation, the file is downloaded if necessary.
140
+
141
+ Note that implementations are allowed to cache return values of this method
142
+ to avoid recomputing potentially expensive checksums.
143
+ This usually means that the ``Registry`` object itself gets stored until the
144
+ Python interpreter shuts down.
145
+ However, registries are small and do not own resources.
146
+
147
+ Parameters
148
+ ----------
149
+ name:
150
+ Name of the file to get the path for.
151
+
152
+ Returns
153
+ -------
154
+ :
155
+ The Path to the file.
156
+ """
157
+
158
+ def _needs_unzip(self, name: str) -> bool:
159
+ return self._files[name].unzip
160
+
161
+
162
+ class PoochRegistry(Registry):
163
+ def __init__(
164
+ self,
165
+ prefix: str,
166
+ files: Mapping[str, str | Entry],
167
+ *,
168
+ version: str,
169
+ base_url: str,
170
+ retry_if_failed: int = 3,
171
+ ) -> None:
172
+ self._registry = _create_pooch(
173
+ prefix,
174
+ files,
175
+ version=version,
176
+ base_url=base_url,
177
+ retry_if_failed=retry_if_failed,
178
+ )
179
+ self._unzip_processor = _import_pooch().Unzip()
180
+ super().__init__(files)
181
+
182
+ @cache # noqa: B019
183
+ def get_path(self, name: str) -> Path:
184
+ """Get the path to a file in the registry.
185
+
186
+ Downloads the file if necessary.
187
+ """
188
+ if self._needs_unzip(name):
189
+ paths: list[str] = self._registry.fetch( # type: ignore[assignment]
190
+ name, processor=self._unzip_processor
191
+ )
192
+ return Path(_expect_single_unzipped(paths, name))
193
+ return Path(self._registry.fetch(name))
194
+
195
+
196
+ class LocalRegistry(Registry):
197
+ def __init__(
198
+ self,
199
+ source_path: Path,
200
+ prefix: str,
201
+ files: Mapping[str, str | Entry],
202
+ *,
203
+ version: str,
204
+ base_url: str,
205
+ retry_if_failed: int = 3,
206
+ ) -> None:
207
+ # Piggyback off of Pooch to determine the cache directory.
208
+ pooch_registry = _create_pooch(
209
+ prefix,
210
+ files,
211
+ version=version,
212
+ base_url=base_url,
213
+ retry_if_failed=retry_if_failed,
214
+ )
215
+ pooch = _import_pooch()
216
+ self._unzip_processor = pooch.processors.Unzip(extract_dir=pooch_registry.path)
217
+ self._source_path = source_path.resolve().joinpath(*prefix.split("/"), version)
218
+ super().__init__(files)
219
+
220
+ @cache # noqa: B019
221
+ def get_path(self, name: str) -> Path:
222
+ """Get the path to a file in the registry."""
223
+ try:
224
+ entry = self._files[name]
225
+ except KeyError:
226
+ raise ValueError(f"File '{name}' is not in the registry.") from None
227
+
228
+ path = self._local_path(name)
229
+ if not path.exists():
230
+ raise FileNotFoundError(
231
+ f"File '{name}' is registered but does not exist on the file system. "
232
+ f"Expected it at '{path}'."
233
+ )
234
+
235
+ _check_hash(name, path, entry)
236
+
237
+ if self._needs_unzip(name):
238
+ return Path(
239
+ _expect_single_unzipped(
240
+ self._unzip_processor(os.fspath(path), "download", None), path
241
+ )
242
+ )
243
+ return path
244
+
245
+ def _local_path(self, name: str) -> Path:
246
+ # Split on "/" because `name` is always a POSIX-style path, but the return
247
+ # value is a system path, i.e., it can be a Windows-style path.
248
+ return self._source_path.joinpath(*name.split("/"))
249
+
250
+
251
+ def _import_pooch() -> Any:
252
+ try:
253
+ import pooch
254
+ except ImportError:
255
+ raise ImportError(
256
+ "You need to install Pooch to access test and tutorial files. "
257
+ "See https://www.fatiando.org/pooch/latest/index.html"
258
+ ) from None
259
+
260
+ return pooch
261
+
262
+
263
+ def _create_pooch(
264
+ prefix: str,
265
+ files: Mapping[str, str | Entry],
266
+ *,
267
+ version: str,
268
+ base_url: str,
269
+ retry_if_failed: int = 3,
270
+ ) -> Any:
271
+ pooch = _import_pooch()
272
+ return pooch.create(
273
+ path=pooch.os_cache(prefix),
274
+ env=_LOCAL_CACHE_ENV_VAR,
275
+ base_url=f'{base_url}/{prefix}/{version}/',
276
+ registry=_to_pooch_registry(files),
277
+ retry_if_failed=retry_if_failed,
278
+ )
279
+
280
+
281
+ def _pooch_unzip_processor(extract_dir: Path) -> Any:
282
+ try:
283
+ import pooch
284
+ except ImportError:
285
+ raise ImportError("You need to install Pooch to unzip files.") from None
286
+
287
+ return pooch.processors.Unzip(extract_dir=os.fspath(extract_dir))
288
+
289
+
290
+ def _expect_single_unzipped(paths: list[str], archive: str | os.PathLike) -> str:
291
+ if len(paths) != 1:
292
+ raise ValueError(
293
+ f"Expected exactly one file to unzip, got {len(paths)} in "
294
+ f"'{os.fspath(archive)}'."
295
+ )
296
+ return paths[0]
297
+
298
+
299
+ def _check_hash(name: str, path: Path, entry: Entry) -> None:
300
+ new_chk = _checksum_of_file(path, algorithm=entry.alg)
301
+ if new_chk.lower() != entry.chk.lower():
302
+ raise ValueError(
303
+ f"{entry.alg} hash of file '{name}' does not match the known hash: "
304
+ f"expected {entry.chk}, got {new_chk}."
305
+ )
306
+
307
+
308
+ def _to_file_entries(files: Mapping[str, str | Entry]) -> dict[str, Entry]:
309
+ return {
310
+ name: entry if isinstance(entry, Entry) else Entry.from_pooch_string(entry)
311
+ for name, entry in files.items()
312
+ }
313
+
314
+
315
+ def _to_pooch_registry(files: Mapping[str, str | Entry]) -> dict[str, str]:
316
+ return {
317
+ name: f"{entry.alg}:{entry.chk}" if isinstance(entry, Entry) else entry
318
+ for name, entry in files.items()
319
+ }
320
+
321
+
322
+ # Code taken from Scitacean and Pooch.
323
+ def _checksum_of_file(path: Path, *, algorithm: str) -> str:
324
+ """Compute the checksum of a local file.
325
+
326
+ Parameters
327
+ ----------
328
+ path:
329
+ Path of the file.
330
+ algorithm:
331
+ Hash algorithm to use.
332
+ Can be any algorithm supported by :func:`hashlib.new`.
333
+
334
+ Returns
335
+ -------
336
+ :
337
+ The hex digest of the hash.
338
+ """
339
+ chk = _new_hash(algorithm)
340
+ # size based on http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob;f=src/ioblksize.h;h=ed2f4a9c4d77462f357353eb73ee4306c28b37f1;hb=HEAD#l23 # noqa: E501
341
+ buffer = memoryview(bytearray(128 * 1024))
342
+ with open(path, "rb", buffering=0) as file:
343
+ for n in iter(lambda: file.readinto(buffer), 0):
344
+ chk.update(buffer[:n])
345
+ return chk.hexdigest() # type: ignore[no-any-return]
346
+
347
+
348
+ def _new_hash(algorithm: str) -> Any:
349
+ # Try to use a named constructor instead of hashlib.new where possible
350
+ # because that is supposed to be faster, according to
351
+ # https://docs.python.org/3/library/hashlib.html#hashlib.new
352
+ try:
353
+ return getattr(hashlib, algorithm)()
354
+ except AttributeError:
355
+ return hashlib.new(algorithm, usedforsecurity=False)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: essreduce
3
- Version: 25.9.0
3
+ Version: 25.10.0
4
4
  Summary: Common data reduction tools for the ESS facility
5
5
  Author: Scipp contributors
6
6
  License-Expression: BSD-3-Clause
@@ -1,5 +1,4 @@
1
1
  ess/reduce/__init__.py,sha256=o1pWRP9YGwTukM_k-qlG6KcoXOpMb0PDVH59vod12lw,419
2
- ess/reduce/data.py,sha256=66FYykg1do4xc_oEEeCu3pyAsyFwniUqEE3ofQIVvwI,5337
3
2
  ess/reduce/logging.py,sha256=6n8Czq4LZ3OK9ENlKsWSI1M3KvKv6_HSoUiV4__IUlU,357
4
3
  ess/reduce/parameter.py,sha256=4sCfoKOI2HuO_Q7JLH_jAXnEOFANSn5P3NdaOBzhJxc,4635
5
4
  ess/reduce/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -7,6 +6,8 @@ ess/reduce/streaming.py,sha256=zbqxQz5dASDq4ZVyx-TdbapBXMyBttImCYz_6WOj4pg,17978
7
6
  ess/reduce/ui.py,sha256=zmorAbDwX1cU3ygDT--OP58o0qU7OBcmJz03jPeYSLA,10884
8
7
  ess/reduce/uncertainty.py,sha256=LR4O6ApB6Z-W9gC_XW0ajupl8yFG-du0eee1AX_R-gk,6990
9
8
  ess/reduce/workflow.py,sha256=738-lcdgsORYfQ4A0UTk2IgnbVxC3jBdpscpaOFIpdc,3114
9
+ ess/reduce/data/__init__.py,sha256=uDtqkmKA_Zwtj6II25zntz9T812XhdCn3tktYev4uyY,486
10
+ ess/reduce/data/_registry.py,sha256=TeEiy2HDKeLXXzSMwvusJqozPA_vPJSz7R8YttgvhxE,11126
10
11
  ess/reduce/live/__init__.py,sha256=jPQVhihRVNtEDrE20PoKkclKV2aBF1lS7cCHootgFgI,204
11
12
  ess/reduce/live/raw.py,sha256=66qV0G2rP8gK5tXuk-syTlDLE2jT3ehfmSnET7Xzfd0,24392
12
13
  ess/reduce/live/roi.py,sha256=Hs-pW98k41WU6Kl3UQ41kQawk80c2QNOQ_WNctLzDPE,3795
@@ -39,9 +40,9 @@ ess/reduce/widgets/_spinner.py,sha256=2VY4Fhfa7HMXox2O7UbofcdKsYG-AJGrsgGJB85nDX
39
40
  ess/reduce/widgets/_string_widget.py,sha256=iPAdfANyXHf-nkfhgkyH6gQDklia0LebLTmwi3m-iYQ,1482
40
41
  ess/reduce/widgets/_switchable_widget.py,sha256=fjKz99SKLhIF1BLgGVBSKKn3Lu_jYBwDYGeAjbJY3Q8,2390
41
42
  ess/reduce/widgets/_vector_widget.py,sha256=aTaBqCFHZQhrIoX6-sSqFWCPePEW8HQt5kUio8jP1t8,1203
42
- essreduce-25.9.0.dist-info/licenses/LICENSE,sha256=nVEiume4Qj6jMYfSRjHTM2jtJ4FGu0g-5Sdh7osfEYw,1553
43
- essreduce-25.9.0.dist-info/METADATA,sha256=T-UsR4D9r5xXxCRWnc_LFgI9ogEWKK2GBkfn5MD4cP8,1936
44
- essreduce-25.9.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
45
- essreduce-25.9.0.dist-info/entry_points.txt,sha256=PMZOIYzCifHMTe4pK3HbhxUwxjFaZizYlLD0td4Isb0,66
46
- essreduce-25.9.0.dist-info/top_level.txt,sha256=0JxTCgMKPLKtp14wb1-RKisQPQWX7i96innZNvHBr-s,4
47
- essreduce-25.9.0.dist-info/RECORD,,
43
+ essreduce-25.10.0.dist-info/licenses/LICENSE,sha256=nVEiume4Qj6jMYfSRjHTM2jtJ4FGu0g-5Sdh7osfEYw,1553
44
+ essreduce-25.10.0.dist-info/METADATA,sha256=wn62SjFqeWbNwZMN-K_mBxRJmQy9_rjJx79L6d_UHyk,1937
45
+ essreduce-25.10.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
46
+ essreduce-25.10.0.dist-info/entry_points.txt,sha256=PMZOIYzCifHMTe4pK3HbhxUwxjFaZizYlLD0td4Isb0,66
47
+ essreduce-25.10.0.dist-info/top_level.txt,sha256=0JxTCgMKPLKtp14wb1-RKisQPQWX7i96innZNvHBr-s,4
48
+ essreduce-25.10.0.dist-info/RECORD,,
ess/reduce/data.py DELETED
@@ -1,154 +0,0 @@
1
- # SPDX-License-Identifier: BSD-3-Clause
2
- # Copyright (c) 2025 Scipp contributors (https://github.com/scipp)
3
- """Data files bundled with ESSreduce."""
4
-
5
- from functools import cache
6
- from pathlib import Path
7
-
8
-
9
- class Registry:
10
- """A registry for data files.
11
-
12
- Note
13
- ----
14
- This class requires [Pooch](https://www.fatiando.org/pooch/latest/) which
15
- is not a hard dependency of ESSreduce and needs to be installed separately.
16
- """
17
-
18
- def __init__(
19
- self,
20
- instrument: str,
21
- files: dict[str, str],
22
- version: str,
23
- retry_if_failed: int = 3,
24
- ) -> None:
25
- import pooch
26
-
27
- self._registry = pooch.create(
28
- path=pooch.os_cache(f'ess/{instrument}'),
29
- env=f'ESS_{instrument.upper()}_DATA_DIR',
30
- base_url=f'https://public.esss.dk/groups/scipp/ess/{instrument}/'
31
- + '{version}/',
32
- version=version,
33
- registry=files,
34
- retry_if_failed=retry_if_failed,
35
- )
36
- self._unzip_processor = pooch.Unzip()
37
-
38
- def __contains__(self, key: str) -> bool:
39
- """Return True if the key is in the registry."""
40
- return key in self._registry.registry
41
-
42
- @cache # noqa: B019
43
- def get_path(self, name: str, unzip: bool = False) -> Path:
44
- """Get the path to a file in the registry.
45
-
46
- Downloads the file if necessary.
47
-
48
- Note that return values of this method are cached to avoid recomputing
49
- potentially expensive checksums.
50
- This usually means that the ``Registry`` object itself gets stored until the
51
- Python interpreter shuts down.
52
- However, registries are small and do not own resources.
53
- It is anyway expected that the registry objects are stored at
54
- module scope and live until program exit.
55
-
56
- Parameters
57
- ----------
58
- name:
59
- Name of the file to get the path for.
60
- unzip:
61
- If `True`, unzip the file before returning the path.
62
-
63
- Returns
64
- -------
65
- :
66
- The Path to the file.
67
- """
68
- return Path(
69
- self._registry.fetch(
70
- name, processor=self._unzip_processor if unzip else None
71
- )
72
- )
73
-
74
-
75
- _bifrost_registry = Registry(
76
- instrument='bifrost',
77
- files={
78
- "BIFROST_20240914T053723.h5": "md5:0f2fa5c9a851f8e3a4fa61defaa3752e",
79
- },
80
- version='1',
81
- )
82
-
83
-
84
- _dream_registry = Registry(
85
- instrument='dream',
86
- files={
87
- "TEST_977695_00068064.hdf": "md5:9e6ee9ec70d7c5e8c0c93b9e07e8949f",
88
- },
89
- version='2',
90
- )
91
-
92
-
93
- _loki_registry = Registry(
94
- instrument='loki',
95
- files={
96
- # Files from LoKI@Larmor detector test experiment
97
- #
98
- # Background run 1 (no sample, sample holder/can only, no transmission monitor)
99
- '60248-2022-02-28_2215.nxs': 'md5:d9f17b95274a0fc6468df7e39df5bf03',
100
- # Sample run 1 (sample + sample holder/can, no transmission monitor in beam)
101
- '60250-2022-02-28_2215.nxs': 'md5:6a519ceaacbae702a6d08241e86799b1',
102
- # Sample run 2 (sample + sample holder/can, no transmission monitor in beam)
103
- '60339-2022-02-28_2215.nxs': 'md5:03c86f6389566326bb0cbbd80b8f8c4f',
104
- # Background transmission run (sample holder/can + transmission monitor)
105
- '60392-2022-02-28_2215.nxs': 'md5:9ecc1a9a2c05a880144afb299fc11042',
106
- # Background run 2 (no sample, sample holder/can only, no transmission monitor)
107
- '60393-2022-02-28_2215.nxs': 'md5:bf550d0ba29931f11b7450144f658652',
108
- # Sample transmission run (sample + sample holder/can + transmission monitor)
109
- '60394-2022-02-28_2215.nxs': 'md5:c40f38a62337d86957af925296c4c615',
110
- # Analytical model for the I(Q) of the Poly-Gauss sample
111
- 'PolyGauss_I0-50_Rg-60.h5': 'md5:f5d60d9c2286cb197b8cd4dc82db3d7e',
112
- # XML file for the pixel mask
113
- 'mask_new_July2022.xml': 'md5:421b6dc9db74126ffbc5d88164d017b0',
114
- },
115
- version='2',
116
- )
117
-
118
-
119
- def bifrost_simulated_elastic() -> Path:
120
- """McStas simulation with elastic incoherent scattering + phonon."""
121
- return _bifrost_registry.get_path('BIFROST_20240914T053723.h5')
122
-
123
-
124
- def loki_tutorial_sample_run_60250() -> Path:
125
- """Sample run with sample and sample holder/can, no transmission monitor in beam."""
126
- return _loki_registry.get_path('60250-2022-02-28_2215.nxs')
127
-
128
-
129
- def loki_tutorial_sample_run_60339() -> Path:
130
- """Sample run with sample and sample holder/can, no transmission monitor in beam."""
131
- return _loki_registry.get_path('60339-2022-02-28_2215.nxs')
132
-
133
-
134
- def loki_tutorial_background_run_60248() -> Path:
135
- """Background run with sample holder/can only, no transmission monitor."""
136
- return _loki_registry.get_path('60248-2022-02-28_2215.nxs')
137
-
138
-
139
- def loki_tutorial_background_run_60393() -> Path:
140
- """Background run with sample holder/can only, no transmission monitor."""
141
- return _loki_registry.get_path('60393-2022-02-28_2215.nxs')
142
-
143
-
144
- def loki_tutorial_sample_transmission_run() -> Path:
145
- """Sample transmission run (sample + sample holder/can + transmission monitor)."""
146
- return _loki_registry.get_path('60394-2022-02-28_2215.nxs')
147
-
148
-
149
- def dream_coda_test_file() -> Path:
150
- """CODA file for DREAM where most pulses have been removed.
151
-
152
- See ``tools/shrink_nexus.py``.
153
- """
154
- return _dream_registry.get_path('TEST_977695_00068064.hdf')