spc-group / haven

Bluesky tools for beamlines managed by the spectroscopy group
https://haven-spc.readthedocs.io/en/latest/
Other
2 stars 5 forks source link

Switch to apstools support for rotating aperature slits #172

Open canismarko opened 5 months ago

canismarko commented 5 months ago

@mdecarabas recently added support for our whitebeam aperture slits to apstools.

We'll need to add back in the SlitMotor definition for backwards compatibility:

class SlitMotor(HavenMotor):
    """An Ophyd device for a motor on a set of slits.

    Similar to a regular motor with extra signals to give it the same
    interface as a non-motor based slit parameter. Different
    implementations of the slits support either provide pseudo motors,
    or a different kind of record.

    """

    readback = Cpt(DerivedSignal, derived_from="user_readback")
    setpoint = Cpt(DerivedSignal, derived_from="user_setpoint")

and override these attributes on the device class, renaming it back to ApertureSlits:

    class SlitAxis(Device):
        size = Cpt(SlitMotor, "Size", labels={"motors"})
        center = Cpt(SlitMotor, "Center", labels={"motors"})

    # Individual slit directions
    h = Cpt(SlitAxis, "h")
    v = Cpt(SlitAxis, "v")
canismarko commented 5 months ago

Also, need to wait for version 1.6.19 of apstools, probably (scheduled for Mar 29).