forked from M-Labs/artiq
wavesynth: cleanup
This commit is contained in:
parent
b4ea318e6d
commit
1891725e12
|
@ -14,7 +14,7 @@ class TestSplineCoef(unittest.TestCase):
|
|||
self.s = coefficients.SplineSource(self.x, self.y, order=4)
|
||||
|
||||
def test_get_segment(self):
|
||||
return list(self.s.get_segment_data(start=1.5, stop=3.2, scale=.01))
|
||||
return list(self.s.get_segment(start=1.5, stop=3.2, scale=.01))
|
||||
|
||||
def test_synth(self):
|
||||
d = self.test_get_segment()
|
||||
|
@ -34,7 +34,7 @@ class TestSplineCoef(unittest.TestCase):
|
|||
|
||||
def test_compare(self):
|
||||
scale = 100
|
||||
d = list(self.s.get_segment_data(start=0, stop=4, scale=1/scale))
|
||||
d = list(self.s.get_segment(start=0, stop=4, scale=1/scale))
|
||||
d[0]["trigger"] = True
|
||||
s = compute_samples.Synthesizer(self.y.shape[0], [d])
|
||||
s.select(0)
|
||||
|
|
|
@ -120,9 +120,9 @@ class CoefficientSource:
|
|||
with `n` being the number of channels."""
|
||||
raise NotImplementedError
|
||||
|
||||
def get_segment_data(self, start, stop, scale, *, cutoff=1e-12,
|
||||
target="bias", variable="amplitude"):
|
||||
"""Build wavesynth segment data.
|
||||
def get_segment(self, start, stop, scale, *, cutoff=1e-12,
|
||||
target="bias", variable="amplitude"):
|
||||
"""Build wavesynth segment.
|
||||
|
||||
:param start: see `crop_x()`.
|
||||
:param stop: see `crop_x()`.
|
||||
|
@ -147,7 +147,7 @@ class CoefficientSource:
|
|||
|
||||
See `get_segment()` for arguments.
|
||||
"""
|
||||
for i, line in enumerate(self.get_segment_data(*args, **kwargs)):
|
||||
for line in self.get_segment(*args, **kwargs):
|
||||
segment.add_line(**line)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue