feat: adds real spectrum correction, which might cause problems with older stuff
This commit is contained in:
parent
b8e21da9fe
commit
0e52cd61ae
@ -32,7 +32,8 @@ class TimeSeriesResult:
|
||||
return numpy.real(a * numpy.conjugate(a))
|
||||
|
||||
def psd(v):
|
||||
return sq(scipy.fft.rfft(v)[1:]) * self.delta_t / self.num_points
|
||||
_logger.debug("Using real part correction and multiplying PSD by 2")
|
||||
return 2 * sq(scipy.fft.rfft(v)[1:]) * self.delta_t / self.num_points
|
||||
|
||||
fft_dict = {k: psd(v) for k, v in self.series_dict.items()}
|
||||
freqs = scipy.fft.rfftfreq(self.num_points, self.delta_t)[1:]
|
||||
|
Loading…
x
Reference in New Issue
Block a user