diff --git a/tantri/dipoles/time_series.py b/tantri/dipoles/time_series.py index 79dcfbb..f2d6dd5 100644 --- a/tantri/dipoles/time_series.py +++ b/tantri/dipoles/time_series.py @@ -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:]