Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • slic/maloja
1 result
Show changes
Commits on Source (6)
......@@ -31,46 +31,55 @@ channels_inten += [
channels_ks = [
"SATES21-GES1:PR1_SPIKES",
#"SATES21-GES1:PR1_SPIKES",
"SATES21-GES1:A1_VALUES",
"SATES21-GES1:A2_VALUES",
"SATES21-GES1:A3_VALUES",
"SATES21-GES1:A4_VALUES",
"SATES21-GES1:B1_VALUES",
"SATES21-GES1:B2_VALUES",
"SATES21-GES1:B3_VALUES",
"SATES21-GES1:B4_VALUES",
#"SATES21-GES1:A2_VALUES",
#"SATES21-GES1:A3_VALUES",
#"SATES21-GES1:A4_VALUES",
#"SATES21-GES1:B1_VALUES",
#"SATES21-GES1:B2_VALUES",
#"SATES21-GES1:B3_VALUES",
#"SATES21-GES1:B4_VALUES",
]
channels_ioxos = [
# "SATES20-LSCP10:CH0:0",
"SATES20-LSCP10:CH0:1",
# "SATES20-LSCP10:CH0:2",
# "SATES20-LSCP10:CH6:1",
# "SATES20-LSCP10:CH0:1",
# "SATES20-LSCP10:CH1:1",
# "SATES20-LSCP10:CH2:0",
# "SATES20-LSCP10:CH2:1",
# "SATES20-LSCP10:CH6:2",
]
channels_events = [
"SAT-CVME-TIFALL5:EvtSet",
]
#channels_cam_gige = [
# f"SATES21-CAMS154-GIGE{i+1}:FPICTURE" for i in range(8)
#]
channels_cam_gige = [
"SATES21-CAMS154-GIGE4:FPICTURE"
# "SATES21-CAMS154-GIGE5:FPICTURE"
# "SATES21-CAMS154-GIGE2:FPICTURE"
# "SLAAT01-LCAM-C603:FPICTURE"
]
channels_cam_pco = [
"SATES21-CAMS154-M1:FPICTURE",
"SATES24-CAMS161-M1:FPICTURE",
# "SATES21-CAMS-PATT1:FPICTURE",
"SATES21-CAMS-PATT1:FPICTURE",
]
names_cam_pco = [
"SATES21-CAMS154-M1",
"SATES24-CAMS161-M1",
# "SATES21-CAMS-PATT1",
"SATES21-CAMS-PATT1",
]
suffices_proc = [
"processing_parameters",
......@@ -85,7 +94,7 @@ for n in names_cam_pco:
# combine all channels:
channels = channels_nbs + channels_inten + channels_cam_pco + channels_cam_gige + channels_ioxos #+ channels_ks
channels = channels_nbs + channels_inten + channels_cam_pco + channels_cam_gige + channels_ioxos + channels_events + channels_ks
......
......@@ -22,65 +22,65 @@ N_UNDS.remove(N_UND_CHIC)
color1 = {
6: 3.2133440611047375,
7: 3.2133806668053135,
8: 3.2133806668053135,
9: 3.2133806668053135,
10: 3.2133806668053135,
11: 3.2133806668053135,
12: 3.201342229977879,
13: 3.189306875960779,
15: 1.7020000000000002,
16: 3.702,
17: 2.202,
18: 3.202,
19: 2.402,
20: 2.9966,
21: 2.8912,
22: 2.4858000000000002
6: 2.5782081923331286,
7: 2.5782000000000003,
8: 2.5782081923331286,
9: 2.5782000000000003,
10: 2.5782269928449404,
11: 2.5782457933506078,
12: 2.5735,
13: 2.568807163979898,
15: 3.1,
16: 1.8714000000000002,
17: 1.8,
18: 2.0,
19: 3.4000000000000004,
20: 2.3000000000000003,
21: 2.9000000000000004,
22: 1.6
}
color2 = {
6: 3.0528,
7: 3.4528000000000003,
8: 3.6528,
9: 2.8528000000000002,
10: 3.7,
11: 2.9528000000000003,
12: 2.7407,
13: 3.1286,
15: 2.702,
16: 2.702,
17: 2.702,
18: 2.702,
19: 2.702,
20: 2.702,
21: 2.700649,
22: 2.6992979999999998
6: 2.0782000000000003,
7: 3.0782000000000003,
8: 1.5782,
9: 3.1782000000000004,
10: 1.7782,
11: 3.2882000000000002,
12: 1.9635,
13: 1.2688000000000001,
15: 2.9713000000000003,
16: 2.971323113370471,
17: 2.97130268459635,
18: 2.9713128989831805,
19: 2.9713128989831805,
20: 2.9713000000000003,
21: 2.9713000000000003,
22: 2.9613
}
colors_both = {
6: 3.2133440611047375,
7: 3.2133806668053135,
8: 3.2133806668053135,
9: 3.2133806668053135,
10: 3.2133806668053135,
11: 3.2133806668053135,
12: 3.201342229977879,
13: 3.189306875960779,
15: 2.702,
16: 2.702,
17: 2.702,
18: 2.702,
19: 2.702,
20: 2.702,
21: 2.700649,
22: 2.6992979999999998
6: 2.5782081923331286,
7: 2.5782000000000003,
8: 2.5782081923331286,
9: 2.5782000000000003,
10: 2.5782269928449404,
11: 2.5782457933506078,
12: 2.5735,
13: 2.568807163979898,
15: 2.9713000000000003,
16: 2.971323113370471,
17: 2.97130268459635,
18: 2.9713128989831805,
19: 2.9713128989831805,
20: 2.9713000000000003,
21: 2.9713000000000003,
22: 2.9613
}
......
......@@ -88,7 +88,7 @@ class Undulators(Adjustable):
def change():
#TODO: replace by set_all_target_values_and_wait when print not needed anymore
tasks = []
tasks = {}
for (name, a), k_old, k_new in zip(self.adjs.items(), ks_current, ks_target):
delta = k_old - k_new
print(f"{name}: {k_old}\t->\t{k_new}\t({delta})")
......@@ -96,8 +96,14 @@ class Undulators(Adjustable):
print(f"{name} skipped since target K is nan")
continue
t = a.set_target_value(k_new, hold=False)
tasks.append(t)
wait_for_all(tasks)
tasks[name] = t
# wait_for_all(tasks)
for n, t in tasks.items():
print("waiting for ", n)
t.wait()
print("target reached ", n)
print("starting radial motors")
# make sure new K values have been written TODO: needed?
sleep(2) # check if this can be shortened back to 0.5
......@@ -156,7 +162,7 @@ class Undulators(Adjustable):
class Undulator(PVAdjustable):
def __init__(self, name, accuracy=0.0005):
def __init__(self, name, accuracy=0.1):
pvname_setvalue = name + ":K_SET"
pvname_readback = name + ":K_READ"
super().__init__(pvname_setvalue, pvname_readback=pvname_readback, accuracy=accuracy, active_move=True, name=name, internal=True)
......
from slic.devices.general.shutter import Shutter
from slic.utils.run_later import run_at, tomorrow
sh1 = Shutter("SATFE10-OPSH066")
sh2 = Shutter("SATOP21-OPSH138")
def close():
sh1.close()
sh2.close()
def klappezu():
run_at(tomorrow(7), close)
......@@ -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)
......
......@@ -1224,3 +1224,65 @@ def smooth_attenuator():
def fire():
cycle = PV("SATUN14-MBND100:CYCLE")
n_acqs = 30
n_pulses = 6000
# currents = [19.0, 20.6, 22.1, 23.5, 26.1, 27.3, 28.4, 29.5, 30.6, 31.6, 35.4, 38.9, 43.5, 50.0]
currents = [10.2, 19, 22, 25, 27.3, 29.5, 35.4, 43.5, 66.7, 50.3]
# for E in [660,640]:
# print("energy:", E)
# t = und1.set(E)
# cycle.put(1, wait=True)
# sleep(250)
# t.wait()
for I in currents:
print("current:", I)
chic_delay.set(I).wait()
for i in range(n_acqs):
print("rep:", i)
fname = f"overnight3_{I}A"
daq.acquire(fname, n_pulses=n_pulses*2).wait()
def fire2():
#cycle = PV("SATUN14-MBND100:CYCLE")
n_acqs = 30
n_pulses = 6000
# currents = [19.0, 20.6, 22.1, 23.5, 26.1, 27.3, 28.4, 29.5, 30.6, 31.6, 35.4, 38.9, 43.5, 50.0]
currents = [22, 25, 27.3, 29.5, 35.4, 43.5, 50.3, 66.7]
for E in [640]:
print("energy:", E)
t = und1.set(E)
#cycle.put(1, wait=True)
#sleep(250)
#t.wait()
for I in currents:
print("current:", I)
chic_delay.set(I).wait()
for i in range(n_acqs):
print("rep:", i)
fname = f"overnight2_{E}eV_{I}A"
daq.acquire(fname, n_pulses=n_pulses*2).wait()