From a3d9e21b8c5eec9703a45bc60cdbb13f012fdc11 Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Tue, 29 Nov 2016 16:58:26 +0100 Subject: [PATCH] sawg: artiq-python changes --- artiq/coredevice/sawg.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/artiq/coredevice/sawg.py b/artiq/coredevice/sawg.py index da4c9a5be..53b9c669f 100644 --- a/artiq/coredevice/sawg.py +++ b/artiq/coredevice/sawg.py @@ -90,15 +90,15 @@ class Spline: vi = coeff[i] * self.scale for j in range(i): vi *= self.time_scale - vi = int(round(vi)) - coeff64[i] = vi + ci = int(round(vi)) + coeff64[i] = ci # artiq.wavesynth.coefficients.discrete_compensate: continue if i == 2: - coeff64[1] += vi >> (self.time_width + 1) + coeff64[1] += ci >> (self.time_width + 1) elif i == 3: - coeff64[2] += vi >> self.time_width - coeff64[1] += (vi // 3) >> (2*self.time_width + 1) + coeff64[2] += ci >> self.time_width + coeff64[1] += (ci // 3) >> (2*self.time_width + 1) return self.pack_coeff_mu(coeff64) @kernel @@ -111,7 +111,8 @@ class Spline: self.set_list_mu(self.coeff_to_mu(value)) @kernel(flags={"fast-math"}) - def smooth(self, start, stop, duration, order): + def smooth(self, start: TFloat, stop: TFloat, duration: TFloat, + order: TInt32): """Initiate an interpolated value change. The third order interpolation is constrained to have zero first