diff --git a/Python/waveform.py b/Python/waveform.py index d5179d7e17316b6fb194ff397988b0cb76cdc981..fd9ffdf9ce7d73fee617d4bc8442d50859bb5912 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)