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

Commit

Permalink
(#1307) change detector_size_constants to be the DetectorSizeParams n…
Browse files Browse the repository at this point in the history
…ot the string
  • Loading branch information
rtuck99 committed May 30, 2024
1 parent 5ab57db commit a362231
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ install_requires =
ophyd-async >= 0.3a5
bluesky >= 1.13.0a3
blueapi >= 0.4.3-a1
dls-dodal @ git+https://github.com/DiamondLightSource/dodal.git
dls-dodal @ git+https://github.com/DiamondLightSource/dodal.git@e0d9c48714d5f66c1f9d2b5bebb35566088b7708

[options.entry_points]
console_scripts =
Expand Down
3 changes: 2 additions & 1 deletion src/hyperion/parameters/constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
from enum import Enum

from dodal.devices.detector import EIGER2_X_16M_SIZE
from pydantic.dataclasses import dataclass

TEST_MODE = os.environ.get("HYPERION_TEST_MODE")
Expand Down Expand Up @@ -89,7 +90,7 @@ class ExperimentParamConstants:
class I03Constants:
BASE_DATA_DIR = "/tmp/dls/i03/data/" if TEST_MODE else "/dls/i03/data/"
BEAMLINE = "BL03S" if TEST_MODE else "BL03I"
DETECTOR = "EIGER2_X_16M"
DETECTOR = EIGER2_X_16M_SIZE
INSERTION_PREFIX = "SR03S" if TEST_MODE else "SR03I"
OAV_CENTRING_FILE = _test_oav_file if TEST_MODE else _live_oav_file
SHUTTER_TIME_S = 0.06
Expand Down
3 changes: 2 additions & 1 deletion src/hyperion/parameters/rotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
TemporaryIspybExtras,
WithScan,
)
from hyperion.parameters.constants import CONST
from hyperion.parameters.constants import CONST, I03Constants


class RotationScan(
Expand Down Expand Up @@ -58,6 +58,7 @@ def detector_params(self):
assert self.detector_distance_mm is not None
os.makedirs(self.storage_directory, exist_ok=True)
return DetectorParams(
detector_size_constants=I03Constants.DETECTOR,
expected_energy_ev=self.demand_energy_ev,
exposure_time=self.exposure_time_s,
directory=self.storage_directory,
Expand Down

0 comments on commit a362231

Please sign in to comment.