more overnight

This commit is contained in:
2021-09-15 18:12:46 +02:00
parent 92be120d35
commit ec4dbcc09c

View File

@ -336,3 +336,64 @@ from time import sleep
#from epics import PV
#from time import sleep
#from datetime import datetime
#end_time = datetime(2021, 9, 3, 8, 0, 0, 0)
#def overnight():
# shutter = PV("SATOP21-OPSH138:REQUEST")
#
# print("open shutter")
# shutter.put(1)
# sleep(3)
#
# base = "TT_nitrogen_overnight2"
#
# x0 = -14.55
# start = x0 - 0.2
# stop = x0 + 0.2
# step = 0.01
#
# n_pulses = 40 * 100
#
# for i in range(1000):
# if datetime.now() > end_time:
# break
#
# print(i, "sig")
# scan.scan1D(exp_delay, start, stop, step, n_pulses, f"{base}_sig_{i:04}", return_to_initial_values=True)
#
# print("close shutter")
# shutter.put(0)
# sleep(3)
#
# print(i, "bkg")
# daq.acquire(f"{base}_bkg_{i:04}", n_pulses=n_pulses)
#
# print("open shutter")
# shutter.put(1)
# sleep(3)
#
#
# shutter2 = PV("SATFE10-OPSH066:REQUEST")
#
# print("close both shutters")
# shutter.put(0)
# shutter2.put(0)
# sleep(3)