From 0022cc4275375b64ab8e9b79b44dece467288f08 Mon Sep 17 00:00:00 2001 From: camera computer <> Date: Fri, 2 Dec 2022 16:03:54 -0600 Subject: [PATCH] minor change to create_static_array --- Python/waveform.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Python/waveform.py b/Python/waveform.py index d5179d7..fd9ffdf 100644 --- a/Python/waveform.py +++ b/Python/waveform.py @@ -29,7 +29,7 @@ class Waveform: self.sample_len_min = 2 * sample_rate / freq_res # !!! this only works for sample_rate = 614.4e6 !!! -def create_static_array(wfm: Waveform) -> np.ndarray: +def create_static_array(wfm: Waveform, full=False) -> np.ndarray: """ create a static-array-generating waveform with user set number of samples :param wfm: waveform object already initialized with basic parameters. @@ -50,6 +50,8 @@ def create_static_array(wfm: Waveform) -> np.ndarray: sig = np.sum(sin_mat, axis=0) if np.max(sig) >= 2 ** 15 - 1: print("Signal amp exceeds maximum") + if full: + return sin_mat.astype(np.int16) return sig.astype(np.int16) -- GitLab