tomography / tomoscan

tomography scan script
https://tomoscan.readthedocs.io
Other
1 stars 11 forks source link

Callback on cameraPVPrefix #134

Open kematusik opened 2 years ago

kematusik commented 2 years ago

As I understand, because all of the camera PVs get set in the init method of tomoscan.py, when I want to switch detector prefixes (i.e. switch between detectors), the Tomoscan server has to be relaunched. Is it desirable to add a callback on the CameraPVPrefix PV and reset all of the PVs associated with the change? Thanks so much.

MarkRivers commented 2 years ago

This is a good point. I ran into a similar issue recently. I wanted to change which motor was used to move the sample out of the beam in the X direction to take the flat field. We have 2 motors that can do this, one below the rotation axis (limited travel) and one above the rotation axis (more travel). In order to change those motors I needed to restart tomoscan.

I think we should move everything related to connecting to PVs out of init and into a new connectPVs method. That can be called whenever a PV name is changed.