From dddb64a1d70308c51fd9da0c649c676967cfcb9a Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Fri, 27 Aug 2021 16:45:57 +0200 Subject: [PATCH] renamed n_und_cal -> n_und_ref --- devices/undulator.py | 10 +++++----- maloja.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/devices/undulator.py b/devices/undulator.py index cfef679..c44ba45 100644 --- a/devices/undulator.py +++ b/devices/undulator.py @@ -15,21 +15,21 @@ N_UND_CHIC = 14 class Undulators(Adjustable): - def __init__(self, n_unds, n_und_cal, chic_fudge_offset=0, scaled=True, ID="ATHOS_UNDULATORS", name="Athos Undulators", units="eV"): + def __init__(self, n_unds, n_und_ref, chic_fudge_offset=0, scaled=True, ID="ATHOS_UNDULATORS", name="Athos Undulators", units="eV"): super().__init__(ID, name=name, units=units) self.n_unds = n_unds = list(n_unds) - self.n_und_cal = n_und_cal + self.n_und_ref = n_und_ref - if n_und_cal not in n_unds: - raise ValueError(f"the reference undulator ({n_und_cal}) is not in the list of active undulators: {n_unds}") + if n_und_ref not in n_unds: + raise ValueError(f"the reference undulator ({n_und_ref}) is not in the list of active undulators: {n_unds}") if N_UND_CHIC in n_unds: log.warning(f"the CHIC ({N_UND_CHIC}) is in the list of active undulators: {n_unds}, and will be ignored/removed") n_unds.remove(N_UND_CHIC) self.und_names = und_names = [UND_NAME_FMT.format(n) for n in n_unds] - self.und_name_cal = und_name_cal = UND_NAME_FMT.format(n_und_cal) + self.und_name_cal = und_name_cal = UND_NAME_FMT.format(n_und_ref) self.adjs = {name: Undulator(name) for name in und_names} self.chic = CHIC(chic_fudge_offset, name, units) diff --git a/maloja.py b/maloja.py index 2552035..7a49e0d 100644 --- a/maloja.py +++ b/maloja.py @@ -33,13 +33,13 @@ source_x = Motor("SATES20-MANIP1:MOTOR_2", name="Source manipulator x") att = Attenuator("SATFE10-OATT064") -n_und_cal = 6 +n_und_ref = 6 n_unds = [ 6, 7, 8, 9, 10, 11, 12, 13, # 14 is the CHIC 15, 16, 17, 18, 19, 20, 21, 22 ] chic_fudge_offset = 0 -und = Undulators(n_unds, n_und_cal, chic_fudge_offset, name="z Athos Undulators") +und = Undulators(n_unds, n_und_ref, chic_fudge_offset, name="z Athos Undulators") xota_z_trans = Motor("SATES21-XOTA166:W_Z", name="Table 1: Z coordinated") #xota_hori_z = Motor("SATES21-XOTA166:MOTOR_Z", name="Table 1: Z raw")