diff --git a/pyaml/__init__.py b/pyaml/__init__.py index afbbd11b..c58ae48b 100644 --- a/pyaml/__init__.py +++ b/pyaml/__init__.py @@ -8,7 +8,7 @@ __title__ = "pyAML" __description__ = "Python Accelerator Middle Layer" __url__ = "https://github.com/python-accelerator-middle-layer/pyaml" -__version__ = "0.2.2" +__version__ = "0.2.3" __author__ = "pyAML collaboration" __author_email__ = "" diff --git a/pyaml/control/abstract_impl.py b/pyaml/control/abstract_impl.py index 28120008..38a55f7d 100644 --- a/pyaml/control/abstract_impl.py +++ b/pyaml/control/abstract_impl.py @@ -1,7 +1,10 @@ +from typing import Any + import numpy as np from numpy import double from numpy.typing import NDArray +from .. import PyAMLException from ..bpm.bpm_model import BPMModel from ..common import abstract from ..common.abstract_aggregator import ScalarAggregator @@ -15,6 +18,168 @@ # ------------------------------------------------------------------------------ +def check_range(values: Any, dev_range: Any) -> bool: + """ + Check whether values are within given ranges. + + Inverted semantics: + - True -> all checks pass (everything is within bounds) + - False -> at least one check fails (out of range) + + dev_range format (flat): + [min1, max1, min2, max2, ...] + + Broadcasting rules: + Let N = number of values, K = number of ranges (pairs). + - N == K : one range per value + - N == 1 and K > 1: the single value must satisfy ALL ranges + - N > 1 and K == 1: the single range applies to ALL values + """ + # ---- Normalize values to a 1D float array ---- + v = np.asarray(values, dtype=float) + if v.ndim == 0: + v = v.reshape(1) + else: + v = v.ravel() + n = v.size + + # ---- Normalize dev_range (object to preserve None) ---- + r = np.asarray(dev_range, dtype=object).ravel() + if (r.size % 2) != 0: + raise ValueError(f"dev_range must have an even length, got {r.size}") + + mins_obj = r[0::2] + maxs_obj = r[1::2] + k = mins_obj.size + + # ---- Broadcasting rules ---- + if n == k: + vv = v + mins = mins_obj + maxs = maxs_obj + elif n == 1 and k > 1: + vv = np.full(k, v[0], dtype=float) + mins = mins_obj + maxs = maxs_obj + elif n > 1 and k == 1: + vv = v + mins = np.full(n, mins_obj[0], dtype=object) + maxs = np.full(n, maxs_obj[0], dtype=object) + else: + raise ValueError( + f"Inconsistent sizes: {n} value(s) for {k} range(s). " + f"Supported: N==K, N==1, or K==1." + ) + + # ---- Replace None bounds with -inf / +inf (NumPy-safe) ---- + mins_is_none = np.equal(mins, None) + maxs_is_none = np.equal(maxs, None) + + mins_f = np.where(mins_is_none, -np.inf, mins).astype(float) + maxs_f = np.where(maxs_is_none, +np.inf, maxs).astype(float) + + # ---- Vectorized range check ---- + return bool(np.all((vv >= mins_f) & (vv <= maxs_f))) + + +def _as_1d_float_array(values: Any) -> np.ndarray: + """Normalize input values to a 1D float NumPy array.""" + v = np.asarray(values, dtype=float) + if v.ndim == 0: + return v.reshape(1) + return v.ravel() + + +def _iter_devices_and_ranges(devs: DeviceAccess | DeviceAccessList): + """ + Yield tuples (device, [min, max]) for each underlying device. + + Works for: + - DeviceAccess: yields 1 item + - DeviceAccessList: yields N items based on get_devices() and get_range() flattening + """ + # Single device + if ( + hasattr(devs, "get") + and hasattr(devs, "get_range") + and not hasattr(devs, "get_devices") + ): + r = devs.get_range() + if r is None: + r = [None, None] + return [(devs, [r[0], r[1]])] + + # Device list (expects get_devices() + get_range() flat list) + devices = devs.get_devices() + flat = np.asarray(devs.get_range(), dtype=object).ravel() + if (flat.size % 2) != 0: + raise ValueError(f"dev_range must have an even length, got {flat.size}") + + pairs = [] + for i, d in enumerate(devices): + pairs.append((d, [flat[2 * i], flat[2 * i + 1]])) + return pairs + + +def format_out_of_range_message( + values: Any, + devs: DeviceAccess | DeviceAccessList, + *, + header: str = "Values out of range:", +) -> str: + """ + Build a user-friendly error message for out-of-range values. + + Output example: + Values out of range: + 110 A, '//host/dev/attr' [10.0, 109.0] + 110 A, '//host/dev/attr' [10.0, 109.0] + + Notes: + - Only failing channels are listed. + - Supports scalar/array values and DeviceAccess/DeviceAccessList. + - Uses check_range() semantics (inclusive bounds, None => unbounded). + """ + v = _as_1d_float_array(values) + dev_pairs = _iter_devices_and_ranges(devs) + + # Apply the same broadcasting rules as check_range(): + # - N == K : value per device + # - N == 1 and K > 1 : single value checked against all devices + # - N > 1 and K == 1 : single device range applied to all values (rare here but supported) + n = v.size + k = len(dev_pairs) + + if n == k: + vv = v + pairs = dev_pairs + elif n == 1 and k > 1: + vv = np.full(k, v[0], dtype=float) + pairs = dev_pairs + elif n > 1 and k == 1: + vv = v + pairs = [dev_pairs[0]] * n + else: + raise ValueError( + f"Inconsistent sizes: {n} value(s) for {k} device(s). " + f"Supported: N==K, N==1, or K==1." + ) + + lines = [header] + for val, (dev, r) in zip(vv, pairs): + if not check_range(val, r): + unit = dev.unit() if hasattr(dev, "unit") else "" + name = str(dev) + rmin, rmax = r[0], r[1] + lines.append(f"{val:g} {unit}, '{name}' [{rmin}, {rmax}]") + + # Fallback if nothing selected (should not happen if caller checked range before) + if len(lines) == 1: + lines.append("(no channel details available)") + + return "\n".join(lines) + + class CSScalarAggregator(ScalarAggregator): """ Basic control system aggregator for a list of scalar values @@ -98,6 +263,11 @@ def set(self, value: NDArray[np.float64]): model.compute_hardware_values(mStrengths) ) hardwareIndex += nbDev + dev_range = self._devs.get_range() + if not check_range(newHardwareValues, dev_range): + raise PyAMLException( + format_out_of_range_message(newHardwareValues, self._devs) + ) self._devs.set(newHardwareValues) def set_and_wait(self, value: NDArray[np.float64]): @@ -188,6 +358,9 @@ def get(self) -> float: return self.__dev.get() def set(self, value: float): + dev_range = self.__dev.get_range() + if not check_range(value, dev_range): + raise PyAMLException(format_out_of_range_message(value, self.__dev)) self.__dev.set(value) def set_and_wait(self, value: double): @@ -220,6 +393,9 @@ def get(self) -> float: # Sets the value def set(self, value: float): current = self.__model.compute_hardware_values([value])[0] + dev_range = self.__dev.get_range() + if not check_range(current, dev_range): + raise PyAMLException(format_out_of_range_message(current, self.__dev)) self.__dev.set(current) # Sets the value and wait that the read value reach the setpoint @@ -254,6 +430,9 @@ def get(self) -> np.array: # Sets the value def set(self, value: np.array): for idx, p in enumerate(self.__devs): + dev_range = p.get_range() + if not check_range(value[idx], dev_range): + raise PyAMLException(format_out_of_range_message(value[idx], p)) p.set(value[idx]) # Sets the value and waits that the read value reach the setpoint @@ -286,6 +465,11 @@ def get(self) -> np.array: # Sets the value def set(self, value: np.array): cur = self.__model.compute_hardware_values(value) + for idx, p in enumerate(self.__devs): + dev_range = p.get_range() + if not check_range(cur[idx], dev_range): + raise PyAMLException(format_out_of_range_message(cur[idx], p)) + for idx, p in enumerate(self.__devs): p.set(cur[idx]) @@ -519,6 +703,8 @@ def get(self) -> NDArray: def unit(self) -> str: return self.__tune_monitor._cfg.tune_v.unit() + + # ------------------------------------------------------------------------------ diff --git a/pyaml/control/deviceaccess.py b/pyaml/control/deviceaccess.py index e6dd0cb6..258a454c 100644 --- a/pyaml/control/deviceaccess.py +++ b/pyaml/control/deviceaccess.py @@ -42,3 +42,12 @@ def readback(self): def unit(self) -> str: """Return the variable unit""" pass + + @abstractmethod + def get_range(self) -> list[float]: + pass + + @abstractmethod + def check_device_availability(self) -> bool: + pass + diff --git a/pyaml/control/deviceaccesslist.py b/pyaml/control/deviceaccesslist.py index de61b539..65854ae4 100644 --- a/pyaml/control/deviceaccesslist.py +++ b/pyaml/control/deviceaccesslist.py @@ -47,3 +47,11 @@ def readback(self) -> np.array: def unit(self) -> str: """Return the variable unit""" pass + + @abstractmethod + def get_range(self) -> list[float]: + pass + + @abstractmethod + def check_device_availability(self) -> bool: + pass diff --git a/tests/config/EBSTuneOA.yaml b/tests/config/EBSTune-range.yaml similarity index 99% rename from tests/config/EBSTuneOA.yaml rename to tests/config/EBSTune-range.yaml index fb17131e..3422a53c 100644 --- a/tests/config/EBSTuneOA.yaml +++ b/tests/config/EBSTune-range.yaml @@ -7,7 +7,7 @@ simulators: lattice: sr/lattices/ebs.mat name: design controls: - - type: pyaml-cs-oa.pyaml.controlsystem + - type: tango.pyaml.controlsystem tango_host: ebs-simu-3:10000 name: live data_folder: /data/store @@ -168,6 +168,7 @@ devices: type: tango.pyaml.attribute attribute: srmag/vps-qf1/c05-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C05 model: diff --git a/tests/config/EBSTuneOAEpics.yaml b/tests/config/EBSTuneOAEpics.yaml deleted file mode 100644 index e9ee95c4..00000000 --- a/tests/config/EBSTuneOAEpics.yaml +++ /dev/null @@ -1,1893 +0,0 @@ -type: pyaml.accelerator -facility: ESRF -machine: sr -energy: 6e9 -simulators: - - type: pyaml.lattice.simulator - lattice: sr/lattices/ebs.mat - name: design -controls: - - type: pyaml_cs_oa.controlsystem - prefix: //ebs-simu-3:10000/ - name: live -data_folder: /data/store -arrays: - - type: pyaml.arrays.magnet - name: QForTune - elements: - - QD2E-C04 - - QD2A-C05 - - QD2E-C05 - - QD2A-C06 - - QD2E-C06 - - QD2A-C07 - - QD2E-C07 - - QD2A-C08 - - QD2E-C08 - - QD2A-C09 - - QD2E-C09 - - QD2A-C10 - - QD2E-C10 - - QD2A-C11 - - QD2E-C11 - - QD2A-C12 - - QD2E-C12 - - QD2A-C13 - - QD2E-C13 - - QD2A-C14 - - QD2E-C14 - - QD2A-C15 - - QD2E-C15 - - QD2A-C16 - - QD2E-C16 - - QD2A-C17 - - QD2E-C17 - - QD2A-C18 - - QD2E-C18 - - QD2A-C19 - - QD2E-C19 - - QD2A-C20 - - QD2E-C20 - - QD2A-C21 - - QD2E-C21 - - QD2A-C22 - - QD2E-C22 - - QD2A-C23 - - QD2E-C23 - - QD2A-C24 - - QD2E-C24 - - QD2A-C25 - - QD2E-C25 - - QD2A-C26 - - QD2E-C26 - - QD2A-C27 - - QD2E-C27 - - QD2A-C28 - - QD2E-C28 - - QD2A-C29 - - QD2E-C29 - - QD2A-C30 - - QD2E-C30 - - QD2A-C31 - - QD2E-C31 - - QD2A-C32 - - QD2E-C32 - - QD2A-C01 - - QD2E-C01 - - QD2A-C02 - - QD2E-C02 - - QD2A-C03 - - QF1E-C04 - - QF1A-C05 - - QF1E-C05 - - QF1A-C06 - - QF1E-C06 - - QF1A-C07 - - QF1E-C07 - - QF1A-C08 - - QF1E-C08 - - QF1A-C09 - - QF1E-C09 - - QF1A-C10 - - QF1E-C10 - - QF1A-C11 - - QF1E-C11 - - QF1A-C12 - - QF1E-C12 - - QF1A-C13 - - QF1E-C13 - - QF1A-C14 - - QF1E-C14 - - QF1A-C15 - - QF1E-C15 - - QF1A-C16 - - QF1E-C16 - - QF1A-C17 - - QF1E-C17 - - QF1A-C18 - - QF1E-C18 - - QF1A-C19 - - QF1E-C19 - - QF1A-C20 - - QF1E-C20 - - QF1A-C21 - - QF1E-C21 - - QF1A-C22 - - QF1E-C22 - - QF1A-C23 - - QF1E-C23 - - QF1A-C24 - - QF1E-C24 - - QF1A-C25 - - QF1E-C25 - - QF1A-C26 - - QF1E-C26 - - QF1A-C27 - - QF1E-C27 - - QF1A-C28 - - QF1E-C28 - - QF1A-C29 - - QF1E-C29 - - QF1A-C30 - - QF1E-C30 - - QF1A-C31 - - QF1E-C31 - - QF1A-C32 - - QF1E-C32 - - QF1A-C01 - - QF1E-C01 - - QF1A-C02 - - QF1E-C02 - - QF1A-C03 -devices: -- type: pyaml.magnet.quadrupole - name: QF1E-C04 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00054 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c04-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C05 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.996841 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c05-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C05 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00191 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c05-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C06 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.0003 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c06-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C06 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.997615 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c06-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C07 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.998152 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c07-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C07 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00262 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c07-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C08 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00319 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c08-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C08 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.996180929 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c08-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C09 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00206 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c09-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C09 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.999285 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c09-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C10 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00232 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c10-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C10 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.998212 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c10-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C11 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.999225 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c11-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C11 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.998033 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c11-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C12 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.998748 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c12-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C12 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.0023 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c12-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C13 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00337 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c13-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C13 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00403 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c13-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C14 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00182 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c14-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C14 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.998303 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c14-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C15 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.998748 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c15-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C15 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.994098 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c15-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C16 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00232 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c16-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C16 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.99884 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c16-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C17 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.0079 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c17-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C17 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.999523 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c17-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C18 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c18-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C18 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.999854 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c18-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C19 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.99845 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c19-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C19 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c19-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C20 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00095 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c20-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C20 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.996753 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c20-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C21 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00334 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c21-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C21 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.997707 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c21-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C22 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00152 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c22-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C22 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.998124 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c22-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C23 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.996662 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c23-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C23 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.0017 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c23-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C24 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.999642 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c24-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C24 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00042 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c24-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C25 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00471 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c25-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C25 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00393 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c25-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C26 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.992906 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c26-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C26 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00268 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c26-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C27 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00248 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c27-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C27 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00203 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c27-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C28 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.998030791 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c28-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C28 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00232 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c28-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C29 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.995052 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c29-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C29 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00155 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c29-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C30 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.998271 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c30-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C30 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.999702 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c30-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C31 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.998005 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c31-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C31 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.999463 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c31-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C32 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.997794 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c32-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C32 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00203 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c32-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C01 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00504 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c01-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C01 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.998212 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c01-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C02 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.0037 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c02-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1E-C02 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00093 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c02-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QF1A-C03 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.0025 - crosstalk: 1.0 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QF1_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qf1/c03-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C04 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.999305341 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c04-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C05 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.997452918 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c05-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C05 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.997993208 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c05-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C06 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.006031322 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c06-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C06 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.998547233 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c06-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C07 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.002327856 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c07-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C07 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.000154369 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c07-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C08 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.009580478 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c08-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C08 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.00447669 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c08-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C09 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.0015563 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c09-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C09 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.997221365 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c09-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C10 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.005954167 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c10-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C10 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.006725723 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c10-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C11 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.994535144 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c11-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C11 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.999550256 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c11-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C12 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.001479145 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c12-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C12 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.000321811 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c12-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C13 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.006715036 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c13-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C13 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.0036395 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c13-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C14 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.997684471 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c14-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C14 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.000385922 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c14-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C15 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.999010167 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c15-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C15 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.998392922 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c15-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C16 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.999318789 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c16-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C16 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.996926967 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c16-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C17 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.000849027 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c17-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C17 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.003392444 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c17-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C18 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.001312133 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c18-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C18 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.005402902 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c18-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C19 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.995846789 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c19-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C19 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.005877011 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c19-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C20 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.001016211 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c20-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C20 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.999010167 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c20-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C21 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.007265811 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c21-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C21 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.998238611 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c21-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C22 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.998161456 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c22-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C22 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.004642522 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c22-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C23 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.001479145 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c23-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C23 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.001942078 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c23-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C24 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.999087322 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c24-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C24 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.998547233 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c24-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C25 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.001698055 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c25-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C25 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.999704567 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c25-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C26 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.999164478 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c26-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C26 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.000694659 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c26-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C27 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.99945971 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c27-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C27 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.999922816 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c27-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C28 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.999922816 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c28-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C28 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.997838839 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c28-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C29 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.003318926 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c29-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C29 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.004179589 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c29-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C30 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.999010167 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c30-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C30 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.9987787 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c30-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C31 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.004411056 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c31-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C31 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.0029451 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c31-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C32 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.009426167 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c32-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C32 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.0050283 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c32-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C01 - model: - type: pyaml.magnet.linear_model - calibration_factor: 0.998533498 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c01-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C01 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.003485189 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c01-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C02 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.001389318 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c02-a/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2E-C02 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.006108478 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c02-e/current - unit: A -- type: pyaml.magnet.quadrupole - name: QD2A-C03 - model: - type: pyaml.magnet.linear_model - calibration_factor: 1.002096389 - crosstalk: 0.99912 - curve: - type: pyaml.configuration.csvcurve - file: sr/magnet_models/QD2_strength.csv - unit: 1/m - powerconverter: - type: pyaml_cs_oa.tangoRW - attribute: srmag/vps-qd2/c03-a/current - unit: A -- type: pyaml.diagnostics.tune_monitor - name: BETATRON_TUNE - tune_h: - type: pyaml_cs_oa.tangoR - attribute: srdiag/beam-tune/main/Qh - unit: mm - tune_v: - type: pyaml_cs_oa.tangoR - attribute: srdiag/beam-tune/main/Qv - unit: mm -- type: pyaml.tuning_tools.tune - name: DEFAULT_TUNE_CORRECTION - quad_array: QForTune - betatron_tune: BETATRON_TUNE - delta: 1e-4 diff --git a/tests/config/EBSTuneOATango.yaml b/tests/config/EBSTuneOATango.yaml index e9ee95c4..adb7be83 100644 --- a/tests/config/EBSTuneOATango.yaml +++ b/tests/config/EBSTuneOATango.yaml @@ -8,7 +8,7 @@ simulators: name: design controls: - type: pyaml_cs_oa.controlsystem - prefix: //ebs-simu-3:10000/ + prefix: //ebs-simu-2:10000/ name: live data_folder: /data/store arrays: @@ -154,6 +154,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c04-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C05 model: @@ -168,6 +169,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c05-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C05 model: @@ -182,6 +184,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c05-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C06 model: @@ -196,6 +199,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c06-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C06 model: @@ -210,6 +214,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c06-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C07 model: @@ -224,6 +229,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c07-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C07 model: @@ -238,6 +244,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c07-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C08 model: @@ -252,6 +259,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c08-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C08 model: @@ -266,6 +274,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c08-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C09 model: @@ -280,6 +289,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c09-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C09 model: @@ -294,6 +304,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c09-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C10 model: @@ -308,6 +319,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c10-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C10 model: @@ -322,6 +334,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c10-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C11 model: @@ -336,6 +349,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c11-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C11 model: @@ -350,6 +364,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c11-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C12 model: @@ -364,6 +379,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c12-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C12 model: @@ -378,6 +394,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c12-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C13 model: @@ -392,6 +409,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c13-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C13 model: @@ -406,6 +424,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c13-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C14 model: @@ -420,6 +439,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c14-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C14 model: @@ -434,6 +454,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c14-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C15 model: @@ -448,6 +469,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c15-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C15 model: @@ -462,6 +484,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c15-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C16 model: @@ -476,6 +499,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c16-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C16 model: @@ -490,6 +514,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c16-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C17 model: @@ -504,6 +529,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c17-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C17 model: @@ -518,6 +544,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c17-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C18 model: @@ -532,6 +559,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c18-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C18 model: @@ -546,6 +574,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c18-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C19 model: @@ -560,6 +589,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c19-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C19 model: @@ -574,6 +604,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c19-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C20 model: @@ -588,6 +619,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c20-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C20 model: @@ -602,6 +634,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c20-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C21 model: @@ -616,6 +649,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c21-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C21 model: @@ -630,6 +664,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c21-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C22 model: @@ -644,6 +679,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c22-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C22 model: @@ -658,6 +694,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c22-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C23 model: @@ -672,6 +709,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c23-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C23 model: @@ -686,6 +724,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c23-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C24 model: @@ -700,6 +739,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c24-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C24 model: @@ -714,6 +754,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c24-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C25 model: @@ -728,6 +769,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c25-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C25 model: @@ -742,6 +784,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c25-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C26 model: @@ -756,6 +799,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c26-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C26 model: @@ -770,6 +814,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c26-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C27 model: @@ -784,6 +829,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c27-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C27 model: @@ -798,6 +844,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c27-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C28 model: @@ -812,6 +859,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c28-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C28 model: @@ -826,6 +874,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c28-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C29 model: @@ -840,6 +889,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c29-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C29 model: @@ -854,6 +904,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c29-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C30 model: @@ -868,6 +919,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c30-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C30 model: @@ -882,6 +934,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c30-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C31 model: @@ -896,6 +949,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c31-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C31 model: @@ -910,6 +964,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c31-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C32 model: @@ -924,6 +979,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c32-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C32 model: @@ -938,6 +994,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c32-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C01 model: @@ -952,6 +1009,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c01-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C01 model: @@ -966,6 +1024,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c01-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C02 model: @@ -980,6 +1039,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c02-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1E-C02 model: @@ -994,6 +1054,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c02-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QF1A-C03 model: @@ -1008,6 +1069,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qf1/c03-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C04 model: @@ -1022,6 +1084,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c04-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C05 model: @@ -1036,6 +1099,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c05-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C05 model: @@ -1050,6 +1114,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c05-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C06 model: @@ -1064,6 +1129,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c06-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C06 model: @@ -1078,6 +1144,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c06-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C07 model: @@ -1092,6 +1159,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c07-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C07 model: @@ -1106,6 +1174,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c07-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C08 model: @@ -1120,6 +1189,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c08-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C08 model: @@ -1134,6 +1204,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c08-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C09 model: @@ -1148,6 +1219,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c09-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C09 model: @@ -1162,6 +1234,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c09-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C10 model: @@ -1176,6 +1249,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c10-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C10 model: @@ -1190,6 +1264,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c10-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C11 model: @@ -1204,6 +1279,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c11-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C11 model: @@ -1218,6 +1294,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c11-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C12 model: @@ -1232,6 +1309,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c12-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C12 model: @@ -1246,6 +1324,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c12-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C13 model: @@ -1260,6 +1339,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c13-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C13 model: @@ -1274,6 +1354,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c13-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C14 model: @@ -1288,6 +1369,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c14-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C14 model: @@ -1302,6 +1384,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c14-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C15 model: @@ -1316,6 +1399,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c15-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C15 model: @@ -1330,6 +1414,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c15-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C16 model: @@ -1344,6 +1429,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c16-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C16 model: @@ -1358,6 +1444,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c16-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C17 model: @@ -1372,6 +1459,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c17-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C17 model: @@ -1386,6 +1474,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c17-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C18 model: @@ -1400,6 +1489,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c18-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C18 model: @@ -1414,6 +1504,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c18-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C19 model: @@ -1428,6 +1519,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c19-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C19 model: @@ -1442,6 +1534,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c19-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C20 model: @@ -1456,6 +1549,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c20-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C20 model: @@ -1470,6 +1564,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c20-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C21 model: @@ -1484,6 +1579,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c21-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C21 model: @@ -1498,6 +1594,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c21-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C22 model: @@ -1512,6 +1609,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c22-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C22 model: @@ -1526,6 +1624,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c22-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C23 model: @@ -1540,6 +1639,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c23-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C23 model: @@ -1554,6 +1654,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c23-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C24 model: @@ -1568,6 +1669,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c24-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C24 model: @@ -1582,6 +1684,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c24-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C25 model: @@ -1596,6 +1699,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c25-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C25 model: @@ -1610,6 +1714,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c25-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C26 model: @@ -1624,6 +1729,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c26-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C26 model: @@ -1638,6 +1744,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c26-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C27 model: @@ -1652,6 +1759,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c27-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C27 model: @@ -1666,6 +1774,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c27-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C28 model: @@ -1680,6 +1789,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c28-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C28 model: @@ -1694,6 +1804,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c28-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C29 model: @@ -1708,6 +1819,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c29-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C29 model: @@ -1722,6 +1834,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c29-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C30 model: @@ -1736,6 +1849,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c30-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C30 model: @@ -1750,6 +1864,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c30-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C31 model: @@ -1764,6 +1879,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c31-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C31 model: @@ -1778,6 +1894,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c31-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C32 model: @@ -1792,6 +1909,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c32-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C32 model: @@ -1806,6 +1924,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c32-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C01 model: @@ -1820,6 +1939,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c01-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C01 model: @@ -1834,6 +1954,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c01-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C02 model: @@ -1848,6 +1969,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c02-a/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2E-C02 model: @@ -1862,6 +1984,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c02-e/current unit: A + range: [10,109] - type: pyaml.magnet.quadrupole name: QD2A-C03 model: @@ -1876,6 +1999,7 @@ devices: type: pyaml_cs_oa.tangoRW attribute: srmag/vps-qd2/c03-a/current unit: A + range: [10,109] - type: pyaml.diagnostics.tune_monitor name: BETATRON_TUNE tune_h: diff --git a/tests/config/sr-range-cfm.yaml b/tests/config/sr-range-cfm.yaml new file mode 100644 index 00000000..ae4fd7f4 --- /dev/null +++ b/tests/config/sr-range-cfm.yaml @@ -0,0 +1,28 @@ +type: pyaml.accelerator +facility: ESRF +machine: sr +energy: 6e9 +simulators: + - type: pyaml.lattice.simulator + lattice: sr/lattices/ebs.mat + name: design +controls: + - type: tango.pyaml.controlsystem + tango_host: ebs-simu-3:10000 + name: live +data_folder: /data/store +arrays: + - type: pyaml.arrays.magnet + name: HCORR + elements: + - SH1A-C01-H + - SH1A-C02-H + - type: pyaml.arrays.magnet + name: VCORR + elements: + - SH1A-C01-V + - SH1A-C02-V +devices: + - sr/quadrupoles/QF1AC01.yaml + - sr/correctors/SH1AC01-range.yaml + - sr/correctors/SH1AC02.yaml diff --git a/tests/config/sr/correctors/SH1AC01-range.yaml b/tests/config/sr/correctors/SH1AC01-range.yaml new file mode 100644 index 00000000..ff9eeee8 --- /dev/null +++ b/tests/config/sr/correctors/SH1AC01-range.yaml @@ -0,0 +1,11 @@ +type: pyaml.magnet.cfm_magnet +name: SH1A-C01 #Name of the element in the lattice model +mapping: + # Multipole mapping for usage in families, in this example SH1-C01A-H is not + # a lattice element present in the model, it is just a name to use in + # PyAML families. When this 'virutal' element is set, it then applies + # the corresponding multipole on the parent element. + - [B0, SH1A-C01-H] + - [A0, SH1A-C01-V] + - [A1, SH1A-C01-SQ] +model: sr/magnet_models/SH1AC01-range.yaml diff --git a/tests/config/sr/magnet_models/SH1AC01-range.yaml b/tests/config/sr/magnet_models/SH1AC01-range.yaml new file mode 100644 index 00000000..2c96a3b8 --- /dev/null +++ b/tests/config/sr/magnet_models/SH1AC01-range.yaml @@ -0,0 +1,27 @@ + type: pyaml.magnet.linear_cfm_model + multipoles: [B0,A0,A1] + units: [rad,rad,m-1] + pseudo_factors: [1.0,-1.0,-1.0] + curves: + - type: pyaml.configuration.csvcurve + file: sr/magnet_models/SH1_SH3_h_strength.csv + - type: pyaml.configuration.csvcurve + file: sr/magnet_models/SH1_SH3_v_strength.csv + - type: pyaml.configuration.csvcurve + file: sr/magnet_models/SH1_SH3_sq_strength.csv + matrix: + type: pyaml.configuration.csvmatrix + file: sr/magnet_models/SH_matrix.csv + powerconverters: + - type: tango.pyaml.attribute + attribute: srmag/ps-corr-sh1/c01-a-ch1/current + unit: A + range: [-1.5, 1.5] + - type: tango.pyaml.attribute + attribute: srmag/ps-corr-sh1/c01-a-ch2/current + unit: A + range: [null, 1.5] + - type: tango.pyaml.attribute + attribute: srmag/ps-corr-sh1/c01-a-ch3/current + unit: A + range: [-1.5, null] diff --git a/tests/dummy_cs/tango-pyaml/tango/pyaml/attribute.py b/tests/dummy_cs/tango-pyaml/tango/pyaml/attribute.py index f5108a5d..a7e4482a 100644 --- a/tests/dummy_cs/tango-pyaml/tango/pyaml/attribute.py +++ b/tests/dummy_cs/tango-pyaml/tango/pyaml/attribute.py @@ -1,3 +1,5 @@ +from typing import Optional, Tuple + from pydantic import BaseModel, ConfigDict from pyaml.control.deviceaccess import DeviceAccess @@ -11,6 +13,7 @@ class ConfigModel(BaseModel): attribute: str unit: str = "" + range: Optional[Tuple[Optional[float], Optional[float]]] = None class Attribute(DeviceAccess): @@ -57,3 +60,17 @@ def unit(self) -> str: def __repr__(self): return repr(self._cfg).replace("ConfigModel", self.__class__.__name__) + + def get_range(self) -> list[float]: + attr_range: list[float] = [None, None] + if self._cfg.range is not None: + attr_range[0] = ( + self._cfg.range[0] if self._cfg.range[0] is not None else None + ) + attr_range[1] = ( + self._cfg.range[1] if self._cfg.range[1] is not None else None + ) + return attr_range + + def check_device_availability(self) -> bool: + return True diff --git a/tests/dummy_cs/tango-pyaml/tango/pyaml/attribute_read_only.py b/tests/dummy_cs/tango-pyaml/tango/pyaml/attribute_read_only.py index 5dca8688..bb2ba4d2 100644 --- a/tests/dummy_cs/tango-pyaml/tango/pyaml/attribute_read_only.py +++ b/tests/dummy_cs/tango-pyaml/tango/pyaml/attribute_read_only.py @@ -31,3 +31,9 @@ def set_and_wait(self, value): def unit(self) -> str: return self._unit + + def get_range(self) -> list[float]: + return [None, None] + + def check_device_availability(self) -> bool: + return True diff --git a/tests/dummy_cs/tango-pyaml/tango/pyaml/attribute_with_tango_powersupply_mocking_behaviour.py b/tests/dummy_cs/tango-pyaml/tango/pyaml/attribute_with_tango_powersupply_mocking_behaviour.py index c53da2d6..9a12dee7 100644 --- a/tests/dummy_cs/tango-pyaml/tango/pyaml/attribute_with_tango_powersupply_mocking_behaviour.py +++ b/tests/dummy_cs/tango-pyaml/tango/pyaml/attribute_with_tango_powersupply_mocking_behaviour.py @@ -159,3 +159,9 @@ def readback(self) -> Value: def unit(self) -> str: return self._unit + + def get_range(self) -> list[float]: + return [None, None] + + def check_device_availability(self) -> bool: + return True diff --git a/tests/dummy_cs/tango-pyaml/tango/pyaml/multi_attribute.py b/tests/dummy_cs/tango-pyaml/tango/pyaml/multi_attribute.py index b015102c..8fd8619f 100644 --- a/tests/dummy_cs/tango-pyaml/tango/pyaml/multi_attribute.py +++ b/tests/dummy_cs/tango-pyaml/tango/pyaml/multi_attribute.py @@ -87,3 +87,17 @@ def unit(self) -> list[str]: def get_last_nb_written(self) -> int: return self.__last_nb_written + + def get_range(self) -> list[float]: + attr_range: list[float] = [] + for device in self: + attr_range.extend(device.get_range()) + return attr_range + + def check_device_availability(self) -> bool: + available = False + for device in self: + available = device.check_device_availability() + if not available: + break + return available diff --git a/tests/test_bpm.py b/tests/test_bpm.py index 3699276c..be334f57 100644 --- a/tests/test_bpm.py +++ b/tests/test_bpm.py @@ -5,13 +5,8 @@ from pyaml.configuration.factory import Factory -@pytest.mark.parametrize( - "install_test_package", - [{"name": "tango-pyaml", "path": "tests/dummy_cs/tango-pyaml"}], - indirect=True, -) -def test_simulator_bpm_tilt(install_test_package): - sr: Accelerator = Accelerator.load("tests/config/bpms.yaml") +def test_simulator_bpm_tilt(): + sr: Accelerator = Accelerator.load("tests/config/bpms.yaml", ignore_external=True) sr.design.get_lattice().disable_6d() bpm = sr.design.get_bpm("BPM_C01-01") assert bpm.tilt.get() == 0 @@ -21,13 +16,8 @@ def test_simulator_bpm_tilt(install_test_package): Factory.clear() -@pytest.mark.parametrize( - "install_test_package", - [{"name": "tango-pyaml", "path": "tests/dummy_cs/tango-pyaml"}], - indirect=True, -) -def test_simulator_bpm_offset(install_test_package): - sr: Accelerator = Accelerator.load("tests/config/bpms.yaml") +def test_simulator_bpm_offset(): + sr: Accelerator = Accelerator.load("tests/config/bpms.yaml", ignore_external=True) sr.design.get_lattice().disable_6d() bpm = sr.design.get_bpm("BPM_C01-01") @@ -58,13 +48,8 @@ def test_simulator_bpm_position(install_test_package): Factory.clear() -@pytest.mark.parametrize( - "install_test_package", - [{"name": "tango-pyaml", "path": "tests/dummy_cs/tango-pyaml"}], - indirect=True, -) -def test_simulator_bpm_position_with_bad_corrector_strength(install_test_package): - sr: Accelerator = Accelerator.load("tests/config/bpms.yaml") +def test_simulator_bpm_position_with_bad_corrector_strength(): + sr: Accelerator = Accelerator.load("tests/config/bpms.yaml", ignore_external=True) sr.design.get_lattice().disable_6d() bpm1 = sr.design.get_bpm("BPM_C01-01") bpm_simple = sr.design.get_bpm("BPM_C01-02") diff --git a/tests/test_ranges.py b/tests/test_ranges.py new file mode 100644 index 00000000..c9b9a92e --- /dev/null +++ b/tests/test_ranges.py @@ -0,0 +1,74 @@ +import numpy as np +import pytest + +from pyaml.control.abstract_impl import check_range + + +@pytest.mark.parametrize( + "values,dev_range,expected", + [ + # --- scalar with single range --- + (3.0, [0.0, 10.0], True), + (12.0, [0.0, 10.0], False), + + # --- list with matching number of ranges --- + ([3.0, 2.0], [0.0, 10.0, 1.0, 5.0], True), + ([3.0, 6.0], [0.0, 10.0, 1.0, 5.0], False), + + # --- numpy arrays --- + (np.array([1.0, 2.0]), [0.0, 2.0, 1.0, 3.0], True), + (np.array([1.0, 4.0]), [0.0, 2.0, 1.0, 3.0], False), + + # --- None bounds (unbounded side) --- + ([3.0, 2.0], [None, 10.0, 1.0, None], True), + ([3.0, 0.5], [None, 10.0, 1.0, None], False), + + # --- single value checked against ALL ranges (broadcast value) --- + (3.0, [0.0, 10.0, -15.0, 15.0], True), + (3.0, [0.0, 10.0, 4.0, 15.0], False), + + # --- single range applied to ALL values (broadcast range) --- + ([1.0, 2.0, 3.0], [0.0, 5.0], True), + ([1.0, 6.0, 3.0], [0.0, 5.0], False), + ], +) +def test_check_range(values, dev_range, expected): + assert check_range(values, dev_range) is expected + + +@pytest.mark.parametrize( + "dev_range", + [ + [0.0, 5.0, 0.0], # odd length + np.array([0.0, 5.0, 0.0]) # odd length (numpy) + ], +) +def test_check_range_raises_on_odd_dev_range_length(dev_range): + with pytest.raises(ValueError): + check_range(1.0, dev_range) + + +@pytest.mark.parametrize( + "values,dev_range", + [ + # N=2 values, K=2.5 ranges -> odd length already covered, so here: N=2, K=3 (size 6) + ([1.0, 2.0], [0.0, 5.0, 0.0, 10.0, -1.0, 1.0]), + # N=3 values, K=2 ranges (size 4) and neither N==1 nor K==1 + ([1.0, 2.0, 3.0], [0.0, 5.0, 0.0, 10.0]), + ], +) +def test_check_range_raises_on_inconsistent_sizes(values, dev_range): + with pytest.raises(ValueError): + check_range(values, dev_range) + + +@pytest.mark.parametrize( + "dev_range", + [ + [0.0, 10.0, -15.0, 15.0], + np.array([0.0, 10.0, -15.0, 15.0], dtype=object), + np.array([0.0, 10.0, -15.0, 15.0], dtype=float), + ], +) +def test_check_range_single_value_is_equivalent_to_explicit_duplication(dev_range): + assert check_range(3.0, dev_range) == check_range([3.0, 3.0], dev_range) diff --git a/tests/test_ranges_array.py b/tests/test_ranges_array.py new file mode 100644 index 00000000..c4d57744 --- /dev/null +++ b/tests/test_ranges_array.py @@ -0,0 +1,20 @@ +import pytest + +import pyaml +from pyaml.accelerator import Accelerator + + +@pytest.mark.parametrize( + "install_test_package", + [{"name": "tango-pyaml", "path": "tests/dummy_cs/tango-pyaml"}], + indirect=True, +) +def test_ranges_array(install_test_package): + sr: Accelerator = Accelerator.load("tests/config/EBSTune-range.yaml") + mag_cur = sr.live.get_magnets("QForTune").hardwares + mag_cur.set(mag_cur.get() + 50) + + mag = sr.live.get_magnets("QForTune").strengths + + with pytest.raises(pyaml.PyAMLException, match="out of range") as excinfo: + mag.set(mag.get() * 1000.0) diff --git a/tests/test_ranges_cfm_deviceaccess.py b/tests/test_ranges_cfm_deviceaccess.py new file mode 100644 index 00000000..76b506b7 --- /dev/null +++ b/tests/test_ranges_cfm_deviceaccess.py @@ -0,0 +1,77 @@ +import numpy as np +import pytest + +from pyaml import PyAMLException +from pyaml.accelerator import Accelerator +from pyaml.configuration.factory import Factory + + +def _in_range(vmin, vmax) -> float: + if vmin is None and vmax is None: + return 0.0 + if vmin is None: + return float(vmax) - 0.1 + if vmax is None: + return float(vmin) + 0.1 + return (float(vmin) + float(vmax)) / 2.0 + + +def _out_of_range(vmin, vmax) -> float: + if vmax is not None: + return float(vmax) + 0.1 + if vmin is not None: + return float(vmin) - 0.1 + raise RuntimeError("Unbounded range [None, None], cannot build an out-of-range value.") + + +@pytest.mark.parametrize( + ("magnet_file", "install_test_package"), + [ + ( + "tests/config/sr-range-cfm.yaml", + {"name": "tango-pyaml", "path": "tests/dummy_cs/tango-pyaml"}, + ), + ], + indirect=["install_test_package"], +) +def test_cfm_ranges_from_yaml_are_propagated_and_enforced(magnet_file, install_test_package): + sr: Accelerator = Accelerator.load(magnet_file) + sr.design.get_lattice().disable_6d() + + # Parent CFM magnet (the one defined in SH1AC01-range.yaml) + m = sr.live.get_cfm_magnet("SH1A-C01") + + devs = m.model.get_devices() + assert len(devs) == 3 + + # Exact ranges coming from the YAML configuration file (powerconverters[*].range) + expected_ranges = [ + [-1.5, 1.5], + [None, 1.5], + [-1.5, None], + ] + + got_ranges = [d.get_range() for d in devs] + assert got_ranges == expected_ranges + + # Build an in-range current vector (3 values) + in_currents = np.array([ + _in_range(*expected_ranges[0]), + _in_range(*expected_ranges[1]), + _in_range(*expected_ranges[2]), + ]) + + # Convert currents -> strengths (vector size 3) + in_strengths = m.model.compute_strengths(in_currents) + m.strengths.set(in_strengths) # must succeed + + # Build an out-of-range current vector (break only channel 2 for instance) + out_currents = in_currents.copy() + out_currents[1] = _out_of_range(*expected_ranges[1]) + + out_strengths = m.model.compute_strengths(out_currents) + + with pytest.raises(PyAMLException, match="out of range"): + m.strengths.set(out_strengths) + + Factory.clear() diff --git a/tests/test_rf.py b/tests/test_rf.py index 4912000d..a3e17639 100644 --- a/tests/test_rf.py +++ b/tests/test_rf.py @@ -6,13 +6,8 @@ from pyaml.configuration.factory import Factory -@pytest.mark.parametrize( - "install_test_package", - [{"name": "tango-pyaml", "path": "tests/dummy_cs/tango-pyaml"}], - indirect=True, -) -def test_rf(install_test_package): - sr: Accelerator = Accelerator.load("tests/config/EBS_rf.yaml") +def test_rf(): + sr: Accelerator = Accelerator.load("tests/config/EBS_rf.yaml", ignore_external=True) RF = sr.design.get_rf_plant("RF") RF.frequency.set(3.523e8) diff --git a/tests/test_tune.py b/tests/test_tune.py index ad104337..93e0b978 100644 --- a/tests/test_tune.py +++ b/tests/test_tune.py @@ -5,13 +5,8 @@ from pyaml.configuration.factory import Factory -@pytest.mark.parametrize( - "install_test_package", - [{"name": "tango-pyaml", "path": "tests/dummy_cs/tango-pyaml"}], - indirect=True, -) -def test_tune(install_test_package): - sr: Accelerator = Accelerator.load("tests/config/EBSTune.yaml") +def test_tune(): + sr: Accelerator = Accelerator.load("tests/config/EBSTune.yaml", ignore_external=True) sr.design.get_lattice().disable_6d() quadForTuneDesign = sr.design.get_magnets("QForTune") diff --git a/tests/test_tune_hardware.py b/tests/test_tune_hardware.py index c0aa4e29..8bd806f8 100644 --- a/tests/test_tune_hardware.py +++ b/tests/test_tune_hardware.py @@ -5,13 +5,8 @@ from pyaml.configuration.factory import Factory -@pytest.mark.parametrize( - "install_test_package", - [{"name": "tango-pyaml", "path": "tests/dummy_cs/tango-pyaml"}], - indirect=True, -) -def test_tune(install_test_package): - sr: Accelerator = Accelerator.load(("tests/config/EBSTune.yaml")) +def test_tune(): + sr: Accelerator = Accelerator.load("tests/config/EBSTune.yaml", ignore_external=True) sr.design.get_lattice().disable_6d() quadForTuneDesign = sr.design.get_magnets("QForTune") diff --git a/tests/test_tune_monitor.py b/tests/test_tune_monitor.py index 0df78bf6..5bf979c5 100644 --- a/tests/test_tune_monitor.py +++ b/tests/test_tune_monitor.py @@ -4,13 +4,8 @@ from pyaml.configuration.factory import Factory -@pytest.mark.parametrize( - "install_test_package", - [{"name": "tango-pyaml", "path": "tests/dummy_cs/tango-pyaml"}], - indirect=True, -) -def test_simulator_tune_monitor(install_test_package): - sr: Accelerator = Accelerator.load("tests/config/tune_monitor.yaml") +def test_simulator_tune_monitor(): + sr: Accelerator = Accelerator.load("tests/config/tune_monitor.yaml", ignore_external=True) sr.design.get_lattice().disable_6d() tune_monitor = sr.design.get_betatron_tune_monitor("BETATRON_TUNE") assert tune_monitor.tune.get()[0] == sr.design.get_lattice().get_tune()[0]