Starlight

A periodogram shaped like a shadow

A periodogram that fits sinusoids sees a transiting planet only through the fundamental harmonic of its box-shaped dip, which for a short transit is a few per cent of the signal. Folding the data at each trial period and fitting a box recovers all of it — five times the signal-to-noise for a transit two per cent of the orbit long, eighteen times for an Earth crossing the Sun. The box pays for its extra parameters in trials, and the price is about one unit of signal-to-noise.

Assumes Periodograms and Transits.

A periodogram asks a question of a time series at every trial frequency: how well does a sinusoid at this frequency fit the data? For a star whose brightness or velocity varies smoothly — a pulsating star, a planet tugging its star round an orbit — that is the right question, and the tallest peak marks the period. A periodogram is a matched filter for one waveform, and the waveform it is matched to is a sine.

A transiting planet does not produce a sine. It produces a box: the star’s light is constant for most of the orbit and then drops, for a few hours, by the fraction of the stellar disc the planet covers, and then returns. For a planet like the Earth seen from far away, the drop lasts thirteen hours once a year — one and a half thousandths of the orbit. A sine fitted to that is a poor description of it, and a periodogram built on sines detects it poorly.

The tool transit surveys use instead is the box search: fold the data at each trial period, and at each phase and each of a few durations fit a box. It is the same idea as a periodogram with the waveform changed, and the change is worth a factor of several in signal-to-noise for every short transit.

A transit that no single observation shows

The figures follow one synthetic star. It is observed every half hour for ninety days with a precision of a thousand parts per million per measurement — a few times worse than the best space photometry, a few times better than the ground. A planet crosses it every 3.85 days, for three hours, removing seven hundred parts per million of its light.

A transit buried in the noise, and found by folding. Above: the first 20 of 4,321 brightness measurements of a star over 90 days at half-hour cadence, with a noise of 1000 parts per million per point, containing a planet's transit 700 ppm deep and 3 hours long every 3.85 days. No single transit is visible: each lasts six points, and its depth is smaller than the scatter of any one of them. Below: the same data folded at the period and averaged into 120 bins of phase. The box emerges, 700 ppm deep and 3.2 per cent of the orbit long, because folding adds every transit at the same phase while the noise averages down.
Fig. 1 Above: the first twenty days of the measurements. Five transits happen in this stretch and none is visible: each lasts six measurements and is shallower than the scatter of any one of them. Below: all ninety days folded at the planet’s period and averaged into bins of phase. The box appears, seven hundred parts per million deep and a thirtieth of the orbit long.

Folding is what makes the transit visible, and it works for a simple reason. At the right period every transit falls at the same phase, so their dips add, while the noise, independent from one measurement to the next, averages down as the square root of the number of measurements in each bin. Twenty-three transits of six measurements each put a hundred and forty measurements in the box, and the depth is measured to about eighty-five parts per million — a detection at about eight standard deviations from a signal that is invisible in every individual transit.

The difficulty is that the period is not known. Folding at the wrong period scatters the transits across all phases and the dip vanishes into the average. A search must fold at every plausible period and ask, at each, whether a dip has appeared.

Two ways of asking

The two methods differ only in the shape they look for. At each trial period, the sinusoid method fits a sine and reports how significantly its amplitude differs from zero; the box method fits a box at every phase and for each of a few durations, and reports the most significant depth.

The same data searched with a box and with a sine. The signal-to-noise ratio of the best fit at each trial period, for the light curve of the previous figure, searched two ways: with a box of three trial durations at every phase, and with a sinusoid. The box search peaks at 3.85 days with a signal-to-noise ratio of 7.3, against a true period of 3.85. The sinusoid's best peak anywhere is 3.3, at 1.59 days, and at the true period it reaches only 1.5 — no higher than the peaks the noise makes elsewhere in the search. The planet is a clear detection to one method and invisible to the other, in the same numbers.
Fig. 2 The signal-to-noise ratio of the best fit at each trial period, from both searches of the same ninety days of data. The box search peaks at the planet’s period, 3.85 days, at a signal-to-noise ratio of 7.3, well above everything the noise makes elsewhere. The sinusoid search reaches only 1.5 at the true period; its tallest peak anywhere, 3.3, is at a period with no planet. The same data contain a clear detection or nothing, depending on the question asked.

The sinusoid method has not failed through any defect in its implementation. It is answering its own question correctly: there is almost no sinusoidal variation at 3.85 days. The planet’s signal is there, but in a form the sine cannot represent.

Where the signal goes

A box can be written as a sum of sinusoids — its Fourier series — with one term at the orbital frequency and one at every multiple of it. For a box occupying a fraction qq of the period, the term at the $k$th harmonic has amplitude proportional to sin⁡(πkq)/k\sin(\pi k q)/k. For a short transit, sin⁡(πkq)≈πkq\sin(\pi k q) \approx \pi k q for the first many harmonics, and every one of them has nearly the same amplitude.

A box's power, spread over its harmonics. How the variance of a transit's box signal, with a duty cycle of 2 per cent, divides among the harmonics of the orbital frequency: bars for each harmonic's share, scaled to the largest, and the line for the running total. The fundamental — all that a sinusoid fit at the orbital period sees — carries 4.1 per cent. It takes 14 harmonics to reach half the signal, and the first 50 — out to the harmonic whose period equals the transit's duration, where the pattern reaches its first null — carry 90 per cent. A sinusoid periodogram also shows peaks at half, a third and a quarter of the period, each carrying a similar share — which is why the strongest sinusoid peak of a short transit is often at a harmonic rather than at the period.
Fig. 3 How the power of a box occupying two per cent of the orbit divides among the harmonics of the orbital frequency. The bars are each harmonic’s share, scaled to the largest; the line is the running total. The fundamental — all a sinusoid at the orbital period can see — carries four per cent of the signal. Half the signal is in the first thirteen harmonics, and nine-tenths is spread over the first fifty, out to the harmonic whose period matches the transit’s duration.

So the sinusoid at the orbital frequency captures one term out of about 1/q1/q terms of similar size. For a hot Jupiter with a duty cycle of a few per cent it sees a few per cent of the signal’s power; for an Earth analogue, a tenth of a per cent. The rest is in harmonics, and a periodogram shows each of them as a separate weak peak at the period divided by two, three, four and so on — a comb of small peaks that may or may not rise above the noise, none of them carrying the whole.

The box, by contrast, is the signal. Its fit uses every harmonic at once, with the right relative phases and amplitudes, because those are what a box is. That is the content of the matched-filter principle: the most sensitive test for a signal of known shape in white noise is a fit of that shape.

How much the box gains

The gain can be computed exactly. A box fit estimates the depth from the points in transit against those out of transit, and its signal-to-noise ratio is the depth divided by the noise times 1/nin+1/nout\sqrt{1/n_{\rm in} + 1/n_{\rm out}}. A sine fit estimates the amplitude of the fundamental, 2δsin⁡(πq)/π2\delta\sin(\pi q)/\pi, with a standard error of the noise times 2/N\sqrt{2/N}. Their ratio depends only on the duty cycle.

What a sinusoid misses of a short transit. The signal-to-noise ratio a box fit achieves on a transit, divided by what a sinusoid fit to the same data achieves, against the transit's duty cycle — the fraction of the orbit spent in transit — on logarithmic axes. A sinusoid catches only the fundamental harmonic of the box, whose amplitude is 2δ sin(πq)/π, and the ratio tends to 1/√(2q) for short transits: 5.0 at a duty cycle of two per cent, 18 for an Earth crossing the Sun once a year in thirteen hours. Square it for the factor in observing time: 337 times as long to reach the same significance with a sinusoid. Only for duty cycles approaching a half, when the box is nearly a square wave, do the two methods converge.
Fig. 4 The signal-to-noise ratio of the box fit divided by that of the sinusoid fit, against the fraction of the orbit spent in transit. For short transits it tends to 1/2q1/\sqrt{2q}: five at a duty cycle of two per cent, about seven for a temperate planet round a small star, eighteen for an Earth crossing the Sun. Only when the box fills nearly half the orbit, and is almost a square wave, do the two methods agree.

The square of the ratio is the factor in observing time: to reach the same significance with a sine, an Earth-like transit would need three hundred times the data. In practice that means a sinusoid search of four years of space photometry would find Earth-sized planets in year-long orbits about as well as a box search of five days — which is to say, not at all.

The ratio also explains a pattern that confused early transit searches. Strong, short transits sometimes produced their tallest sinusoidal peak at half or a third of the true period, because a harmonic happened to rise higher than the fundamental in the noise. The comb of the previous figure is also a comb of opportunities to choose the wrong peak, and box searches do not have it: a box at half the period would require a second transit, midway, that is not there.

Longer orbits, shorter duty cycles

The duty cycle is not a free parameter of a planet. A transit lasts as long as the planet takes to cross the star’s disc, which for a central crossing is the star’s diameter divided by the planet’s orbital speed, and the orbital speed falls as the period rises. Putting in Kepler’s third law, the fraction of the orbit spent in transit is about (R⋆/a)/π(R_\star/a)/\pi, and it falls as the period to the minus two-thirds. A planet ten times further out spends a fifth as large a fraction of its orbit in transit.

So the box’s advantage grows exactly where the planets are hardest to find. Longer orbits mean fewer transits in a given baseline and a smaller duty cycle for each, and the sinusoid loses on both counts while the box loses only on the first.

The same data searched with a box and with a sine. The signal-to-noise ratio of the best fit at each trial period, for the light curve of the previous figure, searched two ways: with a box of three trial durations at every phase, and with a sinusoid. The box search peaks at 12.30 days with a signal-to-noise ratio of 7.9, against a true period of 12.3. The sinusoid's best peak anywhere is 3.2, at 1.59 days, and at the true period it reaches only 0.8 — no higher than the peaks the noise makes elsewhere in the search. The planet is a clear detection to one method and invisible to the other, in the same numbers.
Fig. 5 The same search for a planet with a 12.3-day period, a five-hour transit and a depth of nine hundred parts per million — seven transits in the ninety days, each spending under two per cent of the orbit in transit. The box search finds it at the right period with a signal-to-noise ratio of 7.9. The sinusoid reaches 0.8 at the planet’s period, indistinguishable from nothing.

The same dependence makes the transit’s duration a measurement. For a given period, the duration depends on the star’s size relative to the orbit and therefore, through Kepler’s third law, on the star’s mean density. A planet whose transit lasts much longer or shorter than the star’s density allows is either on an eccentric orbit, crossing off-centre, or not orbiting the star it appears to orbit at all — and every planet of one star must agree on that star’s density, which is one of the checks that turns a box-search detection into a planet.

A grid fine enough for a box

There is a cost the gain hides, and it is in how finely the trial periods have to be spaced.

A sinusoid is broad in phase. Folding at a period slightly wrong shifts each cycle’s phase a little, and after a baseline of TT the accumulated shift at frequency error Δf\Delta f is TΔfT\Delta f cycles. A sinusoid tolerates a shift of a quarter-cycle or so before the folded signal smears out, so the trial frequencies can be spaced by about 1/(4T)1/(4T).

A box tolerates far less. The transits must line up to within a fraction of their own duration, which is a fraction qq of the period, so the frequency spacing must be about q/Tq/T — a hundred times finer for a duty cycle of one per cent. The box search of the comparison figure tries about thirteen thousand periods between one and twenty days, where the sinusoid tried about three hundred and fifty; spaced as coarsely as the sinusoid’s, the box search misses the planet, because at no trial period do more than a few of its transits fall in the same box.

That grid, and the scan over phases and durations at each period, make the box search far more expensive in computation, which mattered when the first space surveys produced light curves for a hundred thousand stars. It matters more for what it does to the significance of the peaks.

The price in trials

The tallest peak in a periodogram of pure noise is not small, and how tall it is depends on how many independent questions the search asked. A box search asks many more than a sinusoid search: every period, and at each period every phase and every duration. Each is a chance for the noise to produce a large peak by accident.

The threshold a search has to clear. The signal-to-noise ratio a peak must exceed for the search to expect one false alarm from Gaussian noise, against the number of independent trials it makes. A box search of one star over 90 days, at periods between 1 and 20 days, every phase and three durations, makes about 8,550 independent trials, threshold 3.6; the same star searched for four years and out to longer periods makes about 5.6·10⁵, threshold 4.6. A survey of the size of the Kepler mission, with of order 10¹² independent tests across all its stars, needs 7.0 — which is why that survey adopted a threshold of 7.1. The threshold grows only as the square root of the logarithm of the number of trials, so multiplying the trials a millionfold costs about three units of signal-to-noise — and a box search, against a sinusoid, gains a factor of several on every short transit.
Fig. 6 The signal-to-noise ratio a peak must exceed for a search to expect one false alarm from Gaussian noise, against the number of independent trials. A box search of one star for ninety days makes of order ten thousand trials and needs about 3.6; searched for four years and out to longer periods, about half a million and 4.6. A survey of a hundred thousand stars over four years makes of order 10¹² and needs about seven — the threshold the Kepler mission adopted, at 7.1.

The curve is the reason the box search wins despite the cost. The threshold grows only as the square root of the logarithm of the number of trials: multiplying the trials by a million raises it by about three. The box’s gain over a sinusoid is a multiplicative factor of several on every short transit, at every period, for every star. The extra trials cost one or two units of signal-to-noise; the matched shape returns five or more.

The survey threshold sets a hard edge in what a transit survey can find, and the edge is not as sharp as the threshold suggests: the pipeline’s real detection efficiency rises gradually through it, measured by injecting synthetic transits into the data. But it is the box search’s signal-to-noise that the threshold applies to, and a planet below 7.1 in a box search is a planet that a sinusoid search would never have seen at all.

A detection is not yet a planet

A box search finds boxes, and a planet is only one thing that makes them. An eclipsing binary star produces deeper, often V-shaped dips, and a faint eclipsing binary behind or beside the target, its light blended with the target’s, produces shallow ones of exactly a planet’s depth. A stellar spot rotating into view, an instrumental jump, a cosmic ray at the right moment repeated by chance — each can produce a significant box at some period, and a survey of a hundred thousand stars produces thousands of significant boxes of which a minority are planets.

So the search is followed by vetting: checking whether alternate transits have equal depths, which an eclipsing binary with unequal stars fails; whether there is a shallower secondary eclipse half an orbit later; whether the star’s image shifts on the detector during transit, which would show the dip comes from a neighbour; whether the duration matches the star’s density. Most planets found by transit surveys are never confirmed by measuring their masses; they are validated, by showing that the alternatives are improbable enough given everything else known about the star and its neighbourhood.

The box search’s large number of trials matters here as well. The threshold is set to make false alarms from pure noise rare, but it does nothing about real astrophysical boxes that are not planets, and the sharper the search, the more of those it finds. The comparison with a sinusoid is not therefore a comparison of planets found; it is a comparison of candidate signals, a larger share of which turn out to be planets only because the box finds the shallow ones the sine cannot.

The idea in practice

Transit searches began from the ground in the late 1990s and early 2000s, monitoring dense star fields for weeks at a time, and the box-fitting search was formalised for them in 2002 in the form most surveys still use: fold, bin, slide a box through every phase for a handful of durations, and report the best. The first planets found by transit rather than confirmed by it came from those surveys, with signal-to-noise ratios close to the threshold, from data that a sinusoid search would have returned empty.

The space surveys that followed changed the scale rather than the idea. The Kepler mission’s pipeline used a matched filter built on a wavelet decomposition of the noise, so that the box was matched against the star’s own correlated variability rather than against white noise, and searched durations from an hour to fifteen hours at every period from half a day to beyond a year, across about two hundred thousand stars. The threshold of 7.1 came from the arithmetic of the trials figure. The thousands of planets it found are, in the language of this essay, boxes that rose above the number the noise is expected to produce once.

What the box assumes

A box is itself an approximation. A real transit has sloping ingress and egress, as the planet’s disc crosses the star’s limb, and a curved bottom, because the star is darker at its limb than at its centre. A box fitted to that shape captures most of the signal and loses a little; a search with a realistic transit template, sloped and curved, regains the loss at the price of more parameters. For detection the box is close enough, and the full shape is fitted afterwards, when the period is known, to measure the planet’s radius and the geometry of the crossing.

The box also assumes the noise is white — independent from one measurement to the next. Real stellar variability and instrumental drifts are correlated over hours, which is exactly the timescale of a transit, and correlated noise of the right timescale imitates a box. Transit searches therefore filter the light curve before searching, removing variations slower than a transit while preserving the transit, and the signal-to-noise they quote is computed against the noise on transit timescales rather than the point-to-point scatter. A star whose own variability has power at a few hours — granulation on a giant, spots rotating on an active dwarf — has a higher effective noise for transits than its scatter suggests.

And the box assumes the transits are strictly periodic. A planet perturbed by a neighbour runs early and late, and if its timing wanders by more than its duration over the baseline, folding at any single period smears it out. Planets with large timing variations were sometimes missed by box searches and found later by searching for individual transits.

Where the comparison stops

One synthetic star. The comparison figure is a single simulated light curve with Gaussian noise. Another realisation of the noise moves both curves and both peaks; the box’s advantage over the sinusoid is a property of the waveform and does not depend on the draw, but the particular numbers do.

A uniform signal-to-noise scale. Both methods are put on the scale of a fitted amplitude divided by its standard error. For the sinusoid that is 2P\sqrt{2P} with PP the noise-normalised Lomb–Scargle power, whose distribution under pure noise is not Gaussian, so the trial-threshold curve, drawn for a Gaussian statistic, applies to the box search and only approximately to the sine.

Independent trials estimated. The numbers of independent trials are counts of the grid, divided by factors that account for adjacent trials being correlated. Real pipelines calibrate their thresholds by running on data with no planets — or on data inverted, so that transits become brightenings — rather than by counting.

The surprising connection

The box search is the same calculation a radio astronomer uses to find a pulsar, run on a different signal. A pulsar’s emission is a narrow pulse once per rotation, with a duty cycle of a few per cent; a Fourier search sees it only through a long comb of harmonics, and pulsar searches fold the data at trial periods and look for a pulse, or sum the power in many harmonics at once, for exactly the reason a transit search fits a box. The dip of a planet crossing its star and the flash of a spinning neutron star are mathematically the same kind of signal — narrow, periodic, nearly flat between — and the same insight, that the search should look like the signal, finds both.

Still open: a search for one transit

Every search described here relies on folding, which needs at least two transits and preferably many. A planet whose orbit is longer than the observing baseline transits once, and there is nothing to fold. Single transits are found by searching the light curve for isolated box-shaped dips, which gives up the averaging that made folding powerful; their periods are estimated from the transit’s duration and the star’s density, with large uncertainties. Long-period planets are the ones whose occurrence matters most for comparisons with the solar system, and they are found, if at all, as single events. Whether a population of single transits, each individually marginal, can be turned into a reliable occurrence rate — when the false alarms of a search for isolated dips are far harder to calibrate than those of a folded search — is a question the longest surveys are now confronting.