change: removed redundant properties

This commit is contained in:
Benoît Sierro
2023-09-14 16:41:07 +02:00
parent 7f07b73626
commit 34d407a921

View File

@@ -75,24 +75,6 @@ class NoiseMeasurement:
psd = psd.real**2 + psd.imag**2 psd = psd.real**2 + psd.imag**2
return cls(freq, psd.mean(axis=0) / window_correction, phase=phase) return cls(freq, psd.mean(axis=0) / window_correction, phase=phase)
@property
def psd_dBc(self) -> np.ndarray:
return math.to_dB(self.psd, ref=1.0)
@property
def plottable_linear(self) -> tuple[np.ndarray, np.ndarray]:
if self.freq[0] == 0:
return self.freq[1:], self.psd[1:]
else:
return self.freq, self.psd
@property
def plottable_dBc(self) -> tuple[np.ndarray, np.ndarray]:
if self.freq[0] == 0:
return self.freq[1:], self.psd_dBc[1:]
else:
return self.freq, self.psd_dBc
def plottable( def plottable(
self, self,
dB: bool = True, dB: bool = True,