NSLS-II-SIX / profile_collection

Collection ipython profile
BSD 3-Clause "New" or "Revised" License
0 stars 3 forks source link

Deployment 2020-2.0 checklist #30

Closed mrakitin closed 3 years ago

mrakitin commented 4 years ago

Previsit

Housekeeping

Test deployment

cryos commented 4 years ago

I see some caput:

plans/03-plan.py:    from epics import caget, caput 
plans/03-plan.py:        caput('XF:02IDA-OP{Mir:1-Ax:4_Pitch}Cmd:Kill-Cmd',1 ) 
plans/03-plan.py:        caput('XF:02IDA-OP{Mir:1-Ax:4_Pitch}Cmd:Kill-Cmd',1 )

Also, .put:

startup/04-epu.py:            self.setpoint.put(self.position)
startup/04-epu.py:        self.setpoint.put(position, wait=False)
startup/21-areadetector.py:            getattr(self, 'roi' + str(roi_num) + '.min_xyz.min_x').put(min_x)
startup/21-areadetector.py:            getattr(self, 'roi' + str(roi_num) + '.size.x').put(size_x)
startup/21-areadetector.py:            getattr(self, 'roi' + str(roi_num) + '.min_xyz.min_y').put(min_y)
startup/21-areadetector.py:            getattr(self, 'roi' + str(roi_num) + '.size.y').put(size_y)
startup/21-areadetector.py:            getattr(self, 'roi' + str(roi_num) + '.min_xyz.min_z').put(min_z)
startup/21-areadetector.py:            getattr(self, 'roi' + str(roi_num) + '.size.z').put(size_z)
startup/22-rixscam.py:        self._acquisition_signal.put(1, wait=False)
startup/November 2018 22-rixscam.pyno:        self._acquisition_signal.put(1, wait=False)

PR #31 contains my proposed .get() changes.

cryos commented 4 years ago

PR #31 is merged, testing now. The .put and caput mentioned above have not been changed.

danielballan commented 4 years ago

Looking at that PV

XF:02IDA-OP{Mir:1-Ax:4_Pitch}Cmd:Kill-Cmd

they have an ophyd Device connected to that hardware, or so I infer based on the matching PV prefix:

startup/10-mirror.py:m1 = M1('XF:02IDA-OP{Mir:1-Ax:4', name='m1')

An M1 is a custom compound device defined in that same file:

from ophyd import Device, EpicsMotor
from ophyd import Component as Cpt

class M1(Device):
    x = Cpt(EpicsMotor, '_Trans}Mtr')
    pit = Cpt(EpicsMotor, '_Pitch}Mtr')
    rol = Cpt(EpicsMotor, '_Roll}Mtr')

but EpicsMotor has no signal connected to the Kill-Cmd PV, as you can verify in https://github.com/bluesky/ophyd/blob/master/ophyd/epics_motor.py.

I do not know off the top of my head if Kill-Cmd is common to all EpicsMotors or particular to these. We should investigate that, and then decide whether to add that to EpicsMotor or a special subclass here.

danielballan commented 4 years ago
startup/04-epu.py:            self.setpoint.put(self.position)
startup/04-epu.py:        self.setpoint.put(position, wait=False)

startup/22-rixscam.py:        self._acquisition_signal.put(1, wait=False)

These are correct because they are called inside methods on custom ophyd Devices.

startup/21-areadetector.py:            getattr(self, 'roi' + str(roi_num) + '.min_xyz.min_x').put(min_x)
startup/21-areadetector.py:            getattr(self, 'roi' + str(roi_num) + '.size.x').put(size_x)
startup/21-areadetector.py:            getattr(self, 'roi' + str(roi_num) + '.min_xyz.min_y').put(min_y)
startup/21-areadetector.py:            getattr(self, 'roi' + str(roi_num) + '.size.y').put(size_y)
startup/21-areadetector.py:            getattr(self, 'roi' + str(roi_num) + '.min_xyz.min_z').put(min_z)
startup/21-areadetector.py:            getattr(self, 'roi' + str(roi_num) + '.size.z').put(size_z)

...and same here, though a minor refactor could make that code a bit prettier.