Software

Gaussian-process playground

What you are looking at
Steps
0
Accepted
n/a

Loading 223 velocities.

Scale and burn-in apply at once; the start applies at the next Reset.

ParameterNowPosterior

Median and 16 to 84% interval after burn-in; priors below.

HD 41248, HARPS velocities velocitymarginal mean2σ band12 posterior samplescurrent state

Velocities about the mean with their catalogue uncertainties. Click in the strip to move the window.

Traceburn-in shaded
Pair plot
The model k(ti, tj) = η1² exp[−(ti − tj)² / 2η2² − 2 sin²(π (ti − tj) / η3) / η4²] + (σi² + s²) δij ln p(y | θ) = −½ yᵀ K⁻¹ y − ½ ln|K| − (n/2) ln 2π

The quasi-periodic kernel of Haywood et al. (2014): η1 is the amplitude of the activity signal, η2 the lifetime of the active regions, η3 the rotation period and η4 how far from a sinusoid one rotation may stray. The catalogue uncertainties σi and the jitter s sit on the diagonal only. The likelihood comes from a Cholesky factorisation of K.

Priors and the sampler
  • η1 log-uniform 0.1 to 50 m/s, η2 log-uniform 1 to 1,000 d
  • η3 uniform 10 to 40 d, η4 log-uniform 0.1 to 10, s log-uniform 0.1 to 20 m/s
  • fixed start: η1 5 m/s, η2 50 d, η3 20 d, η4 1, s 2 m/s
  • Gaussian random walk in (ln η1, ln η2, η3, ln η4, ln s), steps 0.127, 0.236, 0.534, 0.168, 0.145 times the proposal scale
accept θ' if ln u < ln p(θ' | y) − ln p(θ | y), u ~ U(0, 1)

Proposals outside the prior bounds are rejected. Every state is stored, repeats included, so the chain is a sample from the posterior; only accepted moves would not be. The step sizes follow the 2.38/√d rule of Roberts, Gelman and Gilks (1997) applied to the spread of a 60,000-step pilot run.

What you are looking at

Kernels. The main figure shows five random functions drawn from the chosen kernel on x from 0 to 10, with the mean and the band two standard deviations either side. With no observations that is the prior: the mean is zero and the band has the width of the amplitude. The squared exponential gives smooth functions, Matérn 3/2 rougher ones, the periodic kernel repeats exactly and the quasi-periodic kernel repeats while slowly forgetting, which is the behaviour of spots rotating across a stellar surface.

Click in the figure to add an observation (up to 40) and the posterior replaces the prior: the mean bends through the points, the band narrows near them and widens again as the function is left to itself. New draws samples five fresh functions from whichever distribution is shown. The small panel plots the kernel against the separation of two inputs, the shape that every column of the covariance matrix shares.

The map is the log marginal likelihood of the observations over the length scale and the noise, 28 by 28 cells, darker where the points are more probable; the colour runs from the tenth percentile of the map to its maximum, which a cross marks. Short length scales with little noise fit every point but pay for the complexity; long ones explain the points as noise. Click a cell to adopt its values and watch the figure change.

A star. The second mode fits the quasi-periodic kernel to 223 HARPS velocities of HD 41248 (velocity about the mean against days since the first observation), the activity signal of a star without a confirmed planet. Run starts a Metropolis chain over the five parameters; the readouts give the steps taken and the share of proposals accepted, and the table gives each parameter and the log posterior now, with the median and the 16 to 84 per cent interval after burn-in.

The trace follows the two parameters of the pair plot over the whole chain, with the burn-in shaded. The pair plot is one panel of a corner plot: every state after burn-in, with the marginal histograms along the top and the right and the current state ringed. A proposal scale of 1 accepts about a quarter of the proposals, close to the optimum for a random walk; smaller steps accept more but move less, larger steps stall.

While the chain runs, the plot refreshes one of the 32 posterior states per update, and the dashed line is the conditional mean at the chain's current state.

The band in the main figure is marginalised over the posterior: 32 states are taken at even spacing from the chain after burn-in, the conditional mean and variance of the activity signal are computed for each, and the mixture's mean and spread are drawn, with the conditional means of the first 12. Before the first step the band is the prediction at the starting values. From the fixed point the chain settles within a few thousand steps near η3 of 25.6 d, η1 of 2.9 m/s and a jitter of 1.3 m/s (the pilot run below).

Where it came from

The method on this page is the one I first worked with in AST4000, Data Analysis in Astronomy, in the MSc at the University of Porto (2020/21): prior draws, conditioning on observations, and a Metropolis fit of a quasi-periodic kernel to the velocities of HD 41248. It is written here from the sources named below.

The amplitudes enter the covariance squared and the instrumental jitter as its own diagonal term; the chain stores every state, accepted or not, and the acceptance test works in log likelihood; the priors are stated beside the sampler; and the prediction band is marginalised over the posterior rather than drawn at one parameter set. The velocities are the published ones.

Data and credits

The velocities are the 223 HARPS measurements of HD 41248 published with Jenkins and Tuomi (2014, ApJ 794, 110), read unchanged from VizieR catalogue J/ApJ/794/110 (table 1) at the CDS, Strasbourg. They run from 31 October 2003 to 6 December 2013, 3,689 days, with a scatter of 3.76 m/s and a median uncertainty of 1.25 m/s; the page subtracts their mean of 3,528.06 m/s and keeps the catalogue uncertainties. Use of VizieR is acknowledged as the CDS asks (Ochsenbein, Bauer and Marcout 2000).

HD 41248 is a solar analogue with a contested planetary system. Jenkins et al. (2013) reported signals of 18.357 and 25.648 days in 62 velocities as super-Earths near a 7:5 resonance; Santos et al. (2014) added 162 velocities, tied the 25 day signal to rotation through the activity indicators and could not confirm the 18 day one; Jenkins and Tuomi (2014) kept the planets in all 223. With ESPRESSO, Faria et al. (2020, A&A 635, A13) found that a Gaussian process alone explains the data, with a rotation period matching TESS photometry; that rotation is what this page recovers.

The quasi-periodic kernel for activity follows Haywood et al. (2014, MNRAS 443, 2517); the kernels, conditioning and marginal likelihood are chapters 2, 4 and 5 of Rasmussen and Williams (2006); the proposal scaling is from Roberts, Gelman and Gilks (1997). The pilot run (60,000 steps, the first 8,000 adapted and discarded, 25 per cent accepted) gave η1 2.9 m/s, η2 38 d, η3 25.6 d, η4 0.67 and s 1.3 m/s as posterior medians.

Download the velocities (12 kB), their provenance, which records the query, its date and the catalogue ReadMe, and the pilot run. The table remains the authors' and the journal's; it is reproduced here for teaching, with its reference. Everything runs in your browser, and nothing you do here is sent anywhere.