new: convenience plottable_dBc

This commit is contained in:
Benoît Sierro
2023-08-17 14:51:28 +02:00
parent ca2269bebb
commit 400f3be4ae

View File

@@ -118,6 +118,10 @@ class NoiseMeasurement:
def psd_dBc(self) -> np.ndarray: def psd_dBc(self) -> np.ndarray:
return np.log10(self.psd) * 10 return np.log10(self.psd) * 10
@property
def plottable_dBc(self) -> tuple[np.ndarray, np.ndarray]:
return self.freq[1:], self.psd_dBc[1:]
def sample_spectrum(self, nt: int, dt: float | None = None) -> tuple[np.ndarray, np.ndarray]: def sample_spectrum(self, nt: int, dt: float | None = None) -> tuple[np.ndarray, np.ndarray]:
""" """
sample an amplitude spectrum with nt points. The corresponding sample spacing in the time sample an amplitude spectrum with nt points. The corresponding sample spacing in the time