Skip to content
Snippets Groups Projects
Commit e8ada7ba authored by Yb Tweezer's avatar Yb Tweezer
Browse files

tweak parameters and remove MOGLabs stuff for TimeBase; add pre-imaging block...

tweak parameters and remove MOGLabs stuff for TimeBase; add pre-imaging block and some small waiting times
parent 7f67b8eb
No related branches found
No related tags found
No related merge requests found
......@@ -13,21 +13,18 @@ import toml
# outdir = DATADIRS.tweezer_atoms.joinpath(timestamp)
_save = False
_label = "atom_signal_test_exposure=70ms_loading=20ms_background"
_label = "hist_det-probe=93.40_p-probe=14.0_tau-probe=150.0_disp=4.2_tau-preprobe=150"
_counter = 0
date = get_timestamp().split("_")[0]
date = get_timestamp().split("_")[0].replace("-", "")
datadir = DATADIRS.tweezer_atoms.joinpath(date)
if _save:
if not datadir.is_dir():
print(f":: mkdir -p {datadir}")
# datadir = DATADIRS.tweezer_atoms.joinpath("test")
while datadir.joinpath(f"{_label}_{_counter:03.0f}").is_dir():
_counter += 1
outdir = datadir.joinpath(f"{_label}_{_counter:03.0f}")
comments = """
no loading block
"""[1:-1]
# CAMERA OPTIONS
......@@ -52,64 +49,69 @@ flir_config = {
## MAIN SEQUENCE PARAMETERS
# general
reps = 500 # repeat shots for statistics
clk_freq = 10e6 # serial_bits clock frequency; Hz
take_background = False # include a background image
flir_two_shots = False # use the Flir to take two shots
use_cmot_preprobe = False # use the CMOT beams to check imaging conditions
reps: int = 800 # repeat shots for statistics
clk_freq: float = 10e6 # serial_bits clock frequency; Hz
take_background: bool = False # include a background image
flir_two_shots: bool = False # use the Flir to take two shots
use_cmot_preprobe: bool = False # use the CMOT beams to check imaging conditions
dispenser: float = 4.2 # dispenser current (for book-keeping); A
# timings (not to scale)
#
# Entangleware . MOGLabs
# time | start ==========================================================
# V .
# (...) <blue MOT loading> .
# .
# t0 ----- <tau_comp> --------------------------------- <tau_ref>
# | | . |
# | | . | tau_ramp
# | | . |
# | | . -----
# | | . |
# | tau_ncool | . | tau_rampdur
# | | . |
# | | . -----
# | | .
# | | . (...)
# | | .
# --------------------------------------|-----------------
# | | .
# | tau_pause | .
# | | .
# ----- <tau_flir>, <tau_flir_second> | .
# | | .
# | tau_twzr_load | .
# | | .
# ----- | .
# | | .
# | tau_preprobe | tau_all .
# | | .
# ----- | .
# | | .
# | tau_pp (parity projection) | .
# | | .
# ----- | .
# | | .
# | tau_dark_open (andor shutter) | .
# | | .
# ------------------- <tau_andor> | .
# | | | .
# | tau_probe | | .
# | | | .
# ----- | tau_image | .
# | | .
# (...) | | .
# | | .
# ------------------- | .
# | | .
# | tau_dark_close (andor shutter) | .
# | |
# end ==========================================================
# | Entangleware
# time | start ======================================
# | .
# V . <blue MOT loading>
# .
# t0 --- <tau_comp> -----------------------
# | |
# | |
# | |
# | |
# | |
# | tau_ncool |
# | |
# | |
# | |
# | |
# | |
# ------------------------------------|-
# | |
# | tau_pause |
# | |
# --- <tau_flir>, <tau_flir_second> |
# | |
# | tau_twzr_load |
# | |
# --- |
# | |
# | tau_disperse |
# | |
# --- | tau_all
# | |
# | tau_preprobe |
# | |
# --- |
# | |
# | tau_pp (parity projection) |
# | |
# --- |
# | |
# | tau_dark_open (andor shutter) |
# | |
# ---------------- <tau_andor> |
# | | |
# | tau_probe | |
# | | |
# --- | tau_image |
# . | |
# . | |
# . | |
# ---------------- |
# | |
# | tau_dark_close (andor shutter) |
# | |
# end ======================================
t0 = 300e-3 # transfer to green MOT; s
tau_flux_block = -15e-3 # time relative to t0 to stop atom flux; s
......@@ -117,33 +119,23 @@ tau_blue_overlap = 2e-3 # overlap time of blue beams with green beams relative t
tau_ncool = 100e-3 # narrow cooling/compression time; s
tau_comp = 46e-3 # start compression ramping relative to beginning of narrow cooling; s
T_COMP = t0 + tau_comp + np.linspace(0.0, 4e-3, 51) # compression ramp times
tau_pause = 0.0e-3 # pause between ncool and load; s
tau_twzr_load = 2.5e-3 # time to load into tweezers; s
tau_twzr_load = 10e-3
tau_preprobe = 0e-3 # hold with CMOT beams at imaging (proxy) frequency
tau_pause = 0.75e-3 # pause between ncool and load; s
tau_twzr_load = 0e-3 # time to load into tweezers; s
tau_disperse = 30e-3 # wait for CMOT atoms to disperse
# TAU_PREPROBE = np.array([0.5e-3, 5e-3, 10e-3, 30e-3, 50e-3, 75e-3, 100e-3, 125e-3, 150e-3, 175e-3, 200e-3, 250e-3, 300e-3]) # hold with CMOT or probe beams at imaging (proxy) frequency
TAU_PREPROBE = np.linspace(100e-3, 400e-3, 13)
TAU_PREPROBE = np.array([150e-3])
# TAU_PREPROBE = np.array([0.0, 5.0, 10.0, 20.0, 40.0, 80.0, 160.0, 320.0, 500.0, 1000.0, 1500.0, 2000.0]) * 1e-3
TAU_PP = np.array([0e-3]) # parity projection pulse time; s
tau_dark_open = 27e-3 # shutter opening time for EMCCD; s
tau_dark_close = 40e-3 # shutter closing time for EMCCD; s
tau_pp = 0e-3 # parity projection time; s
TAU_PROBE = np.array([70e-3]) # probe beam time; s
# TAU_PROBE = np.array([]
# + [2e-3, 4e-3, 6e-3, 8e-3]
# + [10e-3, 20e-3, 30e-3, 50e-3, 70e-3, 100e-3, 150e-3, 200e-3]
# )
TAU_PROBE = np.array([100e-3])
# TAU_PROBE = np.array([0.5e-3, 1e-3, 2e-3, 5e-3, 10e-3, 50e-3, 100e-3, 200e-3, 300e-3, 400e-3, 500e-3, 700e-3]) # probe beam time; s
tau_image = TAU_PROBE.max() # EMCCD exposure time; s
tau_all = ( # main sequence time; s
tau_ncool
+ tau_pause
+ tau_twzr_load
+ tau_preprobe
+ tau_pp
+ tau_dark_open
+ tau_image
+ tau_dark_close
)
tau_dark_close = 40e-3 # shutter closing time for EMCCD; s
# camera timings
tau_flir = -10e-3 # Flir camera time rel. to end of pause after narrow cooling; s
tau_flir_second = tau_twzr_load + tau_pp + tau_dark_open + 0.1e-3 # second Flir shot rel. to end of pause after narrow cooling; s
tau_flir_second = tau_twzr_load + 5e-3 # second Flir shot rel. to end of pause after narrow cooling; s
TAU_ANDOR = np.array([0.0e-3]) # EMCCD camera time relative to end of dark period; s
# coil settings
......@@ -155,12 +147,13 @@ B_green = int(44182 * 1.25) # 174: 1.25 -> 1.1
bits_Bset = int(20) # number of bits in a servo setting
bits_DACset = int(4) # number of bits in a DAC-mode setting
B_COMP = np.linspace(B_green, B_green * 1.8, T_COMP.shape[0]) # compression ramp values
shims_ud_pp = 0 # bias field for parity projection: B = 0.4 * 4.92 * V
# detunings
DET_MOT = np.linspace(+1.3, +1.3, 1) # green MOT detuning for tweezer loading (rel. to CMOT); MHz
DET_PROBE_PROXY = 3.68 + np.linspace(+0.8, +0.8, 1) # imaging conditions proxy using CMOT beams (rel. to AOM center); MHz
DET_PROBE = 3.68 + np.linspace(-0.6, -0.6, 1) # probe beam detuning for imaging (rel. to AOM center); MHz
DET_PP = 3.68 + np.linspace(+0.8, +0.8, 1)
DET_PREPROBE = np.linspace(3.4, 3.4, 1) # preprobe imaging conditions proxy using CMOT or probe beams (rel. to AOM center); MHz
DET_PROBE = np.linspace(3.4, 3.4, 1) # probe beam detuning for imaging (rel. to AOM center); MHz
DET_LOAD = np.linspace(-0.0, +0.0, 1) # green MOT detuning for tweezer loading (rel. to CMOT); MHz
DET_PP = np.linspace(-3.58, +0.42, 1) # green MOT detuning for partity projection (rel. to CMOT); MHz
det_556_tweezer = 3.68 # detuning on the 556 tweezer (probe) path (rel. to AOM center); MHz
## CMOT RAMP PARAMETERS
......@@ -179,52 +172,50 @@ nu_ramp = 3.58 # extent of ramp; MHz
# power parameters
p_ramp_beg = 29.0 # start of ramp; dBm
p_ramp_end = -11.0 # end of ramp; dBm
p_probe = 19.0 # power in probe beam AOMs; dBm
p_probe = 14.0 # power in probe beam AOMs; dBm
p_556_tweezer = -10.0 # power in the 556 tweezer (probe) AOM; dBm
p_pp = 17.0 # parity projection pulse AOM (CMOT) power; dBm
# derived arrays
RAMP_T = t0 + np.linspace(tau_ramp, tau_ramp + tau_rampdur, ramp_N + 1)
RAMP_F = np.linspace(f_ramp, f_ramp + nu_ramp, ramp_N + 1)
RAMP_P = np.linspace(p_ramp_beg, p_ramp_end, ramp_N + 1)
# write book-keeping info to file(s)
if _save:
params = {
k.lower(): float(v) if isinstance(v, float)
else [float(vk) for vk in v] if isinstance(v, np.ndarray)
else v
for k, v in vars().items()
if isinstance(v, (str, int, float, complex, tuple, list, dict, np.ndarray))
if k[:1] != "_" and k not in dir(lib)
}
if not outdir.is_dir():
print(f":: mkdir -p '{str(outdir):s}'")
outdir.mkdir(parents=True)
with outdir.joinpath("params.toml").open('w') as outfile:
toml.dump(params, outfile)
with outdir.joinpath("comments.txt").open('w') as outfile:
outfile.write(comments)
# book-keeping info
params = {
k.lower(): float(v) if isinstance(v, float)
else [float(vk) for vk in v] if isinstance(v, np.ndarray)
else v
for k, v in vars().items()
if isinstance(v, (str, int, float, complex, tuple, list, dict, np.ndarray))
if k[:1] != "_" and k not in dir(lib)
}
def make_sequence(
det_mot: float,
det_probe_proxy: float,
det_load: float,
det_preprobe: float,
det_pp: float,
shim_fb: float,
shim_lr: float,
shim_ud: float,
tau_preprobe: float,
tau_pp: float,
tau_probe: float,
tau_andor: float,
tau_probe: float
) -> SuperSequence:
tau_all = ( # main sequence time; s
tau_ncool
+ tau_pause
+ tau_twzr_load
+ tau_preprobe
+ tau_pp
+ tau_dark_open
+ tau_image
+ tau_dark_close
)
SEQ = SuperSequence(
outdir.joinpath("sequences"),
(
f"fb={shim_fb:.5f}"
f"_lr={shim_lr:.5f}"
f"_ud={shim_ud:.5f}"
f"_tau-andor={tau_andor:.5f}"
f"_tau-probe={tau_probe:.5f}"
),
"_".join(f"{k.replace('_', '-'):s}={v:.5f}" for k, v in locals().copy().items()),
{
"Flir": (Sequence()
+ Sequence.digital_pulse(
......@@ -241,6 +232,7 @@ def make_sequence(
+ tau_ncool
+ tau_pause
+ tau_twzr_load
+ tau_disperse
+ tau_preprobe
+ tau_pp
+ tau_dark_open
......@@ -340,6 +332,27 @@ def make_sequence(
C.shim_coils_fb, C.shim_coils_lr, C.shim_coils_ud
])
]
+ [
Event.analog(
**C.shim_coils_ud, s=shims_ud_pp
) @ (t0
+ tau_ncool
+ tau_pause
+ tau_twzr_load
+ tau_disperse
+ tau_preprobe
),
Event.analog(
**C.shim_coils_ud, s=0.0
) @ (t0
+ tau_ncool
+ tau_pause
+ tau_twzr_load
+ tau_disperse
+ tau_preprobe
+ tau_pp
),
]
+ [
Event.analog(**c, s=c.default) # have to offset times from e/o
@ (t0 + tau_all + k * 1e-16)
......@@ -360,6 +373,14 @@ def make_sequence(
).with_color("C8"),
"Green MOT(s)": (Sequence()
+ Sequence.serial_bits_c(
C.mot3_coils_sig,
t0,
B_green, bits_Bset,
AD5791_DAC, bits_DACset,
C.mot3_coils_clk, C.mot3_coils_sync,
clk_freq
)
+ Sequence([ # turn on AOM to the right frequency/power
Event.digital1(**C.mot3_green_aom, s=0) # LOW == ON
@ (t0),
......@@ -386,37 +407,66 @@ def make_sequence(
for t, p in zip(RAMP_T, RAMP_P)
]
)
).with_color("C6"),
"Load tweezers": (Sequence()
+ Sequence([ # load tweezer(s)
Event.analog(
**C.mot3_green_aom_fm,
s=MOT3_GREEN_AOM_FM(RAMP_F[-1] + det_mot)
s=MOT3_GREEN_AOM_FM(RAMP_F[-1] + det_load)
) @ (t0 + tau_ncool + tau_pause)
])
+ (
Sequence([ # proxy-test the in-tweezer cooling frequency
Event.analog(
**C.mot3_green_aom_fm,
s=MOT3_GREEN_AOM_FM(90.0 + det_probe_proxy)
) @ (t0 + tau_ncool + tau_pause + tau_twzr_load)
]) if use_cmot_preprobe else Sequence()
+ Sequence.serial_bits_c(
C.mot3_coils_sig,
t0 + tau_ncool,
0, bits_Bset, # turn off coils for tweezer loading
AD5791_DAC, bits_DACset,
C.mot3_coils_clk, C.mot3_coils_sync,
clk_freq
)
+ Sequence([ # apply detuning for parity projection
).with_color("C6"),
"Disperse CMOT": (Sequence()
+ Sequence([
Event.digital1(**C.mot3_green_aom, s=1)
@ (t0 + tau_ncool + tau_pause + tau_twzr_load),
Event.digital1(**C.mot3_green_aom, s=0)
@ (t0 + tau_ncool + tau_pause + tau_twzr_load + tau_disperse)
])
).with_color("k"),
"Parity projection": (Sequence()
+ Sequence([ # apply parity projection pulse
Event.analog(
**C.mot3_green_aom_fm, s=MOT3_GREEN_AOM_FM(90.0 + det_pp)
**C.mot3_green_aom_fm, s=MOT3_GREEN_AOM_FM(RAMP_F[-1] + det_pp)
) @ (t0
+ tau_ncool
+ tau_pause
+ tau_twzr_load
+ use_cmot_preprobe * tau_preprobe
)
+ tau_disperse
+ tau_preprobe
),
Event.analog(
**C.mot3_green_aom_am, s=MOT3_GREEN_AOM_AM(p_pp)
) @ (t0
+ tau_ncool
+ tau_pause
+ tau_twzr_load
+ tau_disperse
+ tau_preprobe
),
])
+ Sequence([ # detune and depower the MOT beams for loading tweezer(s)
).with_color("C6"),
"MOT beams off": (Sequence()
+ Sequence([ # detune and depower the MOT beams for imaging
Event.analog(
**C.mot3_green_aom_fm, s=MOT3_GREEN_AOM_FM(89.0)
) @ (t0
+ tau_ncool
+ tau_pause
+ tau_twzr_load
+ tau_disperse
+ use_cmot_preprobe * tau_preprobe
+ tau_pp
),
......@@ -425,6 +475,7 @@ def make_sequence(
+ tau_ncool
+ tau_pause
+ tau_twzr_load
+ tau_disperse
+ use_cmot_preprobe * tau_preprobe
+ tau_pp
),
......@@ -432,8 +483,8 @@ def make_sequence(
@ (t0
+ tau_ncool
+ tau_pause
+ tau_pause
+ tau_twzr_load
+ tau_disperse
+ use_cmot_preprobe * tau_preprobe
+ tau_pp
),
......@@ -441,29 +492,13 @@ def make_sequence(
@ (t0
+ tau_ncool
+ tau_pause
+ tau_pause
+ tau_twzr_load
+ tau_disperse
+ use_cmot_preprobe * tau_preprobe
+ tau_pp
- 3.8e-3 # shutter closing time
),
])
+ Sequence.serial_bits_c(
C.mot3_coils_sig,
t0,
B_green, bits_Bset,
AD5791_DAC, bits_DACset,
C.mot3_coils_clk, C.mot3_coils_sync,
clk_freq
)
+ Sequence.serial_bits_c(
C.mot3_coils_sig,
t0 + tau_ncool,
0, bits_Bset, # turn off coils for tweezer loading
AD5791_DAC, bits_DACset,
C.mot3_coils_clk, C.mot3_coils_sync,
clk_freq
)
).with_color("C6"),
"Green imaging": (Sequence()
......@@ -473,6 +508,7 @@ def make_sequence(
+ tau_ncool
+ tau_pause
+ tau_twzr_load
+ tau_disperse
+ tau_preprobe
+ tau_pp
+ tau_dark_open
......@@ -513,11 +549,24 @@ def make_sequence(
SEQ["Pre-probe"] = (Sequence()
+ Sequence.digital_pulse(
*C.probe_green_aom,
t0 + tau_ncool + tau_pause + tau_twzr_load,
t0 + tau_ncool + tau_pause + tau_twzr_load + tau_disperse,
tau_preprobe,
invert=True
)
).with_color("g")
else:
SEQ["Pre-probe"] = (Sequence()
+ Sequence([ # proxy-test the in-tweezer cooling frequency
# Event.digital1(**C.mot3_green_aom, s=1)
# @ (t0 + tau_ncool + tau_pause + tau_twzr_load),
# Event.digital1(**C.mot3_green_aom, s=0)
# @ (t0 + tau_ncool + tau_pause + tau_twzr_load + tau_disperse),
Event.analog(
**C.mot3_green_aom_fm,
s=MOT3_GREEN_AOM_FM(90.0 + det_preprobe)
) @ (t0 + tau_ncool + tau_pause + tau_twzr_load + tau_disperse)
])
).with_color("g")
SEQ["Sequence"] = ( # dummy sequence; ensures that EW backend stays in-sequence
Sequence.digital_hilo(
......@@ -635,52 +684,37 @@ class NarrowCoolingTweezerAlignment(Controller):
def precmd(self, *args):
self.comp = MAIN.connect()
self.comp.set_defaults().def_digital(*C.probe_green_sh, 1)
# self.cam = FLIR.connect()
# (self.cam
# .configure_capture(**flir_config)
# .configure_trigger()
# )
self.tb = TIMEBASE.connect()
# self.mog = MOGRF.connect(timeout_retry=1).set_mode(1, "TSB")
# if check_556_tweezer:
# (self.mog
# .set_frequency(2, 90.0 + det_556_tweezer).set_power(2, p_556_tweezer)
# )
# pre-construct all sequences and mogtables so we don't have to do it
# in the main loop
# print("[control] pre-computing sequences ... ", end="", flush=True)
# self.sequences = list()
# self.ssequences = list()
# for fb, lr, ud, tau_andor in product(SHIMS_FB, SHIMS_LR, SHIMS_UD, TAU_ANDOR):
# name = f"fb={fb:.5f}_lr={lr:.5f}_ud={ud:.5f}_tau-andor={tau_andor:.5f}"
# sseq = make_sequence(name, fb, lr, ud, tau_andor)
# self.sequences.append(sseq.to_sequence())
# self.ssequences.append(sseq)
# # track the mogtables separately because they're slow to load to the controller
# # they should be the slowest-varying parameter in scans
# self.mot_mogtables = [
# make_mot_mogtable(d_mot, d_probe_proxy, d_pp)
# for d_mot, d_probe_proxy, d_pp in product(DET_MOT, DET_PROBE_PROXY, DET_PP)
# ]
# print(f"done ({len(self.mot_mogtables) * len(self.sequences) * reps})")
self.tb.set_amplitude(p_probe)
def run_sequence(self, *args):
if _save:
if not datadir.is_dir():
print(f":: mkdir -p {datadir}")
datadir.mkdir(parents=True, exist_ok=True)
if not outdir.is_dir():
print(f":: mkdir -p {outdir}")
outdir.mkdir(parents=True, exist_ok=True)
with outdir.joinpath("params.toml").open('w') as outfile:
toml.dump(params, outfile)
with outdir.joinpath("comments.txt").open('w') as outfile:
outfile.write(comments)
N_probe = len(DET_PROBE)
N_ew = np.prod([
len(X) for X in [
DET_MOT,
DET_PROBE_PROXY,
DET_LOAD,
DET_PREPROBE,
DET_PP,
SHIMS_FB,
SHIMS_LR,
SHIMS_UD,
TAU_PREPROBE,
TAU_PP,
TAU_PROBE,
TAU_ANDOR,
TAU_PROBE
]
])
......@@ -695,20 +729,11 @@ class NarrowCoolingTweezerAlignment(Controller):
# loop over generators for memory efficiency
self.ssequences = lambda: (
make_sequence(
det_mot, det_probe_proxy, det_pp,
fb, lr, ud,
tau_andor, tau_probe
)
for (
det_mot, det_probe_proxy, det_pp,
fb, lr, ud,
tau_andor, tau_probe
)
in product(
DET_MOT, DET_PROBE_PROXY, DET_PP,
make_sequence(*X)
for X in product(
DET_LOAD, DET_PREPROBE, DET_PP,
SHIMS_FB, SHIMS_LR, SHIMS_UD,
TAU_ANDOR, TAU_PROBE
TAU_PREPROBE, TAU_PP, TAU_PROBE, TAU_ANDOR,
)
)
......@@ -747,20 +772,6 @@ class NarrowCoolingTweezerAlignment(Controller):
self.comp.clear().disconnect()
# def run_camera(self, *args):
# self.frames = self.cam.acquire_frames(
# num_frames = (
# len(self.names)
# + int(flir_two_shots) * len(self.names)
# + int(take_background)
# ),
# timeout=5, # s
# roi=[976, 740, 40, 40] #[968, 737, 40, 40]
# )
# # might be important to disconnect in the action rather than postcmd
# # due to possible bad sharing of resources between threads
# self.cam.disconnect()
def on_error(self, ERR: Exception, *args):
# try to exit gracefully on error, even if it means this part is
# rather dirty
......@@ -769,98 +780,42 @@ class NarrowCoolingTweezerAlignment(Controller):
except BaseException as err:
print(f"couldn't disconnect from computer"
f"\n{type(err).__name__}: {err}")
# try:
# self.cam.disconnect()
# except AttributeError:
# pass
# except BaseException as err:
# print(f"couldn't disconnect from Flir camera"
# f"\n{type(err).__name__}: {err}")
def postcmd(self, *args):
if _save:
for sseq in self.ssequences():
sseq.save(printflag=False)
# names = list()
# for name in self.names:
# if flir_two_shots:
# avgimgdir = outdir.joinpath("images").joinpath("averages")
# avgimgdir_pre = avgimgdir.joinpath("pre")
# avgimgdir_pre.mkdir(parents=True, exist_ok=True)
# avgimgdir_post = avgimgdir.joinpath("post")
# avgimgdir_post.mkdir(parents=True, exist_ok=True)
# name_split = name.split("_")
# names.append(str(
# pathlib.Path(avgimgdir_pre.name).joinpath(
# "_".join(name_split[:-1]) + "_pre_" + name_split[-1])
# ))
# names.append(str(
# pathlib.Path(avgimgdir_post.name).joinpath(
# "_".join(name_split[:-1]) + "_post_" + name_split[-1])
# ))
# else:
# names.append(name)
# if take_background:
# names.append("background")
# arrays = {
# name: frame for name, frame in zip(names, self.frames)
# }
# data = FluorescenceScanData(
# outdir=outdir,
# arrays=arrays,
# config=flir_config,
# comments=comments
# )
# data.compute_results(
# size_fit=False,
# subtract_bkgd=True,
# debug=False,
# mot_number_params={
# # from measurement on 02.21.22
# "intensity_parameter": 2 * 3.55,
# # from measurement on 02.15.22
# "detuning": abs(93.4e6 - 94.08e6) * 2 * np.pi,
# }
# )
# data.save(arrays=True)
# # data.render_arrays()
# # for sseq in self.ssequences:
# # sseq.save()
pass
# if _save:
# for sseq in self.ssequences():
# sseq.save(printflag=True)
def cmd_visualize(self, *args):
seq = make_sequence(
DET_MOT.mean(), DET_PROBE_PROXY.mean(), DET_PP.mean(),
DET_LOAD.mean(), DET_PREPROBE.mean(), DET_PP.mean(),
SHIMS_FB.mean(), SHIMS_LR.mean(), SHIMS_UD.mean(),
TAU_ANDOR.mean(), TAU_PROBE.mean()
TAU_PREPROBE.mean(), TAU_PP.mean(), TAU_PROBE.mean(), TAU_ANDOR.mean(),
)
try:
tmin, tmax = float(args[0]), float(args[1])
except IndexError:
tmin, tmax = 0.0, seq.max_time()
P = seq.draw_detailed()
for t in [
for t in np.cumsum([
t0,
t0 + tau_ncool,
t0 + tau_ncool + tau_pause,
t0 + tau_ncool + tau_pause + tau_twzr_load,
t0 + tau_ncool + tau_pause + tau_twzr_load + tau_preprobe,
t0 + tau_ncool + tau_pause + tau_twzr_load + tau_preprobe + tau_pp,
t0 + tau_ncool + tau_pause + tau_twzr_load + tau_preprobe + tau_pp + tau_dark_open,
t0 + tau_ncool + tau_pause + tau_twzr_load + tau_preprobe + tau_pp + tau_dark_open + TAU_PROBE.mean(),
t0 + tau_ncool + tau_pause + tau_twzr_load + tau_preprobe + tau_pp + tau_dark_open + tau_image,
]:
tau_ncool,
tau_pause,
tau_twzr_load,
tau_disperse,
TAU_PREPROBE.mean(),
TAU_PP.mean(),
tau_dark_open,
TAU_PROBE.mean()
]):
P.axvline(t, color="r", linestyle="-", linewidth=0.4)
for t in [
t0 + tau_ramp,
t0 + tau_ramp + tau_rampdur,
# t0 + tau_ramp + tau_rampdur + tau_preprobe,
]:
for t in np.cumsum([t0, tau_ramp, tau_rampdur]):
P.axvline(t, color="g", linestyle="--", linewidth=0.4)
for t in [
t0 + tau_comp,
t0 + tau_ncool + tau_pause + tau_flir,
t0 + tau_ncool + tau_pause + tau_twzr_load + tau_preprobe + tau_pp + tau_dark_open + TAU_ANDOR.mean(),
t0 + tau_ncool + tau_pause + tau_twzr_load + tau_disperse + TAU_PREPROBE.mean() + TAU_PP.mean() + tau_dark_open + TAU_ANDOR.mean(),
]:
P.axvline(t, color="b", linestyle=":", linewidth=0.4)
(P
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment