Whitening waveform from known PSD #3696
-
Hi 👋, I am new to PyCBC and I'm trying to simulate and process waveforms in the frequency domain. In practice, I have a waveform cutoff_freq = 20.
psd = aLIGOZeroDetHighPower(len(s), s.delta_f, cutoff_freq)
noise = frequency_noise_from_psd(psd)
s = s + noise Is there a way to perform whitening on |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I've done some research and looked at the source code. The solution I found is to normalize the signal with respect to the PSD. In my example, idx = int(psd.duration * cutoff_freq)
norm = np.sqrt(psd / psd.delta_f)
norm[:idx] = norm[idx]
norm[-1:] = norm[-2]
s = s / norm
|
Beta Was this translation helpful? Give feedback.
I've done some research and looked at the source code. The solution I found is to normalize the signal with respect to the PSD.
In my example,
norm[:idx] = norm[idx]
andnorm[-1:] = norm[-2]
prevent divisions by zero for frequencies that are out-of-range.