Re: Wanting to take a FFT transform of a irregularly spaced sample

Robert Kern <[email protected]> Fri, 15 Apr 2022 12:34:44 -0400
Newsgroups gmane.comp.python.scientific.user
Message-ID <CAF6FJiv57HSZY4Mq-JPk2PTh5_Ob5cJM5XuZBB7VwYQuKBQhTQ@mail.gmail.com>
--===============3744004472583637387==
Content-Type: multipart/alternative; boundary="0000000000007b393405dcb3fedb"

--0000000000007b393405dcb3fedb
Content-Type: text/plain; charset="UTF-8"

On Fri, Apr 15, 2022 at 6:29 AM ashwin .D <[email protected]> wrote:

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

They don't implement the Lomb-Scargle DFT as presented in that paper. They
do have some facility for helping you find the important peaks from the
periodogram and then help you do a least-squares fit to a sinusoidal model
with those fixed frequencies to get the phases. Which may be all you need.
The NFFT that I mentioned might be closer (if not identical; I haven't read
too deeply) to the LS-DFT.

-- 
Robert Kern

--0000000000007b393405dcb3fedb
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">On Fri, Apr 15, 2022 at 6:29 AM ashwin .D=
 &lt;<a href=3D"mailto:[email protected]">[email protected]</a>&gt; wrote=
:<br></div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);paddi=
ng-left:1ex"><div dir=3D"ltr">Robert,<div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 Thanks. I have enclosed the results for your interest.=C2=
=A0 So x.png is the untrended plot of periodogram vs. frequency. Note the s=
pike near the low frequency area of the x axis(close to zero). Those I beli=
eve are the atmospheric tides(<a href=3D"https://patarnott.com/atms411/pdf/=
class2018/atmosTides.pdf__" target=3D"_blank">https://patarnott.com/atms411=
/pdf/class2018/atmosTides.pdf__</a>. But the detrended plot has a richer zo=
o of frequencies including some higher frequency ones while=C2=A0at the sam=
e time reproducing the atmospheric tides.=C2=A0</div><div><br></div><div>I =
had one final question. In this peer reviewed paper (figure 4) <a href=3D"h=
ttps://journals.ametsoc.org/view/journals/apme/57/10/jamc-d-17-0250.1.xml" =
target=3D"_blank">https://journals.ametsoc.org/view/journals/apme/57/10/jam=
c-d-17-0250.1.xml</a> they calculate the phase of the Lomb Scargel periodog=
ram. I checked the scipy API for that but it does not seem to be available.=
 It is available in the gatspy/astropy packages=C2=A0 <a href=3D"https://st=
ackoverflow.com/questions/49859075/lomb-scargle-phase" target=3D"_blank">ht=
tps://stackoverflow.com/questions/49859075/lomb-scargle-phase</a>. Is that =
the better way to go then ?=C2=A0</div></div></blockquote><div><br></div><d=
iv>They don&#39;t implement the Lomb-Scargle DFT as presented in that paper=
. They do have some facility for helping you find the important peaks from =
the periodogram and then help you do a least-squares fit to a sinusoidal mo=
del with those fixed frequencies to get the phases. Which may be all you ne=
ed. The NFFT that I mentioned might be closer (if not identical; I haven&#3=
9;t read too=C2=A0deeply) to the LS-DFT.</div></div><div><br></div>-- <br><=
div dir=3D"ltr" class=3D"gmail_signature">Robert Kern</div></div>

--0000000000007b393405dcb3fedb--

--===============3744004472583637387==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
SciPy-User mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/scipy-user.python.org/
Member address: [email protected]

--===============3744004472583637387==--