diff --git a/docs/user-guide/dream/dream-advanced-powder-reduction.ipynb b/docs/user-guide/dream/dream-advanced-powder-reduction.ipynb index 94a1aee1..bb3ca987 100644 --- a/docs/user-guide/dream/dream-advanced-powder-reduction.ipynb +++ b/docs/user-guide/dream/dream-advanced-powder-reduction.ipynb @@ -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", @@ -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", @@ -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", @@ -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", diff --git a/docs/user-guide/dream/dream-make-tof-lookup-table.ipynb b/docs/user-guide/dream/dream-make-tof-lookup-table.ipynb index a90790b1..3a1515d8 100644 --- a/docs/user-guide/dream/dream-make-tof-lookup-table.ipynb +++ b/docs/user-guide/dream/dream-make-tof-lookup-table.ipynb @@ -40,7 +40,7 @@ "metadata": {}, "outputs": [], "source": [ - "disk_choppers = choppers(InstrumentConfiguration.high_flux)" + "disk_choppers = choppers(InstrumentConfiguration.high_flux_BC215)" ] }, { @@ -48,7 +48,7 @@ "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" ] diff --git a/docs/user-guide/dream/dream-powder-reduction.ipynb b/docs/user-guide/dream/dream-powder-reduction.ipynb index 1c2199f8..b067bca1 100644 --- a/docs/user-guide/dream/dream-powder-reduction.ipynb +++ b/docs/user-guide/dream/dream-powder-reduction.ipynb @@ -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", diff --git a/docs/user-guide/dream/workflow-widget-dream.ipynb b/docs/user-guide/dream/workflow-widget-dream.ipynb index f31556eb..41b04f2a 100644 --- a/docs/user-guide/dream/workflow-widget-dream.ipynb +++ b/docs/user-guide/dream/workflow-widget-dream.ipynb @@ -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", diff --git a/src/ess/dream/beamline.py b/src/ess/dream/beamline.py index 8451cf6e..e830be30 100644 --- a/src/ess/dream/beamline.py +++ b/src/ess/dream/beamline.py @@ -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 @@ -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 { diff --git a/src/ess/dream/parameters.py b/src/ess/dream/parameters.py index 57574f7f..93abcace 100644 --- a/src/ess/dream/parameters.py +++ b/src/ess/dream/parameters.py @@ -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] diff --git a/tests/dream/geant4_reduction_test.py b/tests/dream/geant4_reduction_test.py index 786c0b72..e4a11ddc 100644 --- a/tests/dream/geant4_reduction_test.py +++ b/tests/dream/geant4_reduction_test.py @@ -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'), @@ -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