From 1d1fd1bc9c290dfdf3b4a1406a0e784adcc8afc8 Mon Sep 17 00:00:00 2001 From: Dominic Oram Date: Mon, 8 Apr 2024 20:27:17 +0100 Subject: [PATCH 1/4] (#1292) Remove wavelength_angstroms as it's not used --- .../external_interaction/ispyb/ispyb_dataclass.py | 8 -------- .../parameters/test_internal_parameters.py | 14 +------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/hyperion/external_interaction/ispyb/ispyb_dataclass.py b/src/hyperion/external_interaction/ispyb/ispyb_dataclass.py index 1efc3011e..fab3377f7 100644 --- a/src/hyperion/external_interaction/ispyb/ispyb_dataclass.py +++ b/src/hyperion/external_interaction/ispyb/ispyb_dataclass.py @@ -4,8 +4,6 @@ import numpy as np from pydantic import BaseModel, validator -from hyperion.utils.utils import convert_eV_to_angstrom - GRIDSCAN_ISPYB_PARAM_DEFAULTS = { "sample_id": None, "visit_path": "", @@ -82,12 +80,6 @@ def _transmission_not_percentage(cls, transmission_fraction: Optional[float]): ) return transmission_fraction - @property - def wavelength_angstroms(self) -> Optional[float]: - if self.current_energy_ev: - return convert_eV_to_angstrom(self.current_energy_ev) - return None # Return None instead of 0 in order to avoid overwriting previously written values - class RobotLoadIspybParams(IspybParams): ... diff --git a/tests/unit_tests/parameters/test_internal_parameters.py b/tests/unit_tests/parameters/test_internal_parameters.py index fcc81efde..6a3bb40be 100644 --- a/tests/unit_tests/parameters/test_internal_parameters.py +++ b/tests/unit_tests/parameters/test_internal_parameters.py @@ -67,19 +67,7 @@ def rotation_params(rotation_raw_params): def test_cant_initialise_abstract_internalparams(): with pytest.raises(TypeError): - internal_parameters = InternalParameters( # noqa - **hyperion.parameters.external_parameters.from_file() - ) - - -def test_ispyb_param_wavelength(): - from hyperion.utils.utils import convert_eV_to_angstrom - - ispyb_params = GridscanIspybParams(**GRIDSCAN_ISPYB_PARAM_DEFAULTS) - ispyb_params.current_energy_ev = 12700 - assert ispyb_params.wavelength_angstroms == pytest.approx( - convert_eV_to_angstrom(12700) - ) + InternalParameters(**hyperion.parameters.external_parameters.from_file()) def test_ispyb_param_dict(): From 3e747aca9cf377eb1a3f34ad8c5c42cd72473ddc Mon Sep 17 00:00:00 2001 From: Dominic Oram Date: Mon, 8 Apr 2024 20:35:34 +0100 Subject: [PATCH 2/4] (#1292) Remove current_energy_ev --- .../robot_load_then_centre_plan.py | 2 -- .../callbacks/ispyb_callback_base.py | 2 -- .../plan_specific/rotation_scan_internal_params.py | 1 - .../system_tests/experiment_plans/test_fgs_plan.py | 1 - .../callbacks/test_external_callbacks.py | 4 ---- tests/test_data/hyperion_parameters.json | 3 +-- .../experiment_plans/test_rotation_scan_plan.py | 14 -------------- .../test_wait_for_robot_load_then_centre.py | 3 --- tests/unit_tests/external_interaction/conftest.py | 2 -- .../test_write_rotation_nexus.py | 1 - 10 files changed, 1 insertion(+), 32 deletions(-) diff --git a/src/hyperion/experiment_plans/robot_load_then_centre_plan.py b/src/hyperion/experiment_plans/robot_load_then_centre_plan.py index b83151fae..fb2c08c90 100644 --- a/src/hyperion/experiment_plans/robot_load_then_centre_plan.py +++ b/src/hyperion/experiment_plans/robot_load_then_centre_plan.py @@ -200,8 +200,6 @@ def robot_load_then_centre( yield from read_energy(cast(SetEnergyComposite, composite)) ) - # XXX TODO 1173 remove this - left in to avoid breaking nexus files? - parameters.hyperion_params.ispyb_params.current_energy_ev = actual_energy_ev if not parameters.experiment_params.requested_energy_kev: parameters.hyperion_params.detector_params.expected_energy_ev = actual_energy_ev else: diff --git a/src/hyperion/external_interaction/callbacks/ispyb_callback_base.py b/src/hyperion/external_interaction/callbacks/ispyb_callback_base.py index ed45d78c8..5ef73d05f 100644 --- a/src/hyperion/external_interaction/callbacks/ispyb_callback_base.py +++ b/src/hyperion/external_interaction/callbacks/ispyb_callback_base.py @@ -130,8 +130,6 @@ def activity_gated_event(self, doc: Event) -> Event: self._event_driven_data_collection_info.wavelength = ( convert_eV_to_angstrom(energy_ev) ) - # TODO 1173 Remove this once nexus_utils no longer needs wavelength_angstroms - self.params.hyperion_params.ispyb_params.current_energy_ev = energy_ev scan_data_infos = self.populate_info_for_update( self._event_driven_data_collection_info, self.params diff --git a/src/hyperion/parameters/plan_specific/rotation_scan_internal_params.py b/src/hyperion/parameters/plan_specific/rotation_scan_internal_params.py index b7c57f7a0..349b0f0d1 100644 --- a/src/hyperion/parameters/plan_specific/rotation_scan_internal_params.py +++ b/src/hyperion/parameters/plan_specific/rotation_scan_internal_params.py @@ -127,7 +127,6 @@ def _preprocess_hyperion_params( all_params["omega_increment"] = 0 all_params["num_triggers"] = 1 all_params["num_images_per_trigger"] = all_params["num_images"] - all_params["current_energy_ev"] = all_params["expected_energy_ev"] return RotationHyperionParameters( **extract_hyperion_params_from_flat_dict( all_params, cls._hyperion_param_key_definitions() diff --git a/tests/system_tests/experiment_plans/test_fgs_plan.py b/tests/system_tests/experiment_plans/test_fgs_plan.py index e43c45313..c71f66155 100644 --- a/tests/system_tests/experiment_plans/test_fgs_plan.py +++ b/tests/system_tests/experiment_plans/test_fgs_plan.py @@ -54,7 +54,6 @@ def params(): params = GridscanInternalParameters(**default_raw_params()) params.hyperion_params.beamline = CONST.SIM.BEAMLINE - params.hyperion_params.ispyb_params.current_energy_ev = 10000 params.hyperion_params.zocalo_environment = "dev_artemis" params.hyperion_params.ispyb_params.microns_per_pixel_x = 10 params.hyperion_params.ispyb_params.microns_per_pixel_y = 10 diff --git a/tests/system_tests/external_interaction/callbacks/test_external_callbacks.py b/tests/system_tests/external_interaction/callbacks/test_external_callbacks.py index 740f9400c..ca170fbf6 100644 --- a/tests/system_tests/external_interaction/callbacks/test_external_callbacks.py +++ b/tests/system_tests/external_interaction/callbacks/test_external_callbacks.py @@ -220,10 +220,6 @@ def test_remote_callbacks_write_to_dev_ispyb_for_rotation( test_rotation_params.hyperion_params.ispyb_params.beam_size_x = test_bs_x test_rotation_params.hyperion_params.ispyb_params.beam_size_y = test_bs_y test_rotation_params.hyperion_params.detector_params.exposure_time = test_exp_time - # TODO 1173 this should not be set here - test_rotation_params.hyperion_params.ispyb_params.current_energy_ev = ( - convert_angstrom_to_eV(test_wl) - ) test_rotation_params.hyperion_params.detector_params.expected_energy_ev = ( convert_angstrom_to_eV(test_wl) ) diff --git a/tests/test_data/hyperion_parameters.json b/tests/test_data/hyperion_parameters.json index 4ebffa3c0..30cf17b7f 100644 --- a/tests/test_data/hyperion_parameters.json +++ b/tests/test_data/hyperion_parameters.json @@ -4,7 +4,7 @@ "insertion_prefix": "SR03S", "experiment_type": "flyscan_xray_centre", "detector_params": { - "current_energy_ev": 100.0, + "expected_energy_ev": 100.0, "exposure_time": 0.1, "directory": "/tmp/", "prefix": "file_name", @@ -34,7 +34,6 @@ 20.0, 30.0 ], - "current_energy_ev": 100.0, "transmission_fraction": 1.0, "beam_size_x": 1.0, "beam_size_y": 1.0, diff --git a/tests/unit_tests/experiment_plans/test_rotation_scan_plan.py b/tests/unit_tests/experiment_plans/test_rotation_scan_plan.py index a1fab44e1..339e35aa3 100644 --- a/tests/unit_tests/experiment_plans/test_rotation_scan_plan.py +++ b/tests/unit_tests/experiment_plans/test_rotation_scan_plan.py @@ -189,20 +189,6 @@ async def test_rotation_plan_zebra_settings( assert await zebra.pc.pulse_start.get_value() == expt_params.shutter_opening_time_s -def test_rotation_plan_energy_settings(setup_and_run_rotation_plan_for_tests_standard): - params: RotationInternalParameters = setup_and_run_rotation_plan_for_tests_standard[ - "test_rotation_params" - ] - - assert ( - params.hyperion_params.detector_params.expected_energy_ev == 100 - ) # from good_test_rotation_scan_parameters.json - assert ( - params.hyperion_params.detector_params.expected_energy_ev - == params.hyperion_params.ispyb_params.current_energy_ev - ) - - def test_full_rotation_plan_smargon_settings( run_full_rotation_plan, test_rotation_params, diff --git a/tests/unit_tests/experiment_plans/test_wait_for_robot_load_then_centre.py b/tests/unit_tests/experiment_plans/test_wait_for_robot_load_then_centre.py index df08fefd5..19bf4a8db 100644 --- a/tests/unit_tests/experiment_plans/test_wait_for_robot_load_then_centre.py +++ b/tests/unit_tests/experiment_plans/test_wait_for_robot_load_then_centre.py @@ -86,7 +86,6 @@ def test_when_plan_run_then_centring_plan_run_with_expected_parameters( assert isinstance(params_passed, PinCentreThenXrayCentreInternalParameters) assert params_passed.hyperion_params.detector_params.expected_energy_ev == 11100 - assert params_passed.hyperion_params.ispyb_params.current_energy_ev == 11105 assert isinstance( resolution := params_passed.hyperion_params.ispyb_params.resolution, float ) @@ -121,7 +120,6 @@ def test_when_plan_run_with_requested_energy_specified_energy_change_executes( mock_centring_plan.call_args[0][1] ) assert params_passed.hyperion_params.detector_params.expected_energy_ev == 11100 - assert params_passed.hyperion_params.ispyb_params.current_energy_ev == 11105 @patch( @@ -153,7 +151,6 @@ def test_robot_load_then_centre_doesnt_set_energy_if_not_specified( mock_centring_plan.call_args[0][1] ) assert params_passed.hyperion_params.detector_params.expected_energy_ev == 11105 - assert params_passed.hyperion_params.ispyb_params.current_energy_ev == 11105 def run_simulating_smargon_wait( diff --git a/tests/unit_tests/external_interaction/conftest.py b/tests/unit_tests/external_interaction/conftest.py index 4430c4cc0..af6e7f208 100644 --- a/tests/unit_tests/external_interaction/conftest.py +++ b/tests/unit_tests/external_interaction/conftest.py @@ -70,7 +70,6 @@ def test_rotation_params(): param_dict["hyperion_params"]["detector_params"]["directory"] = "tests/test_data" param_dict["hyperion_params"]["detector_params"]["prefix"] = "TEST_FILENAME" param_dict["hyperion_params"]["detector_params"]["expected_energy_ev"] = 12700 - param_dict["hyperion_params"]["ispyb_params"]["current_energy_ev"] = 12700 param_dict["experiment_params"]["rotation_angle"] = 360.0 params = RotationInternalParameters(**param_dict) params.experiment_params.x = 0 @@ -84,7 +83,6 @@ def test_rotation_params(): @pytest.fixture(params=[1044]) def test_fgs_params(request): params = GridscanInternalParameters(**default_raw_params()) - params.hyperion_params.ispyb_params.current_energy_ev = convert_angstrom_to_eV(1.0) params.hyperion_params.ispyb_params.flux = 9.0 params.hyperion_params.ispyb_params.transmission_fraction = 0.5 params.hyperion_params.detector_params.expected_energy_ev = convert_angstrom_to_eV( diff --git a/tests/unit_tests/external_interaction/test_write_rotation_nexus.py b/tests/unit_tests/external_interaction/test_write_rotation_nexus.py index be760456f..3a8d12573 100644 --- a/tests/unit_tests/external_interaction/test_write_rotation_nexus.py +++ b/tests/unit_tests/external_interaction/test_write_rotation_nexus.py @@ -38,7 +38,6 @@ def test_params(tmpdir): ] = f"{tmpdir}/{TEST_FILENAME}" param_dict["experiment_params"]["rotation_angle"] = 360.0 param_dict["hyperion_params"]["detector_params"]["expected_energy_ev"] = 12700 - param_dict["hyperion_params"]["ispyb_params"]["current_energy_ev"] = 12700 param_dict["experiment_params"]["rotation_angle"] = 360.0 params = RotationInternalParameters(**param_dict) params.experiment_params.x = 0 From 34f63b6f31505ea72f9073170cf9a4a0abf3635f Mon Sep 17 00:00:00 2001 From: Dominic Oram Date: Mon, 8 Apr 2024 20:49:34 +0100 Subject: [PATCH 3/4] (#1297) Remove transmission from ispyb params --- .../callbacks/ispyb_callback_base.py | 8 ++------ .../external_interaction/ispyb/ispyb_dataclass.py | 13 ------------- tests/test_data/hyperion_parameters.json | 1 - .../bad_test_parameters_wrong_version.json | 1 - .../callbacks/test_rotation_callbacks.py | 1 - tests/unit_tests/external_interaction/conftest.py | 2 -- .../external_interaction/test_ispyb_dataclass.py | 9 --------- 7 files changed, 2 insertions(+), 33 deletions(-) diff --git a/src/hyperion/external_interaction/callbacks/ispyb_callback_base.py b/src/hyperion/external_interaction/callbacks/ispyb_callback_base.py index 5ef73d05f..42fec343e 100644 --- a/src/hyperion/external_interaction/callbacks/ispyb_callback_base.py +++ b/src/hyperion/external_interaction/callbacks/ispyb_callback_base.py @@ -109,15 +109,11 @@ def activity_gated_event(self, doc: Event) -> Event: if event_descriptor.get("name") == CONST.PLAN.ISPYB_TRANSMISSION_FLUX_READ: assert self._event_driven_data_collection_info - if doc["data"]["attenuator_actual_transmission"]: + if transmission := doc["data"]["attenuator_actual_transmission"]: # Ispyb wants the transmission in a percentage, we use fractions self._event_driven_data_collection_info.transmission = ( - doc["data"]["attenuator_actual_transmission"] * 100 + transmission * 100 ) - # TODO 1173 Remove this once nexus_utils no longer needs it - self.params.hyperion_params.ispyb_params.transmission_fraction = doc[ - "data" - ]["attenuator_actual_transmission"] self._event_driven_data_collection_info.flux = doc["data"][ "flux_flux_reading" ] diff --git a/src/hyperion/external_interaction/ispyb/ispyb_dataclass.py b/src/hyperion/external_interaction/ispyb/ispyb_dataclass.py index fab3377f7..ad67e7941 100644 --- a/src/hyperion/external_interaction/ispyb/ispyb_dataclass.py +++ b/src/hyperion/external_interaction/ispyb/ispyb_dataclass.py @@ -9,13 +9,11 @@ "visit_path": "", "microns_per_pixel_x": 0.0, "microns_per_pixel_y": 0.0, - "current_energy_ev": None, # gets stored as 2x2D coords - (x, y) and (x, z). Values in pixels "upper_left": [0, 0, 0], "position": [0, 0, 0], "xtal_snapshots_omega_start": ["test_1_y", "test_2_y", "test_3_y"], "xtal_snapshots_omega_end": ["test_1_z", "test_2_z", "test_3_z"], - "transmission_fraction": None, "flux": None, "beam_size_x": 0.1, "beam_size_y": 0.1, @@ -33,9 +31,6 @@ class IspybParams(BaseModel): microns_per_pixel_y: float position: np.ndarray - transmission_fraction: Optional[float] # TODO 1033 this is now deprecated - # populated by robot_load_then_centre - current_energy_ev: Optional[float] beam_size_x: float beam_size_y: float focal_spot_size_x: float @@ -72,14 +67,6 @@ def _parse_position( return position return np.array(position) - @validator("transmission_fraction") - def _transmission_not_percentage(cls, transmission_fraction: Optional[float]): - if transmission_fraction and transmission_fraction > 1: - raise ValueError( - "Transmission_fraction of >1 given. Did you give a percentage instead of a fraction?" - ) - return transmission_fraction - class RobotLoadIspybParams(IspybParams): ... diff --git a/tests/test_data/hyperion_parameters.json b/tests/test_data/hyperion_parameters.json index 30cf17b7f..18a13a106 100644 --- a/tests/test_data/hyperion_parameters.json +++ b/tests/test_data/hyperion_parameters.json @@ -34,7 +34,6 @@ 20.0, 30.0 ], - "transmission_fraction": 1.0, "beam_size_x": 1.0, "beam_size_y": 1.0, "focal_spot_size_x": 1.0, diff --git a/tests/test_data/parameter_json_files/bad_test_parameters_wrong_version.json b/tests/test_data/parameter_json_files/bad_test_parameters_wrong_version.json index c88c30f17..f2fb7fdbc 100644 --- a/tests/test_data/parameter_json_files/bad_test_parameters_wrong_version.json +++ b/tests/test_data/parameter_json_files/bad_test_parameters_wrong_version.json @@ -47,7 +47,6 @@ "test_2", "test_3" ], - "transmission_fraction": 1.0, "beam_size_x": 1.0, "beam_size_y": 1.0, "focal_spot_size_x": 1.0, diff --git a/tests/unit_tests/external_interaction/callbacks/test_rotation_callbacks.py b/tests/unit_tests/external_interaction/callbacks/test_rotation_callbacks.py index 05e248fc6..b49ebc66f 100644 --- a/tests/unit_tests/external_interaction/callbacks/test_rotation_callbacks.py +++ b/tests/unit_tests/external_interaction/callbacks/test_rotation_callbacks.py @@ -151,7 +151,6 @@ def test_nexus_handler_gets_documents_in_mock_plan( nexus_handler, _ = activated_mocked_cbs RE(fake_rotation_scan(params, [nexus_handler])) - params.hyperion_params.ispyb_params.transmission_fraction = 1.0 params.hyperion_params.ispyb_params.flux = 10.0 assert nexus_handler.activity_gated_start.call_count == 2 # type: ignore diff --git a/tests/unit_tests/external_interaction/conftest.py b/tests/unit_tests/external_interaction/conftest.py index af6e7f208..0a310815f 100644 --- a/tests/unit_tests/external_interaction/conftest.py +++ b/tests/unit_tests/external_interaction/conftest.py @@ -76,7 +76,6 @@ def test_rotation_params(): params.experiment_params.y = 0 params.experiment_params.z = 0 params.hyperion_params.detector_params.exposure_time = 0.004 - params.hyperion_params.ispyb_params.transmission_fraction = 0.49118047952 return params @@ -84,7 +83,6 @@ def test_rotation_params(): def test_fgs_params(request): params = GridscanInternalParameters(**default_raw_params()) params.hyperion_params.ispyb_params.flux = 9.0 - params.hyperion_params.ispyb_params.transmission_fraction = 0.5 params.hyperion_params.detector_params.expected_energy_ev = convert_angstrom_to_eV( 1.0 ) diff --git a/tests/unit_tests/external_interaction/test_ispyb_dataclass.py b/tests/unit_tests/external_interaction/test_ispyb_dataclass.py index fb154aa7c..34f30844a 100644 --- a/tests/unit_tests/external_interaction/test_ispyb_dataclass.py +++ b/tests/unit_tests/external_interaction/test_ispyb_dataclass.py @@ -1,7 +1,6 @@ from copy import deepcopy import numpy as np -import pytest from hyperion.external_interaction.ispyb.ispyb_dataclass import ( GRIDSCAN_ISPYB_PARAM_DEFAULTS, @@ -27,11 +26,3 @@ def test_given_ispyb_params_when_converted_to_dict_then_position_is_a_list(): assert isinstance(ispyb_params_dict["position"], list) assert ispyb_params_dict["position"] == [1, 2, 3] - - -def test_given_transmission_greater_than_1_when_ispyb_params_created_then_throws_exception(): - params = deepcopy(GRIDSCAN_ISPYB_PARAM_DEFAULTS) - params["transmission_fraction"] = 20.5 - - with pytest.raises(ValueError): - IspybParams(**params) From 44b1f5dd5e20c1db14d51dae4e55505d2327935c Mon Sep 17 00:00:00 2001 From: Dominic Oram Date: Mon, 8 Apr 2024 20:57:43 +0100 Subject: [PATCH 4/4] (#1297) Remove flux from ispyb_params --- .../external_interaction/callbacks/ispyb_callback_base.py | 4 ---- src/hyperion/external_interaction/ispyb/ispyb_dataclass.py | 2 -- src/hyperion/parameters/schemas/ispyb_parameters_schema.json | 3 --- .../callbacks/test_rotation_callbacks.py | 5 ----- tests/unit_tests/external_interaction/conftest.py | 1 - 5 files changed, 15 deletions(-) diff --git a/src/hyperion/external_interaction/callbacks/ispyb_callback_base.py b/src/hyperion/external_interaction/callbacks/ispyb_callback_base.py index 42fec343e..4f19b61ff 100644 --- a/src/hyperion/external_interaction/callbacks/ispyb_callback_base.py +++ b/src/hyperion/external_interaction/callbacks/ispyb_callback_base.py @@ -117,10 +117,6 @@ def activity_gated_event(self, doc: Event) -> Event: self._event_driven_data_collection_info.flux = doc["data"][ "flux_flux_reading" ] - # TODO 1173 Remove this once nexus_utils no longer needs it - self.params.hyperion_params.ispyb_params.flux = ( - self._event_driven_data_collection_info.flux - ) if doc["data"]["dcm_energy_in_kev"]: energy_ev = doc["data"]["dcm_energy_in_kev"] * 1000 self._event_driven_data_collection_info.wavelength = ( diff --git a/src/hyperion/external_interaction/ispyb/ispyb_dataclass.py b/src/hyperion/external_interaction/ispyb/ispyb_dataclass.py index ad67e7941..eea0cd5e7 100644 --- a/src/hyperion/external_interaction/ispyb/ispyb_dataclass.py +++ b/src/hyperion/external_interaction/ispyb/ispyb_dataclass.py @@ -14,7 +14,6 @@ "position": [0, 0, 0], "xtal_snapshots_omega_start": ["test_1_y", "test_2_y", "test_3_y"], "xtal_snapshots_omega_end": ["test_1_z", "test_2_z", "test_3_z"], - "flux": None, "beam_size_x": 0.1, "beam_size_y": 0.1, "focal_spot_size_x": 0.0, @@ -42,7 +41,6 @@ class IspybParams(BaseModel): sample_id: Optional[str] = None # Optional from GDA as populated by Ophyd - flux: Optional[float] = None undulator_gap: Optional[float] = None xtal_snapshots_omega_start: Optional[list[str]] = None xtal_snapshots_omega_end: Optional[list[str]] = None diff --git a/src/hyperion/parameters/schemas/ispyb_parameters_schema.json b/src/hyperion/parameters/schemas/ispyb_parameters_schema.json index 8d27ffc20..e9bef5dc1 100644 --- a/src/hyperion/parameters/schemas/ispyb_parameters_schema.json +++ b/src/hyperion/parameters/schemas/ispyb_parameters_schema.json @@ -45,9 +45,6 @@ "type": "string" } }, - "flux": { - "type": ["number", "null"] - }, "beam_size_x": { "type": "number" }, diff --git a/tests/unit_tests/external_interaction/callbacks/test_rotation_callbacks.py b/tests/unit_tests/external_interaction/callbacks/test_rotation_callbacks.py index b49ebc66f..8ff458bdf 100644 --- a/tests/unit_tests/external_interaction/callbacks/test_rotation_callbacks.py +++ b/tests/unit_tests/external_interaction/callbacks/test_rotation_callbacks.py @@ -139,9 +139,6 @@ def activated_mocked_cbs(): "hyperion.external_interaction.callbacks.rotation.ispyb_callback.StoreInIspyb", autospec=True, ) -@pytest.mark.skip( - reason="TODO 1173 fix this test and nexus_callback implementation so that it doesn't assume that hw info is available at activity_gated_start()" -) def test_nexus_handler_gets_documents_in_mock_plan( ispyb, RE: RunEngine, @@ -151,8 +148,6 @@ def test_nexus_handler_gets_documents_in_mock_plan( nexus_handler, _ = activated_mocked_cbs RE(fake_rotation_scan(params, [nexus_handler])) - params.hyperion_params.ispyb_params.flux = 10.0 - assert nexus_handler.activity_gated_start.call_count == 2 # type: ignore call_content_outer = nexus_handler.activity_gated_start.call_args_list[0].args[0] # type: ignore assert call_content_outer["hyperion_internal_parameters"] == params.json() diff --git a/tests/unit_tests/external_interaction/conftest.py b/tests/unit_tests/external_interaction/conftest.py index 0a310815f..dba31944b 100644 --- a/tests/unit_tests/external_interaction/conftest.py +++ b/tests/unit_tests/external_interaction/conftest.py @@ -82,7 +82,6 @@ def test_rotation_params(): @pytest.fixture(params=[1044]) def test_fgs_params(request): params = GridscanInternalParameters(**default_raw_params()) - params.hyperion_params.ispyb_params.flux = 9.0 params.hyperion_params.detector_params.expected_energy_ev = convert_angstrom_to_eV( 1.0 )