Skip to content
Advertisement

Tag: fft

Unable to distinguish four cosines from a FFT

I have four cosines with frequencies 400e-3, 500e-3, 600e-3 and 700e-3 and I am trying to do the FFT of them but under the time I need, I cannot distinguish the four. Is there a way to distinguish the peaks without changing the tmax time of 1.76 and the frequencies? Here are the results: Answer The solution was to increase

Scipy ifft gives different results with seemingly identical input

Why would xcorr and xcorr2 be quite different here? M1 and M2 are numpy matrices. M1.shape[0] = M2.shape[0]. xcorr is what I would expect with this operation, but xcorr2 is something totally different and has imaginary numbers. xcorr does not have imaginary numbers. Answer Try giving xcorr and xcorr2 dtype=complex. According to scipy docs, the output from both fft and

What does np.fft.fftfreq actually do?

I have a monthly time series and I am taking the discrete fourier transform of it. However I am confused as to how numpy converts the time domain into frequency domain? I am using np.fft.fftfreq and my time array is is 708 indices long and each measurement of the data is computed every month. This is the output frequency using

How to set all values between a range equal to zero in python [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question I want to set all the values between 0.75 and 0.8 of an array, equal to zero. Until now I

Advertisement