more overnight
This commit is contained in:
942
overnight.py
942
overnight.py
@ -1012,116 +1012,116 @@ from slic.devices.general.motor import Motor
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
def TTmeasurements(daq, numIterations, nBackground, nMeas):
|
# def TTmeasurements(daq, numIterations, nBackground, nMeas):
|
||||||
#increment run number
|
# #increment run number
|
||||||
print(daq.pgroup)
|
# print(daq.pgroup)
|
||||||
repratefactor = 10 #check reprate of machine
|
# repratefactor = 10 #check reprate of machine
|
||||||
|
|
||||||
shutter266 = PV('SLAAT21-LDIO-LAS6291:SET_BO01')
|
# shutter266 = PV('SLAAT21-LDIO-LAS6291:SET_BO01')
|
||||||
exp_delay = Motor("SLAAT21-LMOT-M704:MOT", name="Laser Exp delay")
|
# exp_delay = Motor("SLAAT21-LMOT-M704:MOT", name="Laser Exp delay")
|
||||||
|
|
||||||
dsStart = exp_delay.get()
|
# dsStart = exp_delay.get()
|
||||||
|
|
||||||
### take background Time tool:
|
# ### take background Time tool:
|
||||||
for i in range(0,numIterations):
|
# for i in range(0,numIterations):
|
||||||
|
|
||||||
# #close shutter
|
# # #close shutter
|
||||||
# shutter266.put(1)
|
# # shutter266.put(1)
|
||||||
# ### Take data
|
# # ### Take data
|
||||||
# #timestamp = datetime.today().strftime("%d_%m_%H_%M")
|
# # #timestamp = datetime.today().strftime("%d_%m_%H_%M")
|
||||||
# fname = f"TimeToolBackground_{i}"
|
# # fname = f"TimeToolBackground_{i}"
|
||||||
# daq.acquire(fname, n_pulses=nBackground * repratefactor)
|
# # daq.acquire(fname, n_pulses=nBackground * repratefactor)
|
||||||
# #Open shutter
|
# # #Open shutter
|
||||||
# shutter266.put(0)
|
# # shutter266.put(0)
|
||||||
|
|
||||||
|
|
||||||
### take spectrometer bacground Time tool:
|
# ### take spectrometer bacground Time tool:
|
||||||
#while shutters open
|
# #while shutters open
|
||||||
#move away from T0
|
# #move away from T0
|
||||||
exp_delay.set(dsStart-1)
|
# exp_delay.set(dsStart-1)
|
||||||
sleep(3)
|
# sleep(3)
|
||||||
### Take data
|
# ### Take data
|
||||||
#timestamp = datetime.today().strftime("%d_%m_%H_%M")
|
# #timestamp = datetime.today().strftime("%d_%m_%H_%M")
|
||||||
fname = f"SpectrometerBackground_{i}"
|
# fname = f"SpectrometerBackground_{i}"
|
||||||
daq.acquire(fname, n_pulses=nBackground * repratefactor)
|
# daq.acquire(fname, n_pulses=nBackground * repratefactor)
|
||||||
#move back to T0
|
# #move back to T0
|
||||||
exp_delay.set(dsStart)
|
# exp_delay.set(dsStart)
|
||||||
sleep(3)
|
# sleep(3)
|
||||||
### measure:
|
# ### measure:
|
||||||
|
|
||||||
#timestamp = datetime.today().strftime("%d_%m_%H_%M")
|
# #timestamp = datetime.today().strftime("%d_%m_%H_%M")
|
||||||
fname = f"Measurement_{i}"
|
# fname = f"Measurement_{i}"
|
||||||
daq.acquire(fname, n_pulses=nMeas * repratefactor)
|
# daq.acquire(fname, n_pulses=nMeas * repratefactor)
|
||||||
|
|
||||||
# n_pulses=nMeas * repratefactor
|
# n_pulses=nMeas * repratefactor
|
||||||
# scan.scan1D(exp_delay, start, stop, step, n_pulses, fname, return_to_initial_values=True)
|
# scan.scan1D(exp_delay, start, stop, step, n_pulses, fname, return_to_initial_values=True)
|
||||||
|
|
||||||
|
|
||||||
def TTmeasurementsScan(daq, scan, sStage, numIterations, nBackground, nMeas, start, stop, step):
|
# def TTmeasurementsScan(daq, scan, sStage, numIterations, nBackground, nMeas, start, stop, step):
|
||||||
#increment run number
|
# #increment run number
|
||||||
print(daq.pgroup)
|
# print(daq.pgroup)
|
||||||
repratefactor = 10 #check reprate of machine
|
# repratefactor = 10 #check reprate of machine
|
||||||
print(sStage.name)
|
# print(sStage.name)
|
||||||
print(sStage.get())
|
# print(sStage.get())
|
||||||
|
|
||||||
shutter266 = PV('SLAAT21-LDIO-LAS6291:SET_BO01')
|
# shutter266 = PV('SLAAT21-LDIO-LAS6291:SET_BO01')
|
||||||
# delayStage = PV('SLAAT21-LMOT-M704:MOT.VAL')
|
# # delayStage = PV('SLAAT21-LMOT-M704:MOT.VAL')
|
||||||
delay = Motor("SLAAT21-LMOT-M704:MOT", name="Laser Exp delay")
|
# delay = Motor("SLAAT21-LMOT-M704:MOT", name="Laser Exp delay")
|
||||||
|
|
||||||
dsStart = delay.get()
|
# dsStart = delay.get()
|
||||||
|
|
||||||
### take background Time tool:
|
# ### take background Time tool:
|
||||||
for i in range(0,numIterations):
|
# for i in range(0,numIterations):
|
||||||
|
|
||||||
# #close shutter
|
# # #close shutter
|
||||||
# shutter266.put(1)
|
# # shutter266.put(1)
|
||||||
# ### Take data
|
# # ### Take data
|
||||||
# #timestamp = datetime.today().strftime("%d_%m_%H_%M")
|
# # #timestamp = datetime.today().strftime("%d_%m_%H_%M")
|
||||||
# fname = f"TimeToolBackground_{i}"
|
# # fname = f"TimeToolBackground_{i}"
|
||||||
# daq.acquire(fname, n_pulses=nBackground * repratefactor)
|
# # daq.acquire(fname, n_pulses=nBackground * repratefactor)
|
||||||
# #Open shutter
|
# # #Open shutter
|
||||||
# shutter266.put(0)
|
# # shutter266.put(0)
|
||||||
|
|
||||||
|
|
||||||
### take spectrometer bacground Time tool:
|
# ### take spectrometer bacground Time tool:
|
||||||
#while shutters open
|
# #while shutters open
|
||||||
#move away from T0
|
# #move away from T0
|
||||||
delay.set(dsStart-1)
|
# delay.set(dsStart-1)
|
||||||
sleep(3)
|
# sleep(3)
|
||||||
### Take data
|
# ### Take data
|
||||||
#timestamp = datetime.today().strftime("%d_%m_%H_%M")
|
# #timestamp = datetime.today().strftime("%d_%m_%H_%M")
|
||||||
fname = f"SpectrometerBackground_{i}"
|
# fname = f"SpectrometerBackground_{i}"
|
||||||
daq.acquire(fname, n_pulses=nBackground * repratefactor)
|
# daq.acquire(fname, n_pulses=nBackground * repratefactor)
|
||||||
#move back to T0
|
# #move back to T0
|
||||||
delay.set(dsStart)
|
# delay.set(dsStart)
|
||||||
sleep(3)
|
# sleep(3)
|
||||||
|
|
||||||
### measure:
|
# ### measure:
|
||||||
|
|
||||||
#timestamp = datetime.today().strftime("%d_%m_%H_%M")
|
# #timestamp = datetime.today().strftime("%d_%m_%H_%M")
|
||||||
fname = f"Measurement_{i}"
|
# fname = f"Measurement_{i}"
|
||||||
# daq.acquire(fname, n_pulses=nMeas * repratefactor)
|
# # daq.acquire(fname, n_pulses=nMeas * repratefactor)
|
||||||
|
|
||||||
n_pulses=nMeas * repratefactor
|
# n_pulses=nMeas * repratefactor
|
||||||
|
|
||||||
print(sStage.get())
|
# print(sStage.get())
|
||||||
scan.scan1D(sStage, start, stop, step, n_pulses, fname, return_to_initial_values=True, relative=True)
|
# scan.scan1D(sStage, start, stop, step, n_pulses, fname, return_to_initial_values=True, relative=True)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
from tqdm import trange
|
# from tqdm import trange
|
||||||
|
|
||||||
def focus_test(daq):
|
# def focus_test(daq):
|
||||||
daq.pgroup = "p19743"
|
# daq.pgroup = "p19743"
|
||||||
# daq.pgroup = "p19509"
|
# # daq.pgroup = "p19509"
|
||||||
i = 1
|
# i = 1
|
||||||
while True:
|
# while True:
|
||||||
i += 1
|
# i += 1
|
||||||
name = f"focus_test2_{i}"
|
# name = f"focus_test2_{i}"
|
||||||
daq.acquire(name, n_pulses=1000)
|
# daq.acquire(name, n_pulses=1000)
|
||||||
print("sleep")
|
# print("sleep")
|
||||||
for _ in trange(900):
|
# for _ in trange(900):
|
||||||
sleep(1)
|
# sleep(1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1151,131 +1151,271 @@ def focus_test(daq):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
from devices.simone import Magnet, Frequency
|
# from devices.simone import Magnet, Frequency
|
||||||
|
|
||||||
|
# from itertools import count
|
||||||
|
# from time import sleep
|
||||||
|
|
||||||
|
# magnet = Magnet()
|
||||||
|
# freq = Frequency()
|
||||||
|
# shutter = Shutter("SATOP21-OPSH138")
|
||||||
|
|
||||||
|
# def overnight():
|
||||||
|
|
||||||
|
# pos_ref = -0.30145 #-0.857
|
||||||
|
# pos_sig = -0.9516
|
||||||
|
|
||||||
|
# for ii in range(1,4):
|
||||||
|
|
||||||
|
# freq.set(ii)
|
||||||
|
|
||||||
|
# frequency = 6.2832+0.1428*ii #6.2832 #GHz
|
||||||
|
|
||||||
|
# delays1 = [ 0, 5/8, 1/8, 7/8]
|
||||||
|
# delays2 = [3/8, 2/8, 6/8, 4/8]
|
||||||
|
|
||||||
|
# n_pulses = 1000
|
||||||
|
# Emin, Emax, Edelta = 708, 720, 2
|
||||||
|
|
||||||
|
# for i in range(12):
|
||||||
|
# #for i in count():
|
||||||
|
# shutter.close()
|
||||||
|
# mot3_x.set(pos_ref)
|
||||||
|
# sleep(1)
|
||||||
|
# shutter.open()
|
||||||
|
# sleep(1)
|
||||||
|
|
||||||
|
# magnet.set(0)
|
||||||
|
# print("delay:", magnet)
|
||||||
|
# scan.scan1D(und, Emin, Emax, Edelta, n_pulses, f"evening02_ref_{frequency}_{i:04}", return_to_initial_values=False)
|
||||||
|
|
||||||
|
# shutter.close()
|
||||||
|
# mot3_x.set(pos_sig)
|
||||||
|
# sleep(1)
|
||||||
|
# shutter.open()
|
||||||
|
|
||||||
|
# for delay in delays1:
|
||||||
|
# magnet.set(delay/frequency*1000)
|
||||||
|
# print("delay:", magnet)
|
||||||
|
# scan.scan1D(und, Emin, Emax, Edelta, n_pulses, f"evening02_sig_{frequency}_{i:04}_{delay}", return_to_initial_values=False)
|
||||||
|
# delays1, delays2 = delays2, delays1
|
||||||
|
|
||||||
|
# #shutter.open()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# def smooth_attenuator():
|
||||||
|
# photon_energies = [525, 600]
|
||||||
|
# iterations = range(24)
|
||||||
|
|
||||||
|
# for p in photon_energies:
|
||||||
|
# und.set(p).wait()
|
||||||
|
# und.set(p).wait()
|
||||||
|
# for i in iterations:
|
||||||
|
# name = f"n2o_{p}eV_{i:02}"
|
||||||
|
# print(name)
|
||||||
|
# daq.acquire(name, n_pulses=60000)
|
||||||
|
|
||||||
|
# print("close shutter")
|
||||||
|
# shutter.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 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()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def XPS_overnight(daq):
|
||||||
|
currents = [
|
||||||
|
1.72090994e-04, 1.19335371e+01, 1.68765438e+01, 2.06694283e+01,
|
||||||
|
2.38669628e+01, 2.66840341e+01, 2.92308494e+01, 3.15728768e+01,
|
||||||
|
3.37527725e+01, 3.58001658e+01, 3.77366295e+01, 3.95784494e+01,
|
||||||
|
4.13382779e+01, 4.30261768e+01, 4.46503044e+01, 4.62173840e+01,
|
||||||
|
4.77330347e+01, 4.92020095e+01, 5.06283713e+01, 5.20156260e+01,
|
||||||
|
5.33668232e+01, 5.46846359e+01, 5.59714223e+01, 5.72292751e+01,
|
||||||
|
5.84600621e+01, 5.96654582e+01, 6.08469725e+01, 6.20059702e+01,
|
||||||
|
6.31436911e+01, 6.42612654e+01, 6.53597265e+01, 6.64400224e+01,
|
||||||
|
6.75030253e+01, 6.85495396e+01, 6.95803094e+01, 7.05960243e+01,
|
||||||
|
7.15973250e+01, 7.25848080e+01, 7.35590300e+01, 7.45205108e+01,
|
||||||
|
7.54697376e+01, 7.64071670e+01, 7.73332280e+01, 7.82483243e+01,
|
||||||
|
7.91528361e+01, 8.00471224e+01, 8.09315219e+01, 8.18063555e+01,
|
||||||
|
8.26719268e+01, 8.35285237e+01, 8.43764195e+01
|
||||||
|
]
|
||||||
|
|
||||||
|
# shutter1 = PV("SATFE10-OPSH066:REQUEST")
|
||||||
|
# shutter2 = PV("SATOP21-OPSH138:REQUEST")
|
||||||
|
cycle = PV("SATUN14-MBND100:CYCLE")
|
||||||
|
chic_delay = PV("SATUN14-MBND100:I-SET")
|
||||||
|
# print('cycle')
|
||||||
|
# end_time = datetime(2021, 11, 22, 8)
|
||||||
|
|
||||||
|
for i in range(30):
|
||||||
|
# now = datetime.now()
|
||||||
|
# if now > end_time:
|
||||||
|
# break
|
||||||
|
|
||||||
|
cycle.put(1, wait=True)
|
||||||
|
sleep(250)
|
||||||
|
|
||||||
|
for s,I in enumerate(currents):
|
||||||
|
chic_delay.put(I)
|
||||||
|
sleep(2)
|
||||||
|
fname = f"test_Glycine_{i:04}_{s}_steps_current"
|
||||||
|
print(fname)
|
||||||
|
daq.acquire(fname, n_pulses=1000 * 5).wait()
|
||||||
|
|
||||||
|
|
||||||
|
# print("close shutter")
|
||||||
|
# shutter1.put(0)
|
||||||
|
# shutter2.put(0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
from itertools import count
|
|
||||||
from time import sleep
|
|
||||||
|
|
||||||
magnet = Magnet()
|
|
||||||
freq = Frequency()
|
|
||||||
shutter = Shutter("SATOP21-OPSH138")
|
|
||||||
|
|
||||||
def overnight():
|
def overnight():
|
||||||
|
currents = [
|
||||||
|
5,
|
||||||
|
11.9335371,
|
||||||
|
16.8765438,
|
||||||
|
20.6694283,
|
||||||
|
23.8669628,
|
||||||
|
26.6840341,
|
||||||
|
29.2308494,
|
||||||
|
31.5728768,
|
||||||
|
33.7527725,
|
||||||
|
35.8001658,
|
||||||
|
37.7366295,
|
||||||
|
39.5784494,
|
||||||
|
41.3382779,
|
||||||
|
43.0261768,
|
||||||
|
44.6503044,
|
||||||
|
46.217384,
|
||||||
|
47.7330347,
|
||||||
|
49.2020095,
|
||||||
|
50.6283713,
|
||||||
|
52.015626,
|
||||||
|
55.97142227,
|
||||||
|
56.63693345,
|
||||||
|
57.29471271,
|
||||||
|
57.94502337,
|
||||||
|
58.58811413,
|
||||||
|
59.22422017,
|
||||||
|
59.8535642,
|
||||||
|
60.47635732,
|
||||||
|
61.09279988,
|
||||||
|
61.7030822,
|
||||||
|
62.30738531,
|
||||||
|
62.90588152,
|
||||||
|
63.49873503,
|
||||||
|
64.08610243,
|
||||||
|
|
||||||
pos_ref = -0.30145 #-0.857
|
53.5,
|
||||||
pos_sig = -0.9516
|
54.8,
|
||||||
|
|
||||||
for ii in range(1,4):
|
64.66813322,
|
||||||
|
65.24497022,
|
||||||
|
65.81674998,
|
||||||
|
66.38360318,
|
||||||
|
66.94565497,
|
||||||
|
67.50302528,
|
||||||
|
71.5,
|
||||||
|
75.8,
|
||||||
|
80,
|
||||||
|
84,
|
||||||
|
87.6
|
||||||
|
]
|
||||||
|
|
||||||
freq.set(ii)
|
n_repeats = 2
|
||||||
|
currents = sorted(sorted(set(currents)) * n_repeats)
|
||||||
|
|
||||||
frequency = 6.2832+0.1428*ii #6.2832 #GHz
|
energies1 = (694, 725)
|
||||||
|
energy2 = 399
|
||||||
|
|
||||||
delays1 = [ 0, 5/8, 1/8, 7/8]
|
und2.set(energy2).wait()
|
||||||
delays2 = [3/8, 2/8, 6/8, 4/8]
|
|
||||||
|
|
||||||
n_pulses = 1000
|
for i in range(5):
|
||||||
Emin, Emax, Edelta = 708, 720, 2
|
|
||||||
|
|
||||||
for i in range(12):
|
|
||||||
#for i in count():
|
|
||||||
shutter.close()
|
|
||||||
mot3_x.set(pos_ref)
|
|
||||||
sleep(1)
|
|
||||||
shutter.open()
|
|
||||||
sleep(1)
|
|
||||||
|
|
||||||
magnet.set(0)
|
|
||||||
print("delay:", magnet)
|
|
||||||
scan.scan1D(und, Emin, Emax, Edelta, n_pulses, f"evening02_ref_{frequency}_{i:04}", return_to_initial_values=False)
|
|
||||||
|
|
||||||
shutter.close()
|
|
||||||
mot3_x.set(pos_sig)
|
|
||||||
sleep(1)
|
|
||||||
shutter.open()
|
|
||||||
|
|
||||||
for delay in delays1:
|
|
||||||
magnet.set(delay/frequency*1000)
|
|
||||||
print("delay:", magnet)
|
|
||||||
scan.scan1D(und, Emin, Emax, Edelta, n_pulses, f"evening02_sig_{frequency}_{i:04}_{delay}", return_to_initial_values=False)
|
|
||||||
delays1, delays2 = delays2, delays1
|
|
||||||
|
|
||||||
#shutter.open()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def smooth_attenuator():
|
|
||||||
photon_energies = [525, 600]
|
|
||||||
iterations = range(24)
|
|
||||||
|
|
||||||
for p in photon_energies:
|
|
||||||
und.set(p).wait()
|
|
||||||
und.set(p).wait()
|
|
||||||
for i in iterations:
|
|
||||||
name = f"n2o_{p}eV_{i:02}"
|
|
||||||
print(name)
|
|
||||||
daq.acquire(name, n_pulses=60000)
|
|
||||||
|
|
||||||
print("close shutter")
|
|
||||||
shutter.close()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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:
|
for I in currents:
|
||||||
print("current:", I)
|
|
||||||
chic_delay.set(I).wait()
|
chic_delay.set(I).wait()
|
||||||
|
|
||||||
for i in range(n_acqs):
|
for energy1 in energies1:
|
||||||
print("rep:", i)
|
und1.set(energy1).wait()
|
||||||
fname = f"overnight2_{E}eV_{I}A"
|
|
||||||
daq.acquire(fname, n_pulses=n_pulses*2).wait()
|
fname = f"overnight02s_{i:02}_{energy1}eV_{energy2}eV_{I}A"
|
||||||
|
print(fname)
|
||||||
|
|
||||||
|
while check_intensity.wants_repeat():
|
||||||
|
daq.acquire(fname, n_pulses=5000).wait()
|
||||||
|
|
||||||
|
cycle_magnet().wait()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1286,3 +1426,415 @@ def fire2():
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def overnight():
|
||||||
|
currents = [
|
||||||
|
5.0,
|
||||||
|
11.9335371,
|
||||||
|
16.8765438,
|
||||||
|
20.6694283,
|
||||||
|
23.8669628,
|
||||||
|
26.6840341,
|
||||||
|
29.2308494,
|
||||||
|
31.5728768,
|
||||||
|
33.7527725,
|
||||||
|
35.8001658,
|
||||||
|
37.7366295,
|
||||||
|
39.5784494,
|
||||||
|
41.3382779,
|
||||||
|
43.0261768,
|
||||||
|
44.6503044,
|
||||||
|
46.217384,
|
||||||
|
47.7330347,
|
||||||
|
49.2020095,
|
||||||
|
50.6283713,
|
||||||
|
52.015626,
|
||||||
|
53.5,
|
||||||
|
54.8,
|
||||||
|
55.97142227,
|
||||||
|
56.63693345,
|
||||||
|
57.29471271,
|
||||||
|
57.94502337,
|
||||||
|
58.58811413,
|
||||||
|
59.22422017,
|
||||||
|
59.8535642,
|
||||||
|
60.47635732,
|
||||||
|
61.09279988,
|
||||||
|
61.7030822,
|
||||||
|
62.30738531,
|
||||||
|
62.90588152,
|
||||||
|
63.49873503,
|
||||||
|
64.08610243,
|
||||||
|
64.66813322,
|
||||||
|
65.24497022,
|
||||||
|
65.81674998,
|
||||||
|
66.38360318,
|
||||||
|
66.94565497,
|
||||||
|
67.50302528,
|
||||||
|
71.5,
|
||||||
|
75.8,
|
||||||
|
80.0,
|
||||||
|
84.0,
|
||||||
|
87.6
|
||||||
|
]
|
||||||
|
|
||||||
|
n_repeats = 2
|
||||||
|
currents = sorted(sorted(set(currents)) * n_repeats)
|
||||||
|
|
||||||
|
energy1 = 720
|
||||||
|
energy2 = 399
|
||||||
|
|
||||||
|
# und1.set(energy1).wait()
|
||||||
|
# und2.set(energy2).wait()
|
||||||
|
|
||||||
|
for i in range(100):
|
||||||
|
|
||||||
|
for I in currents:
|
||||||
|
chic_delay.set(I).wait()
|
||||||
|
|
||||||
|
printable_I = str(round(I, 1)).replace(".", "_")
|
||||||
|
|
||||||
|
fname = f"overnight03_{i:02}_{energy1}eV_{energy2}eV_{printable_I}A"
|
||||||
|
print(fname)
|
||||||
|
|
||||||
|
while check_intensity.wants_repeat():
|
||||||
|
daq.acquire(fname, n_pulses=5000).wait()
|
||||||
|
|
||||||
|
cycle_magnet().wait()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def overnight():
|
||||||
|
currents = [
|
||||||
|
5.0,
|
||||||
|
11.9335371,
|
||||||
|
16.8765438,
|
||||||
|
20.6694283,
|
||||||
|
23.8669628,
|
||||||
|
26.6840341,
|
||||||
|
29.2308494,
|
||||||
|
31.5728768,
|
||||||
|
33.7527725,
|
||||||
|
35.8001658,
|
||||||
|
37.7366295,
|
||||||
|
39.5784494,
|
||||||
|
41.3382779,
|
||||||
|
43.0261768,
|
||||||
|
44.6503044,
|
||||||
|
46.217384,
|
||||||
|
47.7330347,
|
||||||
|
49.2020095,
|
||||||
|
50.6283713,
|
||||||
|
52.015626,
|
||||||
|
53.5,
|
||||||
|
54.8,
|
||||||
|
55.97142227,
|
||||||
|
56.63693345,
|
||||||
|
57.29471271,
|
||||||
|
57.94502337,
|
||||||
|
58.58811413,
|
||||||
|
59.22422017,
|
||||||
|
59.8535642,
|
||||||
|
60.47635732,
|
||||||
|
61.09279988,
|
||||||
|
61.7030822,
|
||||||
|
62.30738531,
|
||||||
|
62.90588152,
|
||||||
|
63.49873503,
|
||||||
|
64.08610243,
|
||||||
|
64.66813322,
|
||||||
|
65.24497022,
|
||||||
|
65.81674998,
|
||||||
|
66.38360318,
|
||||||
|
66.94565497,
|
||||||
|
67.50302528,
|
||||||
|
71.5,
|
||||||
|
75.8,
|
||||||
|
80.0,
|
||||||
|
84.0,
|
||||||
|
87.6
|
||||||
|
]
|
||||||
|
|
||||||
|
n_repeats = 4
|
||||||
|
currents = sorted(sorted(set(currents)) * n_repeats)
|
||||||
|
|
||||||
|
energy1 = 694
|
||||||
|
energy2 = 400
|
||||||
|
|
||||||
|
# und1.set(energy1).wait()
|
||||||
|
# und2.set(energy2).wait()
|
||||||
|
|
||||||
|
for i in range(100):
|
||||||
|
|
||||||
|
for I in currents:
|
||||||
|
chic_delay.set(I).wait()
|
||||||
|
|
||||||
|
printable_I = str(round(I, 1)).replace(".", "_")
|
||||||
|
|
||||||
|
fname = f"overnight04_{i:02}_{energy1}eV_{energy2}eV_{printable_I}A"
|
||||||
|
print(fname)
|
||||||
|
|
||||||
|
while check_intensity.wants_repeat():
|
||||||
|
daq.acquire(fname, n_pulses=5000).wait()
|
||||||
|
|
||||||
|
cycle_magnet().wait()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def overnight():
|
||||||
|
currents = [
|
||||||
|
5.0,
|
||||||
|
11.9335371,
|
||||||
|
16.8765438,
|
||||||
|
20.6694283,
|
||||||
|
23.8669628,
|
||||||
|
26.6840341,
|
||||||
|
29.2308494,
|
||||||
|
31.5728768,
|
||||||
|
33.7527725,
|
||||||
|
35.8001658,
|
||||||
|
37.7366295,
|
||||||
|
39.5784494,
|
||||||
|
41.3382779,
|
||||||
|
43.0261768,
|
||||||
|
44.6503044,
|
||||||
|
46.217384,
|
||||||
|
47.7330347,
|
||||||
|
49.2020095,
|
||||||
|
50.6283713,
|
||||||
|
52.015626,
|
||||||
|
53.5,
|
||||||
|
54.8,
|
||||||
|
55.97142227,
|
||||||
|
56.63693345,
|
||||||
|
57.29471271,
|
||||||
|
57.94502337,
|
||||||
|
58.58811413,
|
||||||
|
59.22422017,
|
||||||
|
59.8535642,
|
||||||
|
60.47635732,
|
||||||
|
61.09279988,
|
||||||
|
61.7030822,
|
||||||
|
62.30738531,
|
||||||
|
62.90588152,
|
||||||
|
63.49873503,
|
||||||
|
64.08610243,
|
||||||
|
64.66813322,
|
||||||
|
65.24497022,
|
||||||
|
65.81674998,
|
||||||
|
66.38360318,
|
||||||
|
66.94565497,
|
||||||
|
67.50302528,
|
||||||
|
71.5,
|
||||||
|
75.8,
|
||||||
|
80.0,
|
||||||
|
84.0,
|
||||||
|
87.6
|
||||||
|
]
|
||||||
|
|
||||||
|
n_repeats = 4
|
||||||
|
currents = sorted(sorted(set(currents)) * n_repeats)
|
||||||
|
|
||||||
|
energy1 = 694
|
||||||
|
energy2 = 802
|
||||||
|
|
||||||
|
# und1.set(energy1).wait()
|
||||||
|
# und2.set(energy2).wait()
|
||||||
|
|
||||||
|
for i in range(100):
|
||||||
|
|
||||||
|
for I in currents:
|
||||||
|
chic_delay.set(I).wait()
|
||||||
|
|
||||||
|
printable_I = str(round(I, 1)).replace(".", "_")
|
||||||
|
|
||||||
|
fname = f"overnight05_{i:02}_{energy1}eV_{energy2}eV_{printable_I}A"
|
||||||
|
print(fname)
|
||||||
|
|
||||||
|
while check_intensity.wants_repeat():
|
||||||
|
daq.acquire(fname, n_pulses=5000).wait()
|
||||||
|
|
||||||
|
cycle_magnet().wait()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def overnight():
|
||||||
|
currents = [
|
||||||
|
12.215845980560607,
|
||||||
|
15.116978121263239,
|
||||||
|
17.54476888886744,
|
||||||
|
19.67522697511649,
|
||||||
|
21.5965263643961,
|
||||||
|
23.360331736727083,
|
||||||
|
25.000000000559517,
|
||||||
|
26.53855034731866,
|
||||||
|
27.99266086653778,
|
||||||
|
29.374874017571226,
|
||||||
|
30.694904105845765,
|
||||||
|
31.960456910631603,
|
||||||
|
33.1777670602658,
|
||||||
|
34.351963577900015,
|
||||||
|
35.487326322776916,
|
||||||
|
36.58747068012243,
|
||||||
|
37.65548360246898,
|
||||||
|
38.69402580811058,
|
||||||
|
39.705409889744644,
|
||||||
|
40.69166092840929,
|
||||||
|
41.65456418047311,
|
||||||
|
42.59570305039474,
|
||||||
|
43.51648966798437,
|
||||||
|
43.51648966798437,
|
||||||
|
45.30194303090119,
|
||||||
|
47.01963659081147,
|
||||||
|
48.67674415296662,
|
||||||
|
50.27925646763386,
|
||||||
|
51.83223759394742,
|
||||||
|
53.340013971321795,
|
||||||
|
54.80631661030178,
|
||||||
|
56.23438986738845,
|
||||||
|
57.627075933030426,
|
||||||
|
58.98688134605165,
|
||||||
|
60.316029997839784,
|
||||||
|
61.61650584043036,
|
||||||
|
62.89008763501911,
|
||||||
|
64.13837748961751,
|
||||||
|
65.36282448583248,
|
||||||
|
66.56474439250431,
|
||||||
|
67.74533622946402
|
||||||
|
]
|
||||||
|
|
||||||
|
n_repeats = 4
|
||||||
|
currents = sorted(sorted(set(currents)) * n_repeats)
|
||||||
|
|
||||||
|
energy1 = 693
|
||||||
|
energy2 = 770
|
||||||
|
|
||||||
|
# und1.set(energy1).wait()
|
||||||
|
# und2.set(energy2).wait()
|
||||||
|
|
||||||
|
for i in range(100):
|
||||||
|
|
||||||
|
for I in currents:
|
||||||
|
chic_delay.set(I).wait()
|
||||||
|
|
||||||
|
printable_I = str(round(I, 1)).replace(".", "_")
|
||||||
|
|
||||||
|
fname = f"overnight07_{i:02}_{energy1}eV_{energy2}eV_{printable_I}A"
|
||||||
|
print(fname)
|
||||||
|
|
||||||
|
while check_intensity.wants_repeat():
|
||||||
|
daq.acquire(fname, n_pulses=5000).wait()
|
||||||
|
|
||||||
|
cycle_magnet().wait()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def overnight():
|
||||||
|
currents = [
|
||||||
|
12.215845980560607,
|
||||||
|
15.116978121263239,
|
||||||
|
17.54476888886744,
|
||||||
|
19.67522697511649,
|
||||||
|
21.5965263643961,
|
||||||
|
23.360331736727083,
|
||||||
|
25.000000000559517,
|
||||||
|
26.53855034731866,
|
||||||
|
27.99266086653778,
|
||||||
|
29.374874017571226,
|
||||||
|
30.694904105845765,
|
||||||
|
31.960456910631603,
|
||||||
|
33.1777670602658,
|
||||||
|
34.351963577900015,
|
||||||
|
35.487326322776916,
|
||||||
|
36.58747068012243,
|
||||||
|
37.65548360246898,
|
||||||
|
38.69402580811058,
|
||||||
|
39.705409889744644,
|
||||||
|
40.69166092840929,
|
||||||
|
41.65456418047311,
|
||||||
|
42.59570305039474,
|
||||||
|
43.51648966798437,
|
||||||
|
43.51648966798437,
|
||||||
|
45.30194303090119,
|
||||||
|
47.01963659081147,
|
||||||
|
48.67674415296662,
|
||||||
|
50.27925646763386,
|
||||||
|
51.83223759394742,
|
||||||
|
53.340013971321795,
|
||||||
|
54.80631661030178,
|
||||||
|
56.23438986738845,
|
||||||
|
57.627075933030426,
|
||||||
|
58.98688134605165,
|
||||||
|
60.316029997839784,
|
||||||
|
61.61650584043036,
|
||||||
|
62.89008763501911,
|
||||||
|
64.13837748961751,
|
||||||
|
65.36282448583248,
|
||||||
|
66.56474439250431,
|
||||||
|
67.74533622946402
|
||||||
|
]
|
||||||
|
|
||||||
|
n_repeats = 4
|
||||||
|
currents = sorted(sorted(set(currents)) * n_repeats)
|
||||||
|
|
||||||
|
energy1 = 693
|
||||||
|
energy2 = 800
|
||||||
|
|
||||||
|
# und1.set(energy1).wait()
|
||||||
|
# und2.set(energy2).wait()
|
||||||
|
|
||||||
|
for i in range(4):
|
||||||
|
|
||||||
|
for I in currents:
|
||||||
|
chic_delay.set(I).wait()
|
||||||
|
|
||||||
|
printable_I = str(round(I, 1)).replace(".", "_")
|
||||||
|
|
||||||
|
fname = f"overnight08_{i:02}_{energy1}eV_{energy2}eV_{printable_I}A"
|
||||||
|
print(fname)
|
||||||
|
|
||||||
|
while check_intensity.wants_repeat():
|
||||||
|
daq.acquire(fname, n_pulses=5000).wait()
|
||||||
|
|
||||||
|
cycle_magnet().wait()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user