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