Skip to content

Devices

LaserShutter

Bases: InOutPositioner

Controls shutter controlled by Analog Output

Source code in mfx/devices.py
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
class LaserShutter(InOutPositioner):
    """Controls shutter controlled by Analog Output"""
    # EpicsSignals
    voltage = C(EpicsSignal, '')
    state = FC(AttributeSignal, 'voltage_check')
    # Constants
    out_voltage = 5.0
    in_voltage = 0.0
    barrier_voltage = 1.4

    @property
    def voltage_check(self):
        """Return the position we believe shutter based on the channel"""
        if self.voltage.get() >= self.barrier_voltage:
            return 'OUT'
        else:
            return 'IN'

    def _do_move(self, state):
        """Override to just put to the channel"""
        if state.name == 'IN':
            self.voltage.put(self.in_voltage)
        elif state.name == 'OUT':
            self.voltage.put(self.out_voltage)
        else:
            raise ValueError("%s is in an invalid state", state)

voltage_check property

Return the position we believe shutter based on the channel

Piezo

Bases: Device

Device for controlling piezo injector motors

Source code in mfx/devices.py
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
class Piezo(Device):
    """
    Device for controlling piezo injector motors
    """
    velocity =  C(EpicsSignalRO, ':VELOCITYGET')
    req_velocity = C(EpicsSignal, ':VELOCITYSET')
    open_loop_step = C(EpicsSignal, ':OPENLOOPSTEP')

    _default_read_attrs = ['open_loop_step']
    _default_configuration_attrs = ['velocity']

    def tweak(self, distance):
        """
        Tweak the Piezo by a distance
        """
        return self.open_loop_step.set(distance)

tweak(distance)

Tweak the Piezo by a distance

Source code in mfx/devices.py
29
30
31
32
33
def tweak(self, distance):
    """
    Tweak the Piezo by a distance
    """
    return self.open_loop_step.set(distance)

XFLS

Bases: XFLS

XRay Focusing Lens (Be)

These are the stacks with common names on their states and state config PVs that show the focusing config

Source code in mfx/devices.py
 8
 9
10
11
12
13
14
15
16
class XFLS(pcdsdevices.device_types.XFLS):
    """
    XRay Focusing Lens (Be)

    These are the stacks with common names on their states and state config PVs
    that show the focusing config
    """
    states_list = ['6K70', '7K50', '9K45', 'OUT']
    in_states = ['6K70', '7K50', '9K45']