This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #711 from DiamondLightSource/368_generalise_ispyb_…
…handling 368 generalise ispyb handling to rotation scans
- Loading branch information
Showing
33 changed files
with
1,342 additions
and
449 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from __future__ import annotations | ||
|
||
import bluesky.plan_stubs as bps | ||
from dodal.beamlines.i03 import Attenuator, Flux, S4SlitGaps, Synchrotron, Undulator | ||
|
||
import artemis.log | ||
from artemis.parameters.constants import ISPYB_PLAN_NAME | ||
|
||
|
||
def read_hardware_for_ispyb( | ||
undulator: Undulator, | ||
synchrotron: Synchrotron, | ||
s4_slit_gaps: S4SlitGaps, | ||
attenuator: Attenuator, | ||
flux: Flux, | ||
): | ||
artemis.log.LOGGER.info( | ||
"Reading status of beamline parameters for ispyb deposition." | ||
) | ||
yield from bps.create( | ||
name=ISPYB_PLAN_NAME | ||
) # gives name to event *descriptor* document | ||
yield from bps.read(undulator.gap) | ||
yield from bps.read(synchrotron.machine_status.synchrotron_mode) | ||
yield from bps.read(s4_slit_gaps.xgap) | ||
yield from bps.read(s4_slit_gaps.ygap) | ||
yield from bps.read(attenuator.actual_transmission) | ||
yield from bps.read(flux.flux_reading) | ||
yield from bps.save() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.