question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Algorithm Improvements for Fast Lomb Scargle

See original GitHub issue

The fast Lomb-Scargle method implemented in astropy.stats.LombScargle is based on a what is effectively fast nonuniform Fourier transform approximation proposed by Press & Rybicki (1989); the utility code is here. The result is an approximation good to roughly one part in 10^4-10^5 or so.

Since 1989, there has been a lot of work on more efficient and effective versions of this flavor of operation; for example the NFFT, with the basic algorithm outlined here. The NFFT package is GPL-licensed, and so can’t be used with astropy, but it would be fairly straightforward to replace astropy’s current trig_sum utility with a Python version of the basic algorithm outlined there. The result would be a much faster and more robust periodogram.

This could be a really fun contribution for someone who wants to dig into fast numerical algorithms…

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:18 (18 by maintainers)

github_iconTop GitHub Comments

2reactions
jakevdpcommented, Apr 14, 2017

I just released a related package: http://github.com/jakevdp/nfft

I think the best thing would be to basically replace the trig_sum utility with the nfft_adjoint code in that package (and update references in docs to reflect the algorithm change). I haven’t benchmarked it, but I believe it should be several times faster, and it will definitely lead to more accurate results – we can also tighten the tolerance in unit tests of method='fast'.

0reactions
bsipoczcommented, Oct 26, 2018

Yes, please remove milestones from non critical issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fast Period Searches Using the Lomb-Scargle Algorithm on ...
The Lomb-Scargle Periodogram (LSP) algorithm is a search approach used to find the periods of objects ob- served at uneven time intervals (Lomb, ......
Read more >
Fast calculation of the Lomb-Scargle periodogram using ...
In this paper, we propose to evaluate an approximation to the Lomb-Scargle periodogram by taking advantage of compar- atively recent algorithms developed for ......
Read more >
Fast Lomb-Scargle Periodograms in Python
LombScargleFast algorithm which implements an efficient pure-Python version of Press & Rybicki's O[NlogN] periodogram.
Read more >
X-ray pulsar signal period estimation based on improved ...
In order to improve the calculation speed, when using the improved Lomb-Scargle algorithm for spectrum estimation, FFT transform is used to ...
Read more >
Lomb-Scargle Periodogram — gatspy 0.3 documentation
LombScargleFast : This class implements the fast, O[N logN] implementation of ... For the basic no-frills Lomb-Scargle algorithm, the best option to use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found