Skip to content

Commit ceec828

Browse files
authored
Merge pull request #247 from scipp/remove-legacy-alias
Remove high_flux legacy alias
2 parents e55a1c9 + c20b8e7 commit ceec828

File tree

7 files changed

+13
-17
lines changed

7 files changed

+13
-17
lines changed

docs/user-guide/dream/dream-advanced-powder-reduction.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"workflow[MonitorFilename[EmptyCanRun]] = dream.data.simulated_monitor_empty_can()\n",
6565
"workflow[CaveMonitorPosition] = sc.vector([0.0, 0.0, -4220.0], unit=\"mm\")\n",
6666
"\n",
67-
"workflow[dream.InstrumentConfiguration] = dream.InstrumentConfiguration.high_flux\n",
67+
"workflow[dream.InstrumentConfiguration] = dream.InstrumentConfiguration.high_flux_BC215\n",
6868
"# Select a detector bank:\n",
6969
"workflow[NeXusDetectorName] = \"mantle\"\n",
7070
"# We drop uncertainties where they would otherwise lead to correlations:\n",
@@ -185,7 +185,7 @@
185185
"workflow[MonitorFilename[EmptyCanRun]] = dream.data.simulated_monitor_empty_can()\n",
186186
"workflow[CaveMonitorPosition] = sc.vector([0.0, 0.0, -4220.0], unit=\"mm\")\n",
187187
"\n",
188-
"workflow[dream.InstrumentConfiguration] = dream.InstrumentConfiguration.high_flux\n",
188+
"workflow[dream.InstrumentConfiguration] = dream.InstrumentConfiguration.high_flux_BC215\n",
189189
"# Select a detector bank:\n",
190190
"workflow[NeXusDetectorName] = \"mantle\"\n",
191191
"# We drop uncertainties where they would otherwise lead to correlations:\n",
@@ -260,7 +260,7 @@
260260
"workflow[Filename[EmptyCanRun]] = dream.data.simulated_empty_can()\n",
261261
"workflow[CalibrationFilename] = None\n",
262262
"\n",
263-
"workflow[dream.InstrumentConfiguration] = dream.InstrumentConfiguration.high_flux\n",
263+
"workflow[dream.InstrumentConfiguration] = dream.InstrumentConfiguration.high_flux_BC215\n",
264264
"# Select a detector bank:\n",
265265
"workflow[NeXusDetectorName] = \"mantle\"\n",
266266
"# We drop uncertainties where they would otherwise lead to correlations:\n",
@@ -374,7 +374,7 @@
374374
"workflow[Filename[EmptyCanRun]] = dream.data.simulated_empty_can()\n",
375375
"workflow[CalibrationFilename] = None\n",
376376
"\n",
377-
"workflow[dream.InstrumentConfiguration] = dream.InstrumentConfiguration.high_flux\n",
377+
"workflow[dream.InstrumentConfiguration] = dream.InstrumentConfiguration.high_flux_BC215\n",
378378
"# We drop uncertainties where they would otherwise lead to correlations:\n",
379379
"workflow[UncertaintyBroadcastMode] = UncertaintyBroadcastMode.drop\n",
380380
"# Edges for binning in d-spacing:\n",

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@
4040
"metadata": {},
4141
"outputs": [],
4242
"source": [
43-
"disk_choppers = choppers(InstrumentConfiguration.high_flux)"
43+
"disk_choppers = choppers(InstrumentConfiguration.high_flux_BC215)"
4444
]
4545
},
4646
{
4747
"cell_type": "markdown",
4848
"id": "4",
4949
"metadata": {},
5050
"source": [
51-
"Note that possible configurations are `high_flux`, `high_flux_BC215`, `high_flux_BC240`, and `high_resolution`.\n",
51+
"Note that possible configurations are `high_flux_BC215`, `high_flux_BC240`, and `high_resolution`.\n",
5252
"\n",
5353
"## Setting up the workflow"
5454
]

docs/user-guide/dream/dream-powder-reduction.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"workflow[MonitorFilename[EmptyCanRun]] = dream.data.simulated_monitor_empty_can()\n",
8888
"workflow[CaveMonitorPosition] = sc.vector([0.0, 0.0, -4220.0], unit=\"mm\")\n",
8989
"\n",
90-
"workflow[dream.InstrumentConfiguration] = dream.InstrumentConfiguration.high_flux\n",
90+
"workflow[dream.InstrumentConfiguration] = dream.InstrumentConfiguration.high_flux_BC215\n",
9191
"# Select a detector bank:\n",
9292
"workflow[NeXusDetectorName] = \"mantle\"\n",
9393
"# We drop uncertainties where they would otherwise lead to correlations:\n",

docs/user-guide/dream/workflow-widget-dream.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"# Set parameters\n",
6868
"pbox._input_widgets[Filename[SampleRun]].children[0].value = str(dream.data.simulated_diamond_sample())\n",
6969
"pbox._input_widgets[Filename[VanadiumRun]].children[0].value = str(dream.data.simulated_vanadium_sample())\n",
70-
"pbox._input_widgets[InstrumentConfiguration].value = InstrumentConfiguration.high_flux\n",
70+
"pbox._input_widgets[InstrumentConfiguration].value = InstrumentConfiguration.high_flux_BC215\n",
7171
"pbox._input_widgets[DspacingBins].fields[\"stop\"].value = 2.3434\n",
7272
"# Run the workflow\n",
7373
"rbox = wfw.result_box\n",

src/ess/dream/beamline.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,10 @@ class InstrumentConfiguration(enum.Enum):
1111
"""
1212
Choose between high-flux and high-resolution configurations.
1313
14-
The high_flux setting is the same as the high_flux_BC215. Setting the band chopper
15-
phase explicitly should be favored over using the high_flux setting which is kept
16-
for backwards compatibility.
14+
The ``BCxxx`` suffix indicates the phase of the band chopper.
1715
"""
1816

1917
high_flux_BC215 = 1
20-
high_flux = 1 # Legacy alias for high_flux
2118
high_flux_BC240 = 2
2219
high_resolution = 3
2320

@@ -27,8 +24,7 @@ def choppers(configuration: InstrumentConfiguration) -> dict[str, DiskChopper]:
2724

2825
match configuration:
2926
case (
30-
InstrumentConfiguration.high_flux
31-
| InstrumentConfiguration.high_flux_BC215
27+
InstrumentConfiguration.high_flux_BC215
3228
| InstrumentConfiguration.high_flux_BC240
3329
):
3430
return {

src/ess/dream/parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
CalibrationFilename
4444
)
4545
parameter_registry[InstrumentConfiguration] = ParamWithOptions.from_enum(
46-
InstrumentConfiguration, default=InstrumentConfiguration.high_flux
46+
InstrumentConfiguration, default=InstrumentConfiguration.high_flux_BC215
4747
)
4848
parameter_registry[MonitorFilename[SampleRun]] = FilenameParameter.from_type(
4949
MonitorFilename[SampleRun]

tests/dream/geant4_reduction_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
MonitorFilename[SampleRun]: dream.data.simulated_monitor_diamond_sample(),
5656
MonitorFilename[VanadiumRun]: dream.data.simulated_monitor_vanadium_sample(),
5757
MonitorFilename[EmptyCanRun]: dream.data.simulated_monitor_empty_can(),
58-
dream.InstrumentConfiguration: dream.beamline.InstrumentConfiguration.high_flux,
58+
dream.InstrumentConfiguration: dream.beamline.InstrumentConfiguration.high_flux_BC215, # noqa: E501
5959
CalibrationFilename: None,
6060
UncertaintyBroadcastMode: UncertaintyBroadcastMode.drop,
6161
DspacingBins: sc.linspace('dspacing', 0.0, 2.3434, 201, unit='angstrom'),
@@ -122,7 +122,7 @@ def test_pipeline_can_compute_dspacing_result_using_lookup_table_filename(workfl
122122
def dream_tof_lookup_table():
123123
lut_wf = time_of_flight.TofLookupTableWorkflow()
124124
lut_wf[time_of_flight.DiskChoppers[AnyRun]] = dream.beamline.choppers(
125-
dream.beamline.InstrumentConfiguration.high_flux
125+
dream.beamline.InstrumentConfiguration.high_flux_BC215
126126
)
127127
lut_wf[time_of_flight.SourcePosition] = sc.vector(value=[0, 0, -76.55], unit="m")
128128
lut_wf[time_of_flight.NumberOfSimulatedNeutrons] = 500_000

0 commit comments

Comments
 (0)