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
(#1466) Wait for aperture move before DC and read it during DC #1472
Merged
DominicOram
merged 4 commits into
main
from
1466_wait_for_apsg_and_read_during_collection
Jul 10, 2024
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
58bd71b
(#1466) Wait for aperture move before DC and read it during DC
dperl-dls b9f862b
Merge branch 'main' into 1466_wait_for_apsg_and_read_during_collection
DominicOram d276536
Use constant for dc group
DominicOram 661afab
Fix connecting smargon
DominicOram File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,15 +103,8 @@ def _handle_ispyb_hardware_read(self, doc) -> Sequence[ScanDataInfo]: | |
synchrotron_mode := doc["data"]["synchrotron-synchrotron_mode"], | ||
SynchrotronMode, | ||
) | ||
aperture_size = SingleAperturePosition( | ||
**doc["data"]["aperture_scatterguard-selected_aperture"] | ||
) | ||
beamsize = beam_size_from_aperture(aperture_size) | ||
|
||
hwscan_data_collection_info = DataCollectionInfo( | ||
beamsize_at_samplex=beamsize.x_um, | ||
beamsize_at_sampley=beamsize.y_um, | ||
focal_spot_size_at_samplex=beamsize.x_um, | ||
focal_spot_size_at_sampley=beamsize.y_um, | ||
undulator_gap1=doc["data"]["undulator-current_gap"], | ||
synchrotron_mode=synchrotron_mode.value, | ||
slitgap_horizontal=doc["data"]["s4_slit_gaps_xgap"], | ||
|
@@ -130,8 +123,16 @@ def _handle_ispyb_hardware_read(self, doc) -> Sequence[ScanDataInfo]: | |
|
||
def _handle_ispyb_transmission_flux_read(self, doc) -> Sequence[ScanDataInfo]: | ||
assert self.params | ||
aperture_size = SingleAperturePosition( | ||
**doc["data"]["aperture_scatterguard-selected_aperture"] | ||
) | ||
beamsize = beam_size_from_aperture(aperture_size) | ||
hwscan_data_collection_info = DataCollectionInfo( | ||
flux=doc["data"]["flux_flux_reading"] | ||
beamsize_at_samplex=beamsize.x_um, | ||
beamsize_at_sampley=beamsize.y_um, | ||
focal_spot_size_at_samplex=beamsize.x_um, | ||
focal_spot_size_at_sampley=beamsize.y_um, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should: This needs the conversion from #1476 too |
||
flux=doc["data"]["flux_flux_reading"], | ||
) | ||
if transmission := doc["data"]["attenuator-actual_transmission"]: | ||
# Ispyb wants the transmission in a percentage, we use fractions | ||
|
@@ -150,6 +151,7 @@ def _handle_ispyb_transmission_flux_read(self, doc) -> Sequence[ScanDataInfo]: | |
hwscan_data_collection_info, None, self.params | ||
) | ||
ISPYB_LOGGER.info("Updating ispyb data collection after flux read.") | ||
self.append_to_comment(f"Aperture: {aperture_size.name}. ") | ||
return scan_data_infos | ||
|
||
@abstractmethod | ||
|
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 was deleted.
Oops, something went wrong.
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
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Could use
GRID_READY_FOR_DC
for this