Skip to content

Whitening waveform from known PSD #3696

Discussion options

You must be logged in to vote

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

norm[:idx] = norm[idx] and norm[-1:] = norm[-2] prevent divisions by zero for frequencies that are out-of-range.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by francois-rozet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant