From 59ad8738314bc5c694d21b88963c335d3dc96765 Mon Sep 17 00:00:00 2001 From: Simon Renblad Date: Tue, 18 Jul 2023 10:42:54 +0800 Subject: [PATCH] examples: rename ndecimals to precision --- artiq/examples/kc705_nist_clock/repository/dds_setter.py | 2 +- .../kc705_nist_clock/repository/photon_histogram.py | 4 ++-- .../examples/kc705_nist_clock/repository/speed_benchmark.py | 2 +- artiq/examples/no_hardware/repository/arguments_demo.py | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/artiq/examples/kc705_nist_clock/repository/dds_setter.py b/artiq/examples/kc705_nist_clock/repository/dds_setter.py index 7f4b1447e..29e391c9e 100644 --- a/artiq/examples/kc705_nist_clock/repository/dds_setter.py +++ b/artiq/examples/kc705_nist_clock/repository/dds_setter.py @@ -20,7 +20,7 @@ class DDSSetter(EnvExperiment): "driver": self.get_device(k), "frequency": self.get_argument( "{}_frequency".format(k), - NumberValue(100e6, scale=1e6, unit="MHz", ndecimals=6)) + NumberValue(100e6, scale=1e6, unit="MHz", precision=6)) } @kernel diff --git a/artiq/examples/kc705_nist_clock/repository/photon_histogram.py b/artiq/examples/kc705_nist_clock/repository/photon_histogram.py index 4a9166a8a..91c39d5fb 100644 --- a/artiq/examples/kc705_nist_clock/repository/photon_histogram.py +++ b/artiq/examples/kc705_nist_clock/repository/photon_histogram.py @@ -12,8 +12,8 @@ class PhotonHistogram(EnvExperiment): self.setattr_device("bdd_sw") self.setattr_device("pmt") - self.setattr_argument("nbins", NumberValue(100, ndecimals=0, step=1)) - self.setattr_argument("repeats", NumberValue(100, ndecimals=0, step=1)) + self.setattr_argument("nbins", NumberValue(100, precision=0, step=1)) + self.setattr_argument("repeats", NumberValue(100, precision=0, step=1)) self.setattr_dataset("cool_f", 230*MHz) self.setattr_dataset("detect_f", 220*MHz) diff --git a/artiq/examples/kc705_nist_clock/repository/speed_benchmark.py b/artiq/examples/kc705_nist_clock/repository/speed_benchmark.py index 63b807390..35ae16b4b 100644 --- a/artiq/examples/kc705_nist_clock/repository/speed_benchmark.py +++ b/artiq/examples/kc705_nist_clock/repository/speed_benchmark.py @@ -79,7 +79,7 @@ class SpeedBenchmark(EnvExperiment): "CoreSend1MB", "CorePrimes"])) self.setattr_argument("nruns", NumberValue(10, min=1, max=1000, - ndecimals=0, step=1)) + precision=0, step=1)) self.setattr_device("core") self.setattr_device("scheduler") diff --git a/artiq/examples/no_hardware/repository/arguments_demo.py b/artiq/examples/no_hardware/repository/arguments_demo.py index 9539a2d4e..b17c258ac 100644 --- a/artiq/examples/no_hardware/repository/arguments_demo.py +++ b/artiq/examples/no_hardware/repository/arguments_demo.py @@ -45,13 +45,13 @@ class ArgumentsDemo(EnvExperiment): PYONValue(self.get_dataset("foo", default=42))) self.setattr_argument("number", NumberValue(42e-6, unit="us", - ndecimals=4)) + precision=4)) self.setattr_argument("integer", NumberValue(42, - step=1, ndecimals=0)) + step=1, precision=0)) self.setattr_argument("string", StringValue("Hello World")) self.setattr_argument("scan", Scannable(global_max=400, default=NoScan(325), - ndecimals=6)) + precision=6)) self.setattr_argument("boolean", BooleanValue(True), "Group") self.setattr_argument("enum", EnumerationValue( ["foo", "bar", "quux"], "foo"), "Group")