From 72cf50f3b5f9ffa100ea51eae35687b4baf6f093 Mon Sep 17 00:00:00 2001 From: Nick Waters Date: Thu, 15 Feb 2024 16:23:21 -0800 Subject: [PATCH 1/7] ENH: add flow sensor to devices --- pcdsdevices/atm.py | 4 ++++ pcdsdevices/attenuator.py | 8 ++++++++ pcdsdevices/device_types.py | 3 ++- pcdsdevices/mirror.py | 8 ++++++++ pcdsdevices/pc.py | 12 ++++++++++++ pcdsdevices/wfs.py | 14 ++++++++++++++ 6 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 pcdsdevices/pc.py diff --git a/pcdsdevices/atm.py b/pcdsdevices/atm.py index 643c6e0d6d2..073266a48a2 100644 --- a/pcdsdevices/atm.py +++ b/pcdsdevices/atm.py @@ -1,5 +1,6 @@ from ophyd import Component as Cpt +from .analog_signals import FDQ from .device import GroupDevice from .device import UpdateComponent as UpCpt from .epics_motor import BeckhoffAxis, BeckhoffAxisNoOffset @@ -41,6 +42,8 @@ class ArrivalTimeMonitor(BaseInterface, GroupDevice, LightpathInOutCptMixin): thermocouple1 = Cpt(TwinCATTempSensor, ':STC:01', kind='normal', doc='First thermocouple.') + flow_meter = Cpt(FDQ, '', kind='normal', + doc='Device that measures PCW Flow Rate.') class TM1K4Target(ATMTarget): @@ -79,6 +82,7 @@ class TM2K4(ArrivalTimeMonitor): target = Cpt(TM2K4Target, ':MMS:STATE', kind='hinted', doc='Control of the diagnostic stack via saved positions.') + flow_meter = None class TM2K2Target(ATMTarget): diff --git a/pcdsdevices/attenuator.py b/pcdsdevices/attenuator.py index 55ddd51493a..f86c230aa9d 100644 --- a/pcdsdevices/attenuator.py +++ b/pcdsdevices/attenuator.py @@ -18,6 +18,7 @@ from ophyd.signal import EpicsSignal, EpicsSignalRO, Signal, SignalRO from . import utils +from .analog_signals import FDQ from .device import GroupDevice from .device import UnrelatedComponent as UCpt from .device import UpdateComponent as UpCpt @@ -1017,6 +1018,9 @@ class AttenuatorSXR_Ladder(FltMvInterface, PVPositionerPC, blade_03 = Cpt(SXRLadderAttenuatorBlade, ':MMS:03') blade_04 = Cpt(SXRLadderAttenuatorBlade, ':MMS:04') + flow_meter = Cpt(FDQ, '', kind='normal', + doc='Device that measures PCW Flow Rate.') + def __init__(self, *args, limits=None, **kwargs): UCpt.collect_prefixes(self, kwargs) limits = limits or (0.0, 1.0) @@ -1181,6 +1185,9 @@ class AttenuatorSXR_LadderTwoBladeLBD(FltMvInterface, PVPositionerPC, # LBD Stage blade_03 = Cpt(FEESolidAttenuatorBlade, ':MMS:03') + flow_meter = Cpt(FDQ, '', kind='normal', + doc='Device that measures PCW Flow Rate.') + def __init__(self, *args, limits=None, **kwargs): UCpt.collect_prefixes(self, kwargs) limits = limits or (0.0, 1.0) @@ -1325,6 +1332,7 @@ class AT1K4(AttenuatorSXR_Ladder): calculator_prefix : str The prefix for the calculator PVs. """ + flow_meter = None class AT1K2(AttenuatorSXR_LadderTwoBladeLBD): diff --git a/pcdsdevices/device_types.py b/pcdsdevices/device_types.py index 5c915742743..dab25e9d59e 100644 --- a/pcdsdevices/device_types.py +++ b/pcdsdevices/device_types.py @@ -45,4 +45,5 @@ from .spectrometer import Gen1VonHamos4Crystal, Kmono, VonHamos4Crystal from .timetool import Timetool, TimetoolWithNav from .valve import GateValve, Stopper -from .wfs import WaveFrontSensorTarget +from .wfs import (WaveFrontSensorTarget, WaveFrontSensorTargetCool, + WaveFrontSensorTargetPF2K2) diff --git a/pcdsdevices/mirror.py b/pcdsdevices/mirror.py index 572cdb80877..23e8df270da 100644 --- a/pcdsdevices/mirror.py +++ b/pcdsdevices/mirror.py @@ -1132,6 +1132,10 @@ class FFMirror(BaseInterface, GroupDevice, LightpathMixin): y_enc_rms = Cpt(PytmcSignal, ':ENC:Y:RMS', io='i', kind='normal') pitch_enc_rms = Cpt(PytmcSignal, ':ENC:PITCH:RMS', io='i', kind='normal') + cool_flow1 = Cpt(EpicsSignalRO, ':FWM:1_RBV', kind='normal') + cool_flow2 = Cpt(EpicsSignalRO, ':FWM:2_RBV', kind='normal') + cool_press = Cpt(EpicsSignalRO, ':PRSM:1_RBV', kind='normal') + # Lightpath config: implement inserted, removed, transmission, subscribe lightpath_cpts = ['x.user_readback', 'y.user_readback'] @@ -1245,6 +1249,10 @@ class FFMirrorZ(FFMirror): kind='normal') chin_tail_rtd = Cpt(PytmcSignal, ':RTD:TAIL:TEMP', io='i', kind='normal') + # Kill these until MR4 and MR5 K4 implement them. + cool_flow1 = None + cool_flow2 = None + cool_press = None class TwinCATMirrorStripe(TwinCATStatePMPS): diff --git a/pcdsdevices/pc.py b/pcdsdevices/pc.py new file mode 100644 index 00000000000..b0d27420d6a --- /dev/null +++ b/pcdsdevices/pc.py @@ -0,0 +1,12 @@ +from ophyd import Component as Cpt +from ophyd import Device + +from .digital_signals import J120K + + +class PhotonCollimator(Device): + """ + Photon Collimator Stub for Cooling Readback + """ + flow_switch = Cpt(J120K, '', kind='normal', + doc='Device that indicates nominal PCW Flow Rate.') diff --git a/pcdsdevices/wfs.py b/pcdsdevices/wfs.py index 5e30b7e5bf6..ccc5e53dc32 100644 --- a/pcdsdevices/wfs.py +++ b/pcdsdevices/wfs.py @@ -1,5 +1,6 @@ from ophyd import Component as Cpt +from .analog_signals import FDQ from .device import GroupDevice from .device import UpdateComponent as UpCpt from .digital_signals import J120K @@ -27,6 +28,8 @@ class WaveFrontSensorTarget(BaseInterface, GroupDevice, Each target is a waveplate that results in a characteristic pattern on a downstream imager (PPM or XTES Imager) that can be used to determine information about the wavefront. + + With a Kenyence FDQ flow meter installed. """ tab_component_names = True @@ -44,6 +47,16 @@ class WaveFrontSensorTarget(BaseInterface, GroupDevice, doc='First thermocouple.') thermocouple2 = Cpt(TwinCATTempSensor, ':STC:02', kind='normal', doc='Second thermocouple.') + flow_meter = Cpt(FDQ, '', kind='normal', + doc='Device that measures PCW Flow Rate.') + + +class WaveFrontSensorTargetPF2K2(WaveFrontSensorTarget): + """ + An array of targets used to determine the beam's wavefront. + Currently with no cooling. + """ + flow_meter = None class WaveFrontSensorTargetCool(WaveFrontSensorTarget): @@ -52,5 +65,6 @@ class WaveFrontSensorTargetCool(WaveFrontSensorTarget): This array has a cooling indication switch. """ + flow_meter = None flow_switch = Cpt(J120K, '', kind='normal', doc='Device that indicates nominal PCW Flow Rate.') From 0c80387dcb61dc71e5d74fe54c7dea0ce788cf9f Mon Sep 17 00:00:00 2001 From: Nick Waters Date: Tue, 20 Feb 2024 11:31:26 -0800 Subject: [PATCH 2/7] DOC: add doc notes --- .../1199-cool-updates.rst | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 docs/source/upcoming_release_notes/1199-cool-updates.rst diff --git a/docs/source/upcoming_release_notes/1199-cool-updates.rst b/docs/source/upcoming_release_notes/1199-cool-updates.rst new file mode 100644 index 00000000000..c233cbad546 --- /dev/null +++ b/docs/source/upcoming_release_notes/1199-cool-updates.rst @@ -0,0 +1,36 @@ +1199 cool-updates +################# + +API Breaks +---------- +- N/A + +Features +-------- +- create a new sub module `pc.py` + +Device Updates +-------------- +- in `atm.py` add `flow_meter` to `ArrivalTimeMonitor` +- in `attenuator.py` add `flow_meter` to `AttenuatorSXR_Ladder` +- in `attenuator.py` add `flow_meter` to `AttenuatorSXR_LadderTwoBladeLBD` +- in `device_types.py` add `WaveFrontSensorTargetCool` , `WaveFrontSensorTargetPF2K2` +- in `mirror.py` add flow sensor variable to `FFMirror` +- in `wfs.py` add `flow_meter` to `WaveFrontSensorTarget` + +New Devices +----------- +- add class `PhotonCollimator` to readout `flow_switch` +- add class `WaveFrontSensorTargetPF2K2` to readout `flow_switch` + +Bugfixes +-------- +- N/A + +Maintenance +----------- +- N/A + +Contributors +------------ +- nrwslac From a2eb6f6157fe1b0bd46bf3c4d0887cdad62ea065 Mon Sep 17 00:00:00 2001 From: Nick Waters Date: Tue, 20 Feb 2024 14:55:59 -0800 Subject: [PATCH 3/7] ENH: add new class for MFX ATM in atm.py, add some docs --- pcdsdevices/atm.py | 7 +++++++ pcdsdevices/mirror.py | 6 +++--- pcdsdevices/pc.py | 3 +++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/pcdsdevices/atm.py b/pcdsdevices/atm.py index 073266a48a2..c16fd84b032 100644 --- a/pcdsdevices/atm.py +++ b/pcdsdevices/atm.py @@ -101,3 +101,10 @@ class TM2K2(ArrivalTimeMonitor): """ target = Cpt(TM2K2Target, ':MMS:STATE', kind='hinted', doc='Control of the diagnostic stack via saved positions.') + + +class MFXATM(ArrivalTimeMonitor): + """ + An ATM in MFX that has no cooling. + """ + flow_meter = None diff --git a/pcdsdevices/mirror.py b/pcdsdevices/mirror.py index 23e8df270da..ff18471300e 100644 --- a/pcdsdevices/mirror.py +++ b/pcdsdevices/mirror.py @@ -1132,9 +1132,9 @@ class FFMirror(BaseInterface, GroupDevice, LightpathMixin): y_enc_rms = Cpt(PytmcSignal, ':ENC:Y:RMS', io='i', kind='normal') pitch_enc_rms = Cpt(PytmcSignal, ':ENC:PITCH:RMS', io='i', kind='normal') - cool_flow1 = Cpt(EpicsSignalRO, ':FWM:1_RBV', kind='normal') - cool_flow2 = Cpt(EpicsSignalRO, ':FWM:2_RBV', kind='normal') - cool_press = Cpt(EpicsSignalRO, ':PRSM:1_RBV', kind='normal') + cool_flow1 = Cpt(EpicsSignalRO, ':FWM:1_RBV', kind='normal', doc="Axilon Panel Flow Meter Loop 1") + cool_flow2 = Cpt(EpicsSignalRO, ':FWM:2_RBV', kind='normal', doc="Axilon Panel Flow Meter Loop 2") + cool_press = Cpt(EpicsSignalRO, ':PRSM:1_RBV', kind='normal', doc="Axilon Panel Pressure Meter") # Lightpath config: implement inserted, removed, transmission, subscribe lightpath_cpts = ['x.user_readback', 'y.user_readback'] diff --git a/pcdsdevices/pc.py b/pcdsdevices/pc.py index b0d27420d6a..c55670870da 100644 --- a/pcdsdevices/pc.py +++ b/pcdsdevices/pc.py @@ -1,3 +1,6 @@ +""" +Module for all device related to Photon Collimators. +""" from ophyd import Component as Cpt from ophyd import Device From 9a779a4676d3b9cb3ee848a25cdfb2196d182a4c Mon Sep 17 00:00:00 2001 From: Nick Waters Date: Tue, 20 Feb 2024 14:58:35 -0800 Subject: [PATCH 4/7] DOC: add doc notes about MFXATM --- docs/source/upcoming_release_notes/1199-cool-updates.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/upcoming_release_notes/1199-cool-updates.rst b/docs/source/upcoming_release_notes/1199-cool-updates.rst index c233cbad546..2f6799d1a03 100644 --- a/docs/source/upcoming_release_notes/1199-cool-updates.rst +++ b/docs/source/upcoming_release_notes/1199-cool-updates.rst @@ -22,6 +22,7 @@ New Devices ----------- - add class `PhotonCollimator` to readout `flow_switch` - add class `WaveFrontSensorTargetPF2K2` to readout `flow_switch` +- add class `MFXATM` in `atm.py` Bugfixes -------- From cd0eac9dbfc01890b706183471fd5605a1c9ffd7 Mon Sep 17 00:00:00 2001 From: Nick Waters Date: Tue, 20 Feb 2024 17:39:23 -0800 Subject: [PATCH 5/7] ENH: make a new class for FDQ sensor in wfs, update docs and device_types.py --- pcdsdevices/device_types.py | 2 +- pcdsdevices/wfs.py | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/pcdsdevices/device_types.py b/pcdsdevices/device_types.py index dab25e9d59e..56e212c6687 100644 --- a/pcdsdevices/device_types.py +++ b/pcdsdevices/device_types.py @@ -46,4 +46,4 @@ from .timetool import Timetool, TimetoolWithNav from .valve import GateValve, Stopper from .wfs import (WaveFrontSensorTarget, WaveFrontSensorTargetCool, - WaveFrontSensorTargetPF2K2) + WaveFrontSensorTargetFDQ) diff --git a/pcdsdevices/wfs.py b/pcdsdevices/wfs.py index ccc5e53dc32..badf9a0fed2 100644 --- a/pcdsdevices/wfs.py +++ b/pcdsdevices/wfs.py @@ -29,7 +29,6 @@ class WaveFrontSensorTarget(BaseInterface, GroupDevice, on a downstream imager (PPM or XTES Imager) that can be used to determine information about the wavefront. - With a Kenyence FDQ flow meter installed. """ tab_component_names = True @@ -47,16 +46,16 @@ class WaveFrontSensorTarget(BaseInterface, GroupDevice, doc='First thermocouple.') thermocouple2 = Cpt(TwinCATTempSensor, ':STC:02', kind='normal', doc='Second thermocouple.') - flow_meter = Cpt(FDQ, '', kind='normal', - doc='Device that measures PCW Flow Rate.') -class WaveFrontSensorTargetPF2K2(WaveFrontSensorTarget): +class WaveFrontSensorTargetFDQ(WaveFrontSensorTarget): """ An array of targets used to determine the beam's wavefront. - Currently with no cooling. + + With a Kenyence FDQ flow meter installed. """ - flow_meter = None + flow_meter = Cpt(FDQ, '', kind='normal', + doc='Device that measures PCW Flow Rate.') class WaveFrontSensorTargetCool(WaveFrontSensorTarget): @@ -65,6 +64,5 @@ class WaveFrontSensorTargetCool(WaveFrontSensorTarget): This array has a cooling indication switch. """ - flow_meter = None flow_switch = Cpt(J120K, '', kind='normal', doc='Device that indicates nominal PCW Flow Rate.') From 4d8d23bda9965d287303af4fc695fd55447c7290 Mon Sep 17 00:00:00 2001 From: Nick Waters Date: Tue, 20 Feb 2024 17:41:27 -0800 Subject: [PATCH 6/7] DOC: update docs to reflect class re-work --- docs/source/upcoming_release_notes/1199-cool-updates.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/upcoming_release_notes/1199-cool-updates.rst b/docs/source/upcoming_release_notes/1199-cool-updates.rst index 2f6799d1a03..1820e485cbd 100644 --- a/docs/source/upcoming_release_notes/1199-cool-updates.rst +++ b/docs/source/upcoming_release_notes/1199-cool-updates.rst @@ -7,21 +7,21 @@ API Breaks Features -------- -- create a new sub module `pc.py` +- Device Updates -------------- - in `atm.py` add `flow_meter` to `ArrivalTimeMonitor` - in `attenuator.py` add `flow_meter` to `AttenuatorSXR_Ladder` - in `attenuator.py` add `flow_meter` to `AttenuatorSXR_LadderTwoBladeLBD` -- in `device_types.py` add `WaveFrontSensorTargetCool` , `WaveFrontSensorTargetPF2K2` +- in `device_types.py` add `WaveFrontSensorTargetCool` , `WaveFrontSensorTargetFDQ` - in `mirror.py` add flow sensor variable to `FFMirror` - in `wfs.py` add `flow_meter` to `WaveFrontSensorTarget` New Devices ----------- -- add class `PhotonCollimator` to readout `flow_switch` -- add class `WaveFrontSensorTargetPF2K2` to readout `flow_switch` +- add class `PhotonCollimator` to readout `flow_switch` in new module `pc.py` +- add class `WaveFrontSensorTargetFDQ` to read out `flow_meter` - add class `MFXATM` in `atm.py` Bugfixes From 3980aee262fdbbae8f4850930dbcba696549fb57 Mon Sep 17 00:00:00 2001 From: Nick Waters Date: Tue, 20 Feb 2024 17:44:37 -0800 Subject: [PATCH 7/7] DOC: update docs --- docs/source/upcoming_release_notes/1199-cool-updates.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/source/upcoming_release_notes/1199-cool-updates.rst b/docs/source/upcoming_release_notes/1199-cool-updates.rst index 1820e485cbd..36f07e9d2f2 100644 --- a/docs/source/upcoming_release_notes/1199-cool-updates.rst +++ b/docs/source/upcoming_release_notes/1199-cool-updates.rst @@ -7,7 +7,7 @@ API Breaks Features -------- -- +- N/A Device Updates -------------- @@ -16,7 +16,6 @@ Device Updates - in `attenuator.py` add `flow_meter` to `AttenuatorSXR_LadderTwoBladeLBD` - in `device_types.py` add `WaveFrontSensorTargetCool` , `WaveFrontSensorTargetFDQ` - in `mirror.py` add flow sensor variable to `FFMirror` -- in `wfs.py` add `flow_meter` to `WaveFrontSensorTarget` New Devices -----------