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

Commit

Permalink
Remove walrus from assert
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicOram committed Apr 29, 2024
1 parent 00efcff commit dae88af
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ def adjust_dcm_pitch_roll_vfm_from_lut(
yield from bps.wait(DCM_GROUP)

# VFM Adjust - for I03 this table always returns the same value
assert (vfm_lut := vfm.bragg_to_lat_lookup_table_path) is not None
vfm_lut = vfm.bragg_to_lat_lookup_table_path
assert vfm_lut is not None
vfm_x_adjuster = lookup_table_adjuster(
linear_interpolation_lut(vfm_lut),
vfm.x_mm,
Expand Down
2 changes: 1 addition & 1 deletion src/hyperion/parameters/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class DocDescriptorNames:
@dataclass(frozen=True)
class HardwareConstants:
OAV_REFRESH_DELAY = 0.3
PANDA_FGS_RUN_UP_DEFAULT = 0.16
PANDA_FGS_RUN_UP_DEFAULT = 0.17


@dataclass(frozen=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ class RotationScanParams(AbstractExperimentWithBeamParams):
rotation_direction: RotationDirection = RotationDirection.NEGATIVE
shutter_opening_time_s: float = 0.6

@validator("rotation_direction", pre=True)
def _parse_validator(cls, rotation_direction: str):
return RotationDirection(rotation_direction)

@validator("rotation_direction", pre=True)
def _parse_direction(cls, rotation_direction: str):
return RotationDirection(rotation_direction)
Expand Down

0 comments on commit dae88af

Please sign in to comment.