snu-quiqcl / iquip

Ion trap Quantum computing User Interface Project
GNU General Public License v3.0
7 stars 0 forks source link

Fetch dataset information using web socket #243

Closed BECATRUE closed 8 months ago

BECATRUE commented 10 months ago

Now, the dataviewer fetches dataset through web socket implemented in snu-quiqcl/artiq-proxy#117.

In GUI, the only modification is that the button to update dataset list is removed.

image

I tested that

For test, the following example experiment may be helpful.

import time
from artiq.experiment import *

class DatasetTest(EnvExperiment):
    """Dataset Test"""

    def build(self):
        self.setattr_device("core")

    @kernel
    def run(self):
        self.set_dataset("test_a", [], broadcast=True)
        self.set_dataset("test_a.parameters", ["shot"], broadcast=True)
        self.set_dataset("test_a.units", [""], broadcast=True)
        time.sleep(5)

        for cnt in range(10):
            self.append_to_dataset("test_a", [cnt, cnt])
            time.sleep(1)
        time.sleep(5)

        self.set_dataset("test_a", [], broadcast=True)
        time.sleep(1)
        for cnt in range(10):
            self.append_to_dataset("test_a", [cnt, cnt])
            time.sleep(1)

This closes #236.

BECATRUE commented 8 months ago

I realized that this app fetches the dataset list from the proxy server regardless of whether the current status is "realtime" or "remote". The correct implementation is that it fetches the list only when the current status is "realtime", but I will handle this in the next PR, #258, hence please never mind.