Skip to content
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
merged 9 commits into from
Aug 28, 2024

Commits on Aug 28, 2024

  1. make HWR.beamline.acquisition_limit_values work again

    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.
    elmjag committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    9c2ee9a View commit details
    Browse the repository at this point in the history
  2. port AbstractDetector to use get_property()

    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.
    elmjag committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    e574f97 View commit details
    Browse the repository at this point in the history
  3. port beam releated HWOBJS to work with YAML

    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.
    elmjag committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    94f3790 View commit details
    Browse the repository at this point in the history
  4. make some diffractometer related HWOBJs work with YAML

    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.
    elmjag committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    afed8c5 View commit details
    Browse the repository at this point in the history
  5. make some sample changer related HWOBJs work with YAML

    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.
    elmjag committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    5a37c97 View commit details
    Browse the repository at this point in the history
  6. remove proxy 'camera' attribute on SampleView HWOBJs

    The 'camera' attribute is now automagically set from the 'objects'
    settings in YAML/XML configure file.
    elmjag committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    d3b2fa2 View commit details
    Browse the repository at this point in the history
  7. refactor initialization code of MDCameraMockup

    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.
    elmjag committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    70ae556 View commit details
    Browse the repository at this point in the history
  8. make BeamlineActions HWOBJs work with YAML

    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.
    elmjag committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    fb089dd View commit details
    Browse the repository at this point in the history
  9. add detector_distance attribute to detector mockup HWOBJ

    When loading DetectorMockup hardware object from YAML
    configuration file, you'll get a warning if there is no
    'detector_distance' attribute.
    elmjag committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    2987c68 View commit details
    Browse the repository at this point in the history