Files
x11ma/script/beamline_alignment/15_Energy_scan.py
2025-12-17 09:49:26 +01:00

34 lines
878 B
Python

#class PseudoPositioner(Writable):
# def write(self,pos):
# sleep(3.0)
# print "Step = " + str(pos)
# caput
#
#positioner=PseudoPositioner()
#
def scan_energy(scan_energy_values, sensors):
# 1 Set scan parameters
emin = scan_energy_values[0]
emax = scan_energy_values[1]
esteps = scan_energy_values[2]
latency = scan_energy_values[3]
for s in scan_energy_values:
print(s)
for sen in sensors:
print(sen)
started = time.strftime("%H:%M:%S", time.localtime())
lscan(BML_energy_set, sensors, emin, emax, esteps, latency)
#This is working: lscan (BML_energy, SR_current, 780.0, 800.0, 1.0)
json_path = get_exec_pars().path
bml_save_scan_settings_json(json_path)
stopped = time.strftime("%H:%M:%S", time.localtime())
print("started: " + started)
print("stopped: " + stopped)