From 02d5b1d4ac24bfaf2220c18548c3187779632a3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Sierro?= Date: Tue, 29 Aug 2023 09:02:48 +0200 Subject: [PATCH] change: misc --- src/scgenerator/math.py | 4 ++-- src/scgenerator/noise.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scgenerator/math.py b/src/scgenerator/math.py index 52a949d..52f6d1b 100644 --- a/src/scgenerator/math.py +++ b/src/scgenerator/math.py @@ -167,13 +167,13 @@ def all_zeros(x: np.ndarray, y: np.ndarray) -> np.ndarray: return -y[pos] / m + x[pos] -def wspace(t, t_num=0): +def wspace(t: float | np.ndarray, t_num=0): """ frequency array such that x(t) <-> np.fft(x)(w) Parameters ---------- - t : float or array + t : float | np.ndarray float : total width of the time window array : time array t_num : int- diff --git a/src/scgenerator/noise.py b/src/scgenerator/noise.py index 9c06c8c..1d6b6bd 100644 --- a/src/scgenerator/noise.py +++ b/src/scgenerator/noise.py @@ -83,7 +83,7 @@ class NoiseMeasurement: @property def psd_dBc(self) -> np.ndarray: - return math.to_dB(self.psd) + return math.to_dB(self.psd, ref=1.0) @property def plottable_linear(self) -> tuple[np.ndarray, np.ndarray]: