Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1389 from DiamondLightSource/1102_use_energy_as_r…
Browse files Browse the repository at this point in the history
…ead_during_collection_in_ispyb

(#1102) Remove undulator_gap from ispyb_params
  • Loading branch information
DominicOram authored May 19, 2024
2 parents 590539d + 7aa485b commit 501168c
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 12 deletions.
2 changes: 0 additions & 2 deletions src/hyperion/external_interaction/ispyb/ispyb_dataclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"focal_spot_size_x": 0.0,
"focal_spot_size_y": 0.0,
"comment": "Descriptive comment.",
"undulator_gap": None,
}


Expand All @@ -32,7 +31,6 @@ class IspybParams(BaseModel):
sample_id: Optional[str] = None

# Optional from GDA as populated by Ophyd
undulator_gap: Optional[float] = None
xtal_snapshots_omega_start: Optional[list[str]] = None
xtal_snapshots_omega_end: Optional[list[str]] = None

Expand Down
1 change: 0 additions & 1 deletion src/hyperion/parameters/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ class Config:
beam_size_y: float
focal_spot_size_x: float
focal_spot_size_y: float
undulator_gap: float | None = None
xtal_snapshots_omega_start: list[str] | None = None
xtal_snapshots_omega_end: list[str] | None = None
xtal_snapshots: list[str] | None = None
1 change: 0 additions & 1 deletion src/hyperion/parameters/gridscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ def ispyb_params(self):
focal_spot_size_y=self.ispyb_extras.focal_spot_size_y,
comment=self.comment,
sample_id=str(self.sample_id),
undulator_gap=self.ispyb_extras.undulator_gap,
xtal_snapshots_omega_start=self.ispyb_extras.xtal_snapshots_omega_start
or [],
xtal_snapshots_omega_end=self.ispyb_extras.xtal_snapshots_omega_end or [],
Expand Down
1 change: 0 additions & 1 deletion src/hyperion/parameters/rotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ def ispyb_params(self): # pyright: ignore
focal_spot_size_y=self.ispyb_extras.focal_spot_size_y,
comment=self.comment,
sample_id=str(self.sample_id),
undulator_gap=self.ispyb_extras.undulator_gap,
xtal_snapshots_omega_start=self.ispyb_extras.xtal_snapshots_omega_start,
xtal_snapshots_omega_end=self.ispyb_extras.xtal_snapshots_omega_end,
ispyb_experiment_type=self.ispyb_experiment_type,
Expand Down
7 changes: 0 additions & 7 deletions tests/unit_tests/parameters/test_parameter_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ def test_pin_then_xray(self):
"current_energy_ev": self.energy,
"sample_id": self.sample_id,
"visit_path": "/tmp/dls/i03/data/2024/cm66666-6",
"undulator_gap": 0.5,
"position": self.position,
"beam_size_x": self.beam_size_x,
"beam_size_y": self.beam_size_y,
Expand Down Expand Up @@ -249,7 +248,6 @@ def test_pin_then_xray(self):

# This should all be stuff that is no longer needed because
# we get it from devices!
old_params.hyperion_params.ispyb_params.undulator_gap = None
old_params.hyperion_params.ispyb_params.xtal_snapshots_omega_end = []
old_params.hyperion_params.ispyb_params.xtal_snapshots_omega_start = []

Expand Down Expand Up @@ -307,7 +305,6 @@ def test_rotation_new_params(self):
"current_energy_ev": self.energy,
"sample_id": self.sample_id,
"visit_path": "/tmp/dls/i03/data/2024/cm66666-6",
"undulator_gap": 0.5,
"position": self.position,
"beam_size_x": self.beam_size_x,
"beam_size_y": self.beam_size_y,
Expand Down Expand Up @@ -340,8 +337,4 @@ def test_rotation_new_params(self):

new_old_params = new_params.old_parameters()

# This should all be stuff that is no longer needed because
# we get it from devices!
old_params.hyperion_params.ispyb_params.undulator_gap = None

assert new_old_params == old_params

0 comments on commit 501168c

Please sign in to comment.