When stars pulsate, planets orbit, or black holes accrete matter, they create periodic signals buried in noisy, irregularly-spaced observations. The Lomb-Scargle periodogram has been astronomers’ go-to tool for extracting these cosmic rhythms, but traditional implementations crawl when faced with large datasets from modern surveys and space missions.

nifty-ls revolutionizes this analysis by reformulating the classic Press & Rybicki algorithm using Non-Uniform Fast Fourier Transforms (NUFFTs). Built on Flatiron Institute’s blazingly fast finufft library, it delivers GPU acceleration through CUDA support while achieving several orders of magnitude better numerical precision than Astropy’s standard implementation. The package handles both simple periodograms and Palmer’s fast χ² method for multi-harmonic analysis, with optimized parallel processing for the pre- and post-computation steps.

Whether you’re hunting exoplanets in Kepler data, analyzing variable star lightcurves, or processing radio pulsar timing observations, nifty-ls transforms what used to be overnight computations into interactive analysis sessions. The tool seamlessly integrates with existing Python astronomy workflows while opening new possibilities for real-time period detection in streaming observational data.


Stars: 45
💻 Language: Python
🔗 Repository: flatironinstitute/nifty-ls