Skip to content

Commit 9a0b187

Browse files
committed
Set lookup error thresholds
1 parent 238d8f3 commit 9a0b187

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

docs/user-guide/loki/loki-make-tof-lookup-table.ipynb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@
4848
"wf[time_of_flight.PulseStride] = 1\n",
4949
"wf[time_of_flight.LtotalRange] = sc.scalar(9.0, unit=\"m\"), sc.scalar(35.0, unit=\"m\")\n",
5050
"wf[time_of_flight.DistanceResolution] = sc.scalar(0.1, unit=\"m\")\n",
51-
"wf[time_of_flight.TimeResolution] = sc.scalar(250.0, unit='us')\n",
52-
"wf[time_of_flight.LookupTableRelativeErrorThreshold] = 1.0"
51+
"wf[time_of_flight.TimeResolution] = sc.scalar(250.0, unit='us')"
5352
]
5453
},
5554
{
@@ -117,7 +116,7 @@
117116
"name": "python",
118117
"nbconvert_exporter": "python",
119118
"pygments_lexer": "ipython3",
120-
"version": "3.12.7"
119+
"version": "3.11.10"
121120
}
122121
},
123122
"nbformat": 4,

docs/user-guide/loki/loki-reduction-ess.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
"name": "python",
156156
"nbconvert_exporter": "python",
157157
"pygments_lexer": "ipython3",
158-
"version": "3.12.7"
158+
"version": "3.11.10"
159159
}
160160
},
161161
"nbformat": 4,

src/ess/loki/workflow.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
EmptyBeamRun,
2424
Filename,
2525
Incident,
26+
LookupTableRelativeErrorThreshold,
2627
MonitorType,
2728
NeXusComponent,
2829
NeXusDetectorName,
@@ -71,6 +72,13 @@ def loki_default_parameters() -> dict:
7172
NeXusMonitorName[Transmission]: 'beam_monitor_3',
7273
PixelShapePath: 'pixel_shape',
7374
NonBackgroundWavelengthRange: None,
75+
LookupTableRelativeErrorThreshold: {
76+
**{f'loki_detector_{i}': float('inf') for i in range(9)},
77+
# Monitors where renamed, beam_monitor_i is the old name
78+
# and beam_monitor_mi is the new.
79+
**{f'beam_monitor_{i}': float('inf') for i in range(5)},
80+
**{f'beam_monitor_m{i}': float('inf') for i in range(5)},
81+
},
7482
}
7583

7684

src/ess/sans/types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
Transmission = reduce_t.TransmissionMonitor
3636
TransmissionRun = reduce_t.TransmissionRun
3737

38+
LookupTableRelativeErrorThreshold = tof_t.LookupTableRelativeErrorThreshold
3839
TofDetector = tof_t.TofDetector
3940
TofMonitor = tof_t.TofMonitor
4041
TofLookupTableFilename = tof_t.TofLookupTableFilename

0 commit comments

Comments
 (0)