![](https://secure.gravatar.com/avatar/4798d89eea1418dfaf852e64405acc5f.jpg?s=120&d=mm&r=g)
Robert, I ran that code as you suggested. I get this error now - File "ffttest.py", line 21, in <module> signal.lombscargle(minutes,df1.to_numpy().ravel(),freq) File "/usr/local/lib/python3.8/dist-packages/scipy-1.7.1-py3.8-linux-x86_64.egg/scipy/signal/spectral.py", line 150, in lombscargle pgram = _lombscargle(x, y, freqs) ZeroDivisionError: () Any suggestions would be appreciated. Is this an issue I should open on github by providing the test data ? Best regards, Ashwin. On Tue, Apr 12, 2022 at 6:48 PM Robert Kern <robert.kern@gmail.com> wrote:
On Tue, Apr 12, 2022 at 3:32 AM ashwin .D <winash12@gmail.com> wrote:
Hi Robert, Thanks for your prompt response. I am going to try both. Regarding this answer that you recommended - https://stackoverflow.com/questions/34428886/discrete-fourier-transformation...
what would be my angular frequencies from this API - https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.lombscargl... ?
The x and y arguments are straightforward and are available to me from the CSV file. What about the third one ?
That's the angular frequencies at which you want to evaluate the periodogram at. In your case (otherwise-regular time series but with missing values), I would recommend using the angular frequencies that you would have had if you had computed a normal periodogram using the FFT on the whole time series, e.g. `np.linspace(0, np.pi/300.0, 8928//2)` (assuming your `x` is in seconds). The running time is O(len(x)*len(freqs)), though, so that may take a long time. You may want to reduce the number of points you sample at first for visualization, then you can zoom in at the full frequency resolution to an area of interest if there is lots of dead space.
-- Robert Kern _______________________________________________ SciPy-User mailing list -- scipy-user@python.org To unsubscribe send an email to scipy-user-leave@python.org https://mail.python.org/mailman3/lists/scipy-user.python.org/ Member address: winash12@gmail.com