Skip to content

Bug in computation of transfer function for a timeseries

Created by: madeline-wade

The current way that the timeseries object computes a transfer function has a bug in it.
The current code (https://github.com/gwpy/gwpy/blob/main/gwpy/timeseries/timeseries.py#L1117) has the following: csd = other.csd(self, fftlength=fftlength, overlap=overlap, window=window, **kwargs)

psd = self.psd(fftlength=fftlength, overlap=overlap, window=window, **kwargs)

However, this gives a result that is 180 degrees out of phase from the definition of a transfer function. The transfer function should be computed using: csd = self.csd(other, fftlength=fftlength, overlap=overlap, window=window, **kwargs) psd = self.psd(fftlength=fftlength, overlap=overlap, window=window, **kwargs)