-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adapt hardware objects from mocked beamline to YAML #998
Merged
elmjag
merged 9 commits into
mxcube:xml_yaml_conversion
from
elmjag:adapt-hwobjs-to-yaml
Aug 28, 2024
Merged
adapt hardware objects from mocked beamline to YAML #998
elmjag
merged 9 commits into
mxcube:xml_yaml_conversion
from
elmjag:adapt-hwobjs-to-yaml
Aug 28, 2024
Conversation
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
elmjag
force-pushed
the
adapt-hwobjs-to-yaml
branch
from
August 26, 2024 06:53
214e301
to
e17dffa
Compare
rhfogh
approved these changes
Aug 27, 2024
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.
Looks fine to a quick glance
Add a 'acquisition_limit_values' proxy attribute to the Beamline HWOBJ. This way the limits can be accessed with: HWR.beamline.acquisition_limit_values This is how MXCuBE-web reads the limits. Let's support this style for a while, for backward compability reason.
Update AbstractDetector class to access it's 'beam' setting with get_property(). Replaces self["beam"] expression, as it does not work when YAML config file is used.
Change code implementing Beam and Slits HWOBJs to work both with YAML and XML configure files. Add 'name' named attribute to __init__(), as it's required when loading from YAML. Renamed '_aperture' and '_slits' attributes to 'aperture' and 'slits', as this is the new style for attaching sub-HWOBJs. Added a backward compability hack, so that 'aperture' and 'slits' get populated when loading from XML configure file.
Drop proxy attributes 'kappa' and 'kappa_phi' from GenericDiffractometer class. These interfere with attaching of sub-HWOBJs for diffractometer HWOBJ. Add named parameter 'name' to DiffractometerMockup.__init__(). This parameter is required when loading HWOBJ from YAML configuration file.
Make it possible to create SampleChangerMockup and AbstractSampleChanger derived HWOBJs with ClassName(name=foo) expressions. This is the expression used when loading from a YAML configuration file.
The 'camera' attribute is now automagically set from the 'objects' settings in YAML/XML configure file.
The 'image_name' configuration property is not available in _init() method. Move set-up of 'static' attributes into __init__() method. Move set-up that requires access to configuration properties into init() method.
Make it possible to create BeamlineActions derived HWOBJs with ClassName(name=foo) expressions. This is the expression used when loading from a YAML configuration file.
When loading DetectorMockup hardware object from YAML configuration file, you'll get a warning if there is no 'detector_distance' attribute.
elmjag
force-pushed
the
adapt-hwobjs-to-yaml
branch
from
August 28, 2024 05:24
e17dffa
to
2987c68
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This makes the required changes to the hardware objects used by mocked beamline to work with YAML config files.
With this changes, it's possible to start the mocked beamline using YAML config files.
Note, this PR depends on code changes in these PRs: #997 and #996.
I have used YAML config files from this PR: mxcube/mxcubeweb#1358