A Fast Periodicity Detection Algorithm Sensitive to Arbitrary Waveforms
Authors
Douglas P. Finkbeiner, Thomas A. Prince, Samuel E. Whitebook
Abstract
A reexamination of period finding algorithms is prompted by new large area astronomical sky surveys that can identify billions of individual sources having a thousand or more observations per source. This large increase in data necessitates fast and efficient period detection algorithms. In this paper, we provide an initial description of an algorithm that is being used for detection of periodic behavior in a sample of 1.5 billion objects using light curves generated from Zwicky Transient Facility (ZTF) data (Bellm et al. 2019; Masci et al. 2018). We call this algorithm "Fast Periodicity Weighting" (FPW), derived using a Gaussian Process (GP) formalism. A major advantage of the FPW algorithm for ZTF analysis is that it is agnostic to the details of the phase-folded waveform. Periodic sources in ZTF show a wide variety of waveforms, some quite complex, including eclipsing objects, sinusoidally varying objects also exhibiting eclipses, objects with cyclotron emission at various phases, and accreting objects with complex waveforms. We describe the FPW algorithm and its application to ZTF, and provide efficient code for both CPU and GPU.
Concepts
The Big Picture
Imagine finding a heartbeat in a crowd of 1.5 billion people using nothing but faint flickering light. That’s what modern astronomers face as sky surveys like the Zwicky Transient Facility (ZTF) generate data on billions of stars, each observed hundreds or thousands of times. Hidden in those brightness records are pulsing stars, eclipsing binaries, and exotic objects feeding off companion stars. You have to detect their rhythms fast enough to keep pace with the data.
Existing period-finding algorithms are picky about shape. The Lomb-Scargle periodogram, the gold standard for decades, assumes stars brighten and dim in a smooth, repeating wave. Nature rarely cooperates. An eclipsing binary produces sharp, sudden dips. White dwarfs feeding on companions create jagged, asymmetric spikes. Stars with powerful magnetic fields pulse in complex, multi-humped patterns. Use a tool tuned for smooth waves and you miss half the zoo.
Douglas Finkbeiner (Harvard), Thomas Prince, and Samuel Whitebook (Caltech) built Fast Periodicity Weighting (FPW), an algorithm that detects periodic signals of any waveform shape. It is derived from statistical first principles and fast enough to process over a billion objects on modern hardware.
Key Insight: FPW detects periodicity without assuming anything about waveform shape. This makes it sensitive to variable stars and transients that traditional sinusoid-fitting algorithms routinely miss.
How It Works
FPW belongs to the family of phase-binning algorithms. These methods test whether a signal truly repeats by folding observations together in time. Given a candidate period, every data point gets assigned to one of M phase bins based on where it falls in the cycle. If the source is truly periodic, the same bins consistently land brighter or fainter. If the period is wrong, flux scrambles randomly across bins.
The core computation has three steps:
- For each phase bin, compute a weighted sum of mean-subtracted flux values, where each observation is weighted by its inverse-variance. Precise measurements carry more weight than noisy ones.
- Square that weighted sum and divide by the total bin weight, normalizing by how many observations fell there.
- Sum across all M bins to get the FPW score S_FPW.
The algorithm handles non-uniform photometric errors naturally, since each brightness measurement carries its own uncertainty. For ZTF, errors are calibrated using all sources in a 47-square-degree camera quadrant. This captures systematic effects like variations in the point spread function (the way a star’s light spreads across the detector) that affect entire regions at once.

The mathematical grounding comes from Gaussian Process (GP) theory. The FPW statistic is formally the difference in χ² between two hypotheses: “this source is periodic at this trial frequency” versus “this source is constant.” FPW isn’t a heuristic. It optimizes detection of any signal that creates coherent structure when folded in phase.

There is a trade-off: for pure sinusoids, FPW is slightly less sensitive than Lomb-Scargle. The gain everywhere else more than compensates. ZTF contains eclipsing binaries, cataclysmic variables, accreting white dwarfs, and contact binaries. These are all sources whose complex waveforms are nearly invisible to a sine-wave detector. FPW recovers them.
Eclipsing systems produce sharp dips with flat tops, nothing like a sinusoid. Accreting compact objects generate asymmetric multi-peaked patterns that shift with orbital phase. Cyclotron emitters pulse in ways that depend on the viewer’s angle relative to the magnetic field axis.

For each candidate period, FPW constructs a periodogram by plotting S_FPW values versus frequency. A real period stands out as a sharp peak above the noise floor. The team validated FPW on known ZTF variable stars, recovering periods cleanly across all these morphologies where Lomb-Scargle produces weak or aliased detections.
FPW handles irregularly sampled time series just as well. ZTF doesn’t observe every source on a perfect schedule, and the algorithm takes uneven gaps in stride. It runs efficiently on both CPUs and GPUs, with open-source code for both.
Why It Matters
The Vera Rubin Observatory’s Legacy Survey of Space and Time (LSST) will push object counts higher and observation cadences denser. Algorithms that work fine for millions of sources become bottlenecks at billions. FPW already targets ZTF’s full 1.5-billion-object dataset and is running in production.
The waveform-agnostic design gives access to astrophysics that model-specific algorithms miss. The diversity of periodic variable stars encodes stellar physics: mass transfer, magnetic fields, orbital dynamics, interior structure. A period-finder blind to non-sinusoidal signals is systematically blind to entire classes of objects.
A companion paper will cover the full Gaussian Process derivation, quantitative comparisons across waveform types, and detailed statistical benchmarking.
Bottom Line: FPW provides waveform-agnostic period detection built on Bayesian statistics, fast enough to process 1.5 billion ZTF light curves as billion-source sky surveys come online.
IAIFI Research Highlights
This work pulls Gaussian Process machine learning into classical astrophysical time-series analysis, producing a period-finding algorithm with strong theoretical grounding that still scales to billion-source surveys.
FPW shows how GP-derived probabilistic frameworks can be reduced to simple, hardware-accelerated statistics. It is a concrete example of turning ML-inspired inference into something that runs at production scale.
By detecting periodic signals across the full waveform zoo of variable stars, FPW opens access to compact object physics (accreting white dwarfs, eclipsing binaries, cyclotron emitters) in extreme environments where gravity, electromagnetism, and nuclear physics leave their fingerprints on the light curve.
A follow-up paper will provide full GP derivations and detailed statistical benchmarking. The algorithm and GPU code are publicly available, and processing of ZTF's 1.5 billion-object dataset is ongoing ([arXiv:2502.00243](https://arxiv.org/abs/2502.00243)).
Original Paper Details
A Fast Periodicity Detection Algorithm Sensitive to Arbitrary Waveforms
2502.00243
Douglas P. Finkbeiner, Thomas A. Prince, Samuel E. Whitebook
A reexamination of period finding algorithms is prompted by new large area astronomical sky surveys that can identify billions of individual sources having a thousand or more observations per source. This large increase in data necessitates fast and efficient period detection algorithms. In this paper, we provide an initial description of an algorithm that is being used for detection of periodic behavior in a sample of 1.5 billion objects using light curves generated from Zwicky Transient Facility (ZTF) data (Bellm et al. 2019; Masci et al. 2018). We call this algorithm "Fast Periodicity Weighting" (FPW), derived using a Gaussian Process (GP) formalism. A major advantage of the FPW algorithm for ZTF analysis is that it is agnostic to the details of the phase-folded waveform. Periodic sources in ZTF show a wide variety of waveforms, some quite complex, including eclipsing objects, sinusoidally varying objects also exhibiting eclipses, objects with cyclotron emission at various phases, and accreting objects with complex waveforms. We describe the FPW algorithm and its application to ZTF, and provide efficient code for both CPU and GPU.