Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/user-guide/dream/dream-advanced-powder-reduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"workflow[MonitorFilename[EmptyCanRun]] = dream.data.simulated_monitor_empty_can()\n",
"workflow[CaveMonitorPosition] = sc.vector([0.0, 0.0, -4220.0], unit=\"mm\")\n",
"\n",
"workflow[dream.InstrumentConfiguration] = dream.InstrumentConfiguration.high_flux\n",
"workflow[dream.InstrumentConfiguration] = dream.InstrumentConfiguration.high_flux_BC215\n",
"# Select a detector bank:\n",
"workflow[NeXusDetectorName] = \"mantle\"\n",
"# We drop uncertainties where they would otherwise lead to correlations:\n",
Expand Down Expand Up @@ -185,7 +185,7 @@
"workflow[MonitorFilename[EmptyCanRun]] = dream.data.simulated_monitor_empty_can()\n",
"workflow[CaveMonitorPosition] = sc.vector([0.0, 0.0, -4220.0], unit=\"mm\")\n",
"\n",
"workflow[dream.InstrumentConfiguration] = dream.InstrumentConfiguration.high_flux\n",
"workflow[dream.InstrumentConfiguration] = dream.InstrumentConfiguration.high_flux_BC215\n",
"# Select a detector bank:\n",
"workflow[NeXusDetectorName] = \"mantle\"\n",
"# We drop uncertainties where they would otherwise lead to correlations:\n",
Expand Down Expand Up @@ -260,7 +260,7 @@
"workflow[Filename[EmptyCanRun]] = dream.data.simulated_empty_can()\n",
"workflow[CalibrationFilename] = None\n",
"\n",
"workflow[dream.InstrumentConfiguration] = dream.InstrumentConfiguration.high_flux\n",
"workflow[dream.InstrumentConfiguration] = dream.InstrumentConfiguration.high_flux_BC215\n",
"# Select a detector bank:\n",
"workflow[NeXusDetectorName] = \"mantle\"\n",
"# We drop uncertainties where they would otherwise lead to correlations:\n",
Expand Down Expand Up @@ -374,7 +374,7 @@
"workflow[Filename[EmptyCanRun]] = dream.data.simulated_empty_can()\n",
"workflow[CalibrationFilename] = None\n",
"\n",
"workflow[dream.InstrumentConfiguration] = dream.InstrumentConfiguration.high_flux\n",
"workflow[dream.InstrumentConfiguration] = dream.InstrumentConfiguration.high_flux_BC215\n",
"# We drop uncertainties where they would otherwise lead to correlations:\n",
"workflow[UncertaintyBroadcastMode] = UncertaintyBroadcastMode.drop\n",
"# Edges for binning in d-spacing:\n",
Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide/dream/dream-make-tof-lookup-table.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
"metadata": {},
"outputs": [],
"source": [
"disk_choppers = choppers(InstrumentConfiguration.high_flux)"
"disk_choppers = choppers(InstrumentConfiguration.high_flux_BC215)"
]
},
{
"cell_type": "markdown",
"id": "4",
"metadata": {},
"source": [
"Note that possible configurations are `high_flux`, `high_flux_BC215`, `high_flux_BC240`, and `high_resolution`.\n",
"Note that possible configurations are `high_flux_BC215`, `high_flux_BC240`, and `high_resolution`.\n",
"\n",
"## Setting up the workflow"
]
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/dream/dream-powder-reduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"workflow[MonitorFilename[EmptyCanRun]] = dream.data.simulated_monitor_empty_can()\n",
"workflow[CaveMonitorPosition] = sc.vector([0.0, 0.0, -4220.0], unit=\"mm\")\n",
"\n",
"workflow[dream.InstrumentConfiguration] = dream.InstrumentConfiguration.high_flux\n",
"workflow[dream.InstrumentConfiguration] = dream.InstrumentConfiguration.high_flux_BC215\n",
"# Select a detector bank:\n",
"workflow[NeXusDetectorName] = \"mantle\"\n",
"# We drop uncertainties where they would otherwise lead to correlations:\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/dream/workflow-widget-dream.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"# Set parameters\n",
"pbox._input_widgets[Filename[SampleRun]].children[0].value = str(dream.data.simulated_diamond_sample())\n",
"pbox._input_widgets[Filename[VanadiumRun]].children[0].value = str(dream.data.simulated_vanadium_sample())\n",
"pbox._input_widgets[InstrumentConfiguration].value = InstrumentConfiguration.high_flux\n",
"pbox._input_widgets[InstrumentConfiguration].value = InstrumentConfiguration.high_flux_BC215\n",
"pbox._input_widgets[DspacingBins].fields[\"stop\"].value = 2.3434\n",
"# Run the workflow\n",
"rbox = wfw.result_box\n",
Expand Down
8 changes: 2 additions & 6 deletions src/ess/dream/beamline.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@ class InstrumentConfiguration(enum.Enum):
"""
Choose between high-flux and high-resolution configurations.

The high_flux setting is the same as the high_flux_BC215. Setting the band chopper
phase explicitly should be favored over using the high_flux setting which is kept
for backwards compatibility.
The ``BCxxx`` suffix indicates the phase of the band chopper.
"""

high_flux_BC215 = 1
high_flux = 1 # Legacy alias for high_flux
high_flux_BC240 = 2
high_resolution = 3

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

match configuration:
case (
InstrumentConfiguration.high_flux
| InstrumentConfiguration.high_flux_BC215
InstrumentConfiguration.high_flux_BC215
| InstrumentConfiguration.high_flux_BC240
):
return {
Expand Down
2 changes: 1 addition & 1 deletion src/ess/dream/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
CalibrationFilename
)
parameter_registry[InstrumentConfiguration] = ParamWithOptions.from_enum(
InstrumentConfiguration, default=InstrumentConfiguration.high_flux
InstrumentConfiguration, default=InstrumentConfiguration.high_flux_BC215
)
parameter_registry[MonitorFilename[SampleRun]] = FilenameParameter.from_type(
MonitorFilename[SampleRun]
Expand Down
4 changes: 2 additions & 2 deletions tests/dream/geant4_reduction_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
MonitorFilename[SampleRun]: dream.data.simulated_monitor_diamond_sample(),
MonitorFilename[VanadiumRun]: dream.data.simulated_monitor_vanadium_sample(),
MonitorFilename[EmptyCanRun]: dream.data.simulated_monitor_empty_can(),
dream.InstrumentConfiguration: dream.beamline.InstrumentConfiguration.high_flux,
dream.InstrumentConfiguration: dream.beamline.InstrumentConfiguration.high_flux_BC215, # noqa: E501
CalibrationFilename: None,
UncertaintyBroadcastMode: UncertaintyBroadcastMode.drop,
DspacingBins: sc.linspace('dspacing', 0.0, 2.3434, 201, unit='angstrom'),
Expand Down Expand Up @@ -122,7 +122,7 @@ def test_pipeline_can_compute_dspacing_result_using_lookup_table_filename(workfl
def dream_tof_lookup_table():
lut_wf = time_of_flight.TofLookupTableWorkflow()
lut_wf[time_of_flight.DiskChoppers[AnyRun]] = dream.beamline.choppers(
dream.beamline.InstrumentConfiguration.high_flux
dream.beamline.InstrumentConfiguration.high_flux_BC215
)
lut_wf[time_of_flight.SourcePosition] = sc.vector(value=[0, 0, -76.55], unit="m")
lut_wf[time_of_flight.NumberOfSimulatedNeutrons] = 500_000
Expand Down
Loading