Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Part one of the tutorial - amplitude goes down to 87.84 when changing frequency to 3.25 [Hertz] #1

Open
haimivan opened this issue Apr 4, 2019 · 0 comments

Comments

@haimivan
Copy link

haimivan commented Apr 4, 2019

Hi,

in the first part of the tutorial: if I change the frequency from 3.0 [Hertz] to 3.25:

t = np.linspace(0, 2*np.pi, 1000, endpoint=True)
f = 3.250 # Frequency in Hz
A = 100.0 # Amplitude in Unit
s = A * np.sin(2*np.pi*f*t) # Signal

I get a maximum amplitude different than 100 in the fft regime:

Yhann = np.fft.fft(hann*s)
print("(2.0*np.abs(Yhann[:N])/N).max():", (2.0 * np.abs(Yhann[:N]) / N).max())

(2.0*np.abs(Yhann[:N])/N).max(): 87.83995835994367

This probably is due to leaking, isn't it?

Apart from adjusting the sampling frequency: how else could I correct that (I have heard of using the sinc() function but am unsure how this should be performed)?

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

No branches or pull requests

1 participant