Hi,
I cannot get the progress bar applet to work. I'm keeping it open in the dashboard while I run an experiment and I'm trying to update the value that it displays during the experiment. The problem is that the value immediately jumps to the highest value (87 in the following example) when starting the experiment although there are delays in the code before the progress bar dataset is updated. Here's some dummy code corresponding to my experiment file:
from artiq.experiment import *
import numpy as np
import Rb_only_3D_MOT
class Master_sequence(EnvExperiment):
"""MAIN Sequence"""
def build(self):
Rb_only_3D_MOT.MOT.build(self)
def run(self):
self.core.reset()
msm = MultiScanManager(
("Rb_load_time_3D", self.Rb_load_time_3D_Scan),
("Rb_hold_time_3D", self.Rb_hold_time_3D_Scan))
for point in msm:
self.Assign_scan_run_values(point)
self.run_seq()
def Assign_scan_run_values(self, point):
for key in [*point.__dict__]:
if key != 'attr':
setattr(self, key, getattr(point, key))
@kernel
def run_seq(self):
self.set_dataset("progress", 0, broadcast=True)
self.core.break_realtime()
Rb_only_3D_MOT.MOT.load_mot(self) # in here is delay(1*s)
Rb_only_3D_MOT.MOT.hold_mot(self) # in here is delay(1*s)
self.set_dataset("progress", 87, broadcast=True)
I've unsuccessfully tried using mutate_dataset (only for arrays I believe) and I've tried making "progress" an array.
I'm calling the applet via
${artiq_applet}progress_bar progress
Would like any help to make the progress bar work. Any example code of a working dummy progress bar would be appreciated.
Thanks,
Malte