Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Missing factor 1/2 and 1/sqrt(2) ? #32

Open
fincardona opened this issue May 18, 2020 · 1 comment
Open

Missing factor 1/2 and 1/sqrt(2) ? #32

fincardona opened this issue May 18, 2020 · 1 comment
Assignees

Comments

@fincardona
Copy link

Hi,

Is there a missing factor 1/2 in the computing of WNL in the following lines of code:

print('White noise level from spectrum = %4.3f, '
'variance = %4.3f' % (wnl*samp_freq, np.std(noise)**2))

print('White noise level from spectrum = %4.3f, '
'standard deviation = %4.3f' % (wnl*samp_freq, np.std(noise)**2))

and a factor 1/sqrt(2) in the following ones:

print('White noise level from spectrum = %4.3f, '
'standard deviation = %4.3f' % (wnl*np.sqrt(samp_freq), np.std(noise)))

print('White noise level from spectrum = %4.3f, '
'standard deviation = %4.3f' % (wnl*np.sqrt(samp_freq), np.std(noise)))

?

Furthermore, it is not to clear to me which are the real dimensions of WNL. Are they: amplitude / sqrt(freq) or power / freq ?
I think one should decide to refer either to the first as WNL and to the second as WNL squared or to the first as sqrt of WNL and to the second as WNL.

Thanks

@fincardona
Copy link
Author

fincardona commented May 18, 2020

I found also that you plot 2*noise_properties[0]:

pl.loglog(spec['frequencies'][1:], np.zeros(len(spec['frequencies'][1:]))+2*noise_properties[0])

pl.loglog(plot_freqs, np.zeros(len(plot_freqs))+2*noise_properties[0])

pl.loglog(spec['frequencies'][1:], np.zeros(len(spec['frequencies'][1:]))+2*noise_properties[0])

which compensates for the missing factor 1/2 in the computation of White noise level from spectrum but, then, what do you have on the y-axis of the spectrum?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants