From 6b0e120d75f25561e001b50107e3548d478f76da Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Thu, 23 Jul 2015 12:34:54 -0600 Subject: [PATCH] wavesynth/Synthesizer: allow empty data --- artiq/wavesynth/compute_samples.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/artiq/wavesynth/compute_samples.py b/artiq/wavesynth/compute_samples.py index 0658f8bde..476fb385a 100644 --- a/artiq/wavesynth/compute_samples.py +++ b/artiq/wavesynth/compute_samples.py @@ -9,6 +9,8 @@ class Spline: self.c = [0.0] def set_coefficients(self, c): + if not c: + c = [0.] self.c = copy(c) discrete_compensate(self.c) @@ -25,6 +27,8 @@ class SplinePhase: self.c0 = 0.0 def set_coefficients(self, c): + if not c: + c = [0.] self.c0 = c[0] c1p = c[1:] discrete_compensate(c1p)