Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dependencies = [
"ophyd >= 1.10.5",
"ophyd-async >= 0.14.0",
"bluesky >= 1.14.6",
"dls-dodal @ git+https://github.com/DiamondLightSource/dodal.git@62960e0e587bf86943ce1b581848fa131ef884d5",
"dls-dodal @ git+https://github.com/DiamondLightSource/dodal.git@main",
]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ def construct_i04_specific_features(
xrc_composite.eiger.bit_depth,
xrc_composite.beamsize,
xrc_composite.eiger.cam.roi_mode,
xrc_composite.eiger.ispyb_detector_id,
]

tidy_plan = partial(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def standard_read_hardware_during_collection(
detector.bit_depth,
beamsize,
detector.cam.roi_mode,
detector.ispyb_detector_id,
]
yield from read_hardware_plan(
signals_to_read_during_collection, DocDescriptorNames.HARDWARE_READ_DURING
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ def _handle_ispyb_hardware_read(self, doc) -> Sequence[ScanDataInfo]:
)
synchrotron_mode = doc["data"]["synchrotron-synchrotron_mode"]
assert isinstance(synchrotron_mode, SynchrotronMode)

hwscan_data_collection_info = DataCollectionInfo(
undulator_gap1=doc["data"]["undulator-current_gap"],
synchrotron_mode=synchrotron_mode.value,
Expand Down Expand Up @@ -159,6 +158,7 @@ def _handle_ispyb_transmission_flux_read(
beamsize_at_sampley=beamsize_y_mm,
flux=doc["data"]["flux-flux_reading"],
detector_mode="ROI" if doc["data"]["eiger_cam_roi_mode"] else "FULL",
ispyb_detector_id=doc["data"]["eiger-ispyb_detector_id"],
)
if transmission := doc["data"]["attenuator-actual_transmission"]:
# Ispyb wants the transmission in a percentage, we use fractions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
)
from mx_bluesky.common.parameters.components import DiffractionExperimentWithSample

I03_EIGER_DETECTOR = 78
EIGER_FILE_SUFFIX = "h5"


Expand All @@ -31,7 +30,6 @@ def populate_remaining_data_collection_info(
data_collection_info.sample_id = params.sample_id
data_collection_info.visit_string = params.visit
data_collection_info.parent_id = data_collection_group_id
data_collection_info.detector_id = I03_EIGER_DETECTOR
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should: We can remove I03_EIGER_DETECTOR now

data_collection_info.comments = comment
data_collection_info.detector_distance = params.detector_params.detector_distance
data_collection_info.exp_time = params.detector_params.exposure_time_s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class DataCollectionInfo:
kappa_start: float | None = None

visit_string: str | None = None
detector_id: int | None = None
ispyb_detector_id: int | None = None
axis_start: float | None = None
slitgap_vertical: float | None = None
slitgap_horizontal: float | None = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def _data_collection_info_to_json(data: DataCollectionInfo) -> dict:
"axisEnd": data.axis_end,
"chiStart": data.chi_start,
"kappaStart": data.kappa_start,
"detectorId": data.detector_id,
"detectorId": data.ispyb_detector_id,
"axisStart": data.axis_start,
"slitGapVertical": data.slitgap_vertical,
"slitGapHorizontal": data.slitgap_horizontal,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def construct_hyperion_specific_features(
xrc_composite.eiger.bit_depth,
xrc_composite.beamsize,
xrc_composite.eiger.cam.roi_mode,
xrc_composite.eiger.ispyb_detector_id,
]

setup_trigger_plan: Callable[..., MsgGenerator]
Expand Down
2 changes: 2 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1421,6 +1421,7 @@ def test_rotation_event_document_during_data_collection(self) -> Event:
"beamsize-x_um": 50.0,
"beamsize-y_um": 20.0,
"eiger_cam_roi_mode": False,
"eiger-ispyb_detector_id": 78,
},
"timestamps": {"det1": 1666604299.8220396, "det2": 1666604299.8235943},
"seq_num": 1,
Expand Down Expand Up @@ -1536,6 +1537,7 @@ def test_event_document_during_data_collection(self) -> Event:
"beamsize-x_um": 50.0,
"beamsize-y_um": 20.0,
"eiger_cam_roi_mode": True,
"eiger-ispyb_detector_id": 78,
},
"timestamps": {
"det1": 1666604299.8220396,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def dummy_collection_group_info():
kappa_start=None,
parent_id=None,
visit_string="cm31105-4",
detector_id=78,
ispyb_detector_id=78,
axis_start=0.0,
slitgap_vertical=0.1,
slitgap_horizontal=0.1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def scan_data_info_for_begin():
kappa_start=0.0,
parent_id=None,
visit_string="cm31105-4",
detector_id=78,
ispyb_detector_id=78,
axis_start=0.0,
beamsize_at_samplex=1.0,
beamsize_at_sampley=1.0,
Expand Down Expand Up @@ -128,7 +128,7 @@ def scan_data_info_for_update(scan_data_info_for_begin):
kappa_start=0.0,
parent_id=None,
visit_string="cm31105-4",
detector_id=78,
ispyb_detector_id=78,
axis_start=0.0,
slitgap_vertical=1.0,
slitgap_horizontal=1.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@

EXPECTED_DATA_COLLECTION_3D_XY = {
"comments": "MX-Bluesky: Xray centring 1 -",
"detectorId": 78,
"detectorDistance": 100.0,
"exposureTime": 0.1,
"imageDirectory": "{tmp_data}/",
Expand Down Expand Up @@ -194,6 +193,7 @@ def test_flux_read_events_3d(self, mock_ispyb_conn, test_event_data):
"beamSizeAtSampleX": 0.05,
"beamSizeAtSampleY": 0.02,
"detectorMode": "ROI",
"detectorId": 78,
}
assert update_dc_requests[0].dcid == TEST_DATA_COLLECTION_IDS[0]
assert update_dc_requests[1].dcid == TEST_DATA_COLLECTION_IDS[1]
Expand Down
1 change: 1 addition & 0 deletions tests/unit_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ async def fail_test_on_unclosed_tasks(request: FixtureRequest):
"beamsize-x_um": 50.0,
"beamsize-y_um": 20.0,
"eiger_cam_roi_mode": True,
"eiger-ispyb_detector_id": 78,
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
TEST_SAMPLE_ID = 123456

EXPECTED_DATA_COLLECTION = {
"detectorId": 78,
"axisStart": 0.0,
"axisRange": 0.1,
"axisEnd": -180,
Expand Down Expand Up @@ -165,6 +164,7 @@ def test_flux_read_events(
"flux": 9.81,
"resolution": 1.1830593331191241,
"detectorMode": "FULL",
"detectorId": 78,
}


Expand Down
Loading