From 7a49b276fdf74e912052a926df0ef80973923f75 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Tue, 28 Jan 2025 18:13:30 +0100 Subject: [PATCH] added holo scans --- overnight.py | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/overnight.py b/overnight.py index b47ec8c..1fd176d 100644 --- a/overnight.py +++ b/overnight.py @@ -1832,6 +1832,92 @@ def overnight(): cycle_magnet().wait() +#def holo_scan(): + +# energies = [ +# 528.5, +# 529.2, +# 529.7, +# 530.2, +# 531.0, +# ] + +# n_repeats = 100 +# energies = sorted(sorted(set(energies)) * n_repeats) + +# for E in energies: +# +# mono.set(E).wait() +# +# printable_E = str(round(E, 1)).replace(".", "_") + +# fname = f"holo_scan_{printable_E}eV" +# print(fname) + +# while check_intensity.wants_repeat(): +# daq.acquire(fname, n_pulses=100).wait() + +def holo_scan(): + + energies = [ + 528.5, + 529.2, + 529.7, + 530.2, + 531.0, + ] + + n_repeats = 1 + reps = 100 + + energies = sorted(sorted(set(energies)) * n_repeats) + + for E in energies: + + mono.set(E).wait() + + for i in range(reps): + + printable_E = str(round(E, 1)).replace(".", "_") + + fname = f"holo_scan_{i:03}_{printable_E}eV" + print(fname) + + while check_intensity.wants_repeat(): + daq.acquire(fname, n_pulses=100, is_scan_step=(i != 0)).wait() + + +### + +def holo_scan(): + + energies = [ + 528.5, + 529.2, + 529.7, + 530.2, + 531.0, + ] + + n_repeats = 1 + reps = 5 + + energies = sorted(sorted(set(energies)) * n_repeats) + + for i in range(reps): + + for E in energies: + + mono.set(E).wait() + + + printable_E = str(round(E, 1)).replace(".", "_") + + fname = f"holo_scan_{i:03}_{printable_E}eV" + print(fname) + + while check_intensity.wants_repeat(): + daq.acquire(fname, n_pulses=100).wait()