Robert,
              Thanks. I have enclosed the results for your interest.  So x.png is the untrended plot of periodogram vs. frequency. Note the spike near the low frequency area of the x axis(close to zero). Those I believe are the atmospheric tides(https://patarnott.com/atms411/pdf/class2018/atmosTides.pdf__. But the detrended plot has a richer zoo of frequencies including some higher frequency ones while at the same time reproducing the atmospheric tides. 

I had one final question. In this peer reviewed paper (figure 4) https://journals.ametsoc.org/view/journals/apme/57/10/jamc-d-17-0250.1.xml they calculate the phase of the Lomb Scargel periodogram. I checked the scipy API for that but it does not seem to be available. It is available in the gatspy/astropy packages  https://stackoverflow.com/questions/49859075/lomb-scargle-phase. Is that the better way to go then ? 

On Wed, Apr 13, 2022 at 8:24 PM Robert Kern <robert.kern@gmail.com> wrote:
On Wed, Apr 13, 2022 at 10:34 AM ashwin .D <winash12@gmail.com> wrote:
Based on this github issue I had to make one modification - https://github.com/scipy/scipy/issues/13812
as shown below. I had to remove the zero frequency 
signal.lombscargle(minutes,df1.to_numpy().ravel(),freq[1:])

Indeed. Sorry, I have not actually used lombscargle() in anger, and that requirement is not mentioned in the docstring (though it is manifest in the example).
 
and the code works just fine now. The interpretation task awaits me now . 

For the record here is the code - 

times = df.view(np.int64)/6E10


df1 = (data[['Pressure_hPa']])

# I also added a 2 to the angular frequency value 
freq = np.linspace(0, 2*np.pi/300.0,8928//2)

You only want to go up to the Nyquist frequency of the original sampling. If `times` is in units of seconds and the sampling period is 5 minutes (300s), then the (angular) Nyquist frequency is np.pi/300.

--
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