added a coupled Mono Undulators adjustable; added (commented) undulators phases/polarisation adjustable; added waveplate and jet stages

This commit is contained in:
2022-11-08 20:30:14 +01:00
parent b7f1a8029d
commit 449140366d

View File

@ -18,9 +18,11 @@ from slic.devices.general.shutter import Shutter
from slic.utils import devices, Marker, as_shortcut
#from slic.utils import Channels, Config, Elog, Screenshot, PV
#from slic.core.acquisition.fakeacquisition import FakeAcquisition
#from slic.utils import unpickle
from devices.attenuator import Attenuator
from devices.undulator import Undulators, TwoColorChicane, Phases
#from devices.phases import UndPhases
from channels import channels, pvs, detectors
from spreadsheet import overview, print_overview, print_line_for_spreadsheet
@ -39,9 +41,9 @@ gas_attenuator_trans = PVAdjustable("SATFE10-OGAT053:TRANSMISSION", process_time
source_delay = PVAdjustable("SATES20-CVME-EVR0:Pul14-Delay-SP", "SATES20-CVME-EVR0:Pul14-Delay-RB", accuracy=1, name="Source Delay")
mono_coupled = PVAdjustable("SATOP11-OSGM087:SetEnergy", "SATOP11-OSGM087:photonenergy", accuracy=0.1, process_time=11, name="Mono Coupled")
mono = PVAdjustable("SATOP11-OSGM087:SetEnergy", "SATOP11-OSGM087:photonenergy", accuracy=0.1, process_time=3, name="Mono Coupled")
waveplate = Motor("SLAAT21-LMOT-M702:MOT", name="Laser Waveplate")
waveplate = Motor("SLAAT21-LMOT-M712:MOT", name="Laser Waveplate")
TT_delay = Motor("SLAAT21-LMOT-M704:MOT", name="TT_delay")
#laser_comp21 = Motor("SLAAT21-LMOT-M701:MOT", name="Laser Comp T2")
#laser_comp11 = Motor("SLAAT21-LMOT-M705:MOT", name="Laser Comp T1 1")
@ -68,6 +70,40 @@ und1.set_limits(390, 1100)
und2.set_limits(390, 1100)
class MonoUndCoupled(Adjustable):
def __init__(self, mono, und, und_energy_offset=0):
super().__init__("MONO-UND-COUPLED", name="z mono and undulators coupled")
self.mono = mono
self.und = und
self.und_energy_offset = und_energy_offset
def get_current_value(self):
return self.mono.get_current_value()
def set_target_value(self, value):
t1 = self.mono.set_target_value(value)
value += self.und_energy_offset
t2 = self.und.set_target_value(value)
t1.wait()
t2.wait()
def is_moving(self):
return self.mono.is_moving() or self.und.is_moving()
mono_und_coupled = MonoUndCoupled(mono, und, und_energy_offset=3)
#params = unpickle("devices/phases/UE38_meas_and_fit_data.pickle")["fitdata"]
#und_names = [f"SATUN{i:02}" for i in range(6, 22+1) if i != 14]
#polarization = UndPhases("SATUN-PHASES", params, und_names=und_names, isparallel=True, name="z Polarization")
xota1_z_trans = Motor("SATES21-XOTA166:W_Z", name="Table 1: Z coordinated")
xota1_y_trans = Motor("SATES21-XOTA166:W_Y", name="Table 1: Y coordinated")
#xota1_hori_z = Motor("SATES21-XOTA166:MOTOR_Z", name="Table 1: Z raw")
@ -83,6 +119,9 @@ xota3_y_trans = Motor("SATES23-XOTA169:W_Y", name="Table 3: Y coordinated")
mot3_x = SmarActAxis("SATES23-XSMA169:MOT7", name="Table 3: sma x")
mot3_y = SmarActAxis("SATES23-XSMA169:MOT8", name="Table 3: sma y")
jet_rot = SmarActAxis("SATES24-XSMA171:MOT1", name="Jet Rotation degrees")
jet_X = SmarActAxis("SATES24-XSMA171:MOT4", name="Jet X mm")
jet_Z = SmarActAxis("SATES24-XSMA171:MOT6", name="Jet Z mm")
standa = Motor("SLAAT21-LMOT-M707:MOT", name="Standa Motor")
@ -135,7 +174,10 @@ instrument = "maloja"
#pgroup = "p20073" # alvise
#pgroup = "p20194" # TOF beamtime heated valve
#pgroup = "p20276" # COLTRIMS commissioning
pgroup = "p20553"
#pgroup = "p20553" # liquid jet
#pgroup = "p20561" # HHGX beamtime
#pgroup = "p20568" # COLTRIMS commissioning
pgroup = "p20562" # CD -- Woerner
daq = SFAcquisition(instrument, pgroup, default_channels=channels, default_pvs=pvs, default_detectors=detectors, rate_multiplicator=1, append_user_tag_to_data_dir=True)
#daq = FakeAcquisition(instrument, pgroup)