We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ec0fb3 commit af22db7Copy full SHA for af22db7
src/ess/amor/conversions.py
@@ -163,7 +163,7 @@ def add_masks(
163
and by wavelength.
164
"""
165
da = da.assign_masks(
166
- stripe_range=_not_between(da.coords["stripe"], *ylim),
+ strip_range=_not_between(da.coords["strip"], *ylim),
167
z_range=_not_between(da.coords["z_index"], *zlims),
168
)
169
da = da.bins.assign_masks(
src/ess/amor/geometry.py
@@ -10,8 +10,8 @@ class Detector:
10
nBlades = sc.scalar(14)
11
# number of wires per blade
12
nWires = sc.scalar(32)
13
- # number of stripes per blade
14
- nStripes = sc.scalar(64)
+ # number of strips per blade
+ nStrips = sc.scalar(64)
15
# angle of incidence of the beam on the blades (def: 5.1)
16
angle = sc.scalar(5.1, unit="degree").to(unit="rad")
17
# height-distance of neighboring pixels on one blade
@@ -34,21 +34,21 @@ def pixel_coordinates_in_detector_system() -> tuple[sc.Variable, sc.Variable]:
34
'row',
35
1,
36
(
37
- Detector.nBlades * Detector.nWires * Detector.nStripes + sc.scalar(1)
+ Detector.nBlades * Detector.nWires * Detector.nStrips + sc.scalar(1)
38
).values,
39
unit=None,
40
).fold(
41
42
sizes={
43
'blade': Detector.nBlades,
44
'wire': Detector.nWires,
45
- 'stripe': Detector.nStripes,
+ 'strip': Detector.nStrips,
46
},
47
),
48
coords={
49
'blade': sc.arange('blade', sc.scalar(0), Detector.nBlades),
50
'wire': sc.arange('wire', sc.scalar(0), Detector.nWires),
51
- 'stripe': sc.arange('stripe', sc.scalar(0), Detector.nStripes),
+ 'strip': sc.arange('strip', sc.scalar(0), Detector.nStrips),
52
53
54
# x position in detector
src/ess/estia/maskings.py
@@ -27,7 +27,7 @@ def add_masks(
27
28
29
30
31
32
divergence_too_large=_not_between(
33
da.coords["divergence_angle"],
src/ess/estia/workflow.py
@@ -4,20 +4,16 @@
4
import sciline
5
import scipp as sc
6
7
-from ess.reduce import nexus
8
-
9
from ..reflectometry import providers as reflectometry_providers
from ..reflectometry import supermirror
from ..reflectometry.types import (
BeamDivergenceLimits,
DetectorSpatialResolution,
NeXusDetectorName,
- ReferenceRun,
RunType,
SampleRotationOffset,
18
- SampleRun,
19
20
-from . import conversions, corrections, load, maskings, normalization, orso
+from . import beamline, conversions, corrections, load, maskings, normalization, orso
21
22
_general_providers = (
23
*reflectometry_providers,
@@ -74,9 +70,7 @@ def EstiaMcStasWorkflow() -> sciline.Pipeline:
74
70
75
71
def EstiaWorkflow() -> sciline.Pipeline:
76
72
"""Workflow for reduction of data for the Estia instrument."""
77
- workflow = nexus.GenericNeXusWorkflow(
78
- run_types=[SampleRun, ReferenceRun], monitor_types=[]
79
- )
73
+ workflow = beamline.LoadNeXusWorkflow()
80
for provider in providers:
81
workflow.insert(provider)
82
for name, param in default_parameters().items():
src/ess/reflectometry/normalization.py
@@ -40,10 +40,10 @@ def reduce_reference(
reference = reference.bins.assign_masks(invalid=sc.isnan(R))
reference = reference / R
- out = reference.bins.concat(('stripe',)).hist(wavelength=wavelength_bins)
+ out = reference.bins.concat(('strip',)).hist(wavelength=wavelength_bins)
if 'position' in reference.coords:
- out.coords['position'] = reference.coords['position'].mean('stripe')
+ out.coords['position'] = reference.coords['position'].mean('strip')
return out
@@ -96,7 +96,7 @@ def reduce_sample_over_zw(
96
97
Returns reflectivity as a function of ``blade``, ``wire`` and :math:`\\wavelength`.
98
99
- return sample.bins.concat(('stripe',)).bin(wavelength=wbins) / sc.values(
+ return sample.bins.concat(('strip',)).bin(wavelength=wbins) / sc.values(
100
reference.data
101
102
tests/estia/mcstas_data_test.py
@@ -79,7 +79,7 @@ def estia_mcstas_pipeline() -> sciline.Pipeline:
def test_mcstas_compute_reducible_data(estia_mcstas_pipeline: sciline.Pipeline):
estia_mcstas_pipeline[Filename[SampleRun]] = estia_mcstas_sample_run(11)
da = estia_mcstas_pipeline.compute(ReducibleData[SampleRun])
- assert da.dims == ('stripe', 'blade', 'wire')
+ assert da.dims == ('strip', 'blade', 'wire')
83
assert da.shape == (64, 48, 32)
84
assert 'position' in da.coords
85
assert 'sample_rotation' in da.coords
tests/reflectometry/normalization_test.py
@@ -15,10 +15,10 @@ def sample(request):
'wavelength': sc.linspace('events', 1, 5, n),
'wire': sc.array(dims=('events',), values=np.random.randint(0, 5, n)),
- 'stripe': sc.array(dims=('events',), values=np.random.randint(0, 10, n)),
+ 'strip': sc.array(dims=('events',), values=np.random.randint(0, 10, n)),
- return da.group('wire', 'stripe')
+ return da.group('wire', 'strip')
24
@pytest.fixture
@@ -29,7 +29,7 @@ def reference(request):
return da.group('wire').bin(wavelength=2).bins.sum()
0 commit comments