A line-by-line algorithm for precision radial velocity

Line-by-line velocity measurements, an outlier-resistant method for precision velocimetry

We present a new algorithm for precision radial velocity (pRV) measurements, a line-by-line (LBL) approach designed to handle outlying spectral information in a simple but efficient manner. The effectiveness of the LBL method is demonstrated on two datasets, one obtained with SPIRou on Barnard’s star, and the other with HARPS on Proxima Centauri. In the near-infrared, the LBL provides a framework for m/s-level accuracy in pRV measurements despite the challenges associated with telluric absorption and sky emission lines. We confirm with SPIRou measurements spanning 2.7 years that the candidate super-Earth on a 233-day orbit around Barnard’s star is an artifact due to a combination of time-sampling and activity. The LBL analysis of the Proxima Centauri HARPS post-upgrade data alone easily recovers the Proxima b signal and also provides a 2-σ detection of the recently confirmed 5-day Proxima d planet, but argues against the presence of the candidate Proxima c with a period of 1900 days. We provide evidence that the Proxima c signal is associated with small, unaccounted systematic effects affecting the HARPS-TERRA template matching RV extraction method for long period signals. Finally, the LBL framework provides a very effective activity indicator, akin to the full width at half maximum derived from the cross-correlation function, from which we infer a rotation period of 92.1+4.2 −3.5 days for Proxima.

Sample region of the Barnard’s star template spectrum with limit of line domains shown as dashed grey lines. Color coding is arbitrary and highlights individual lines.

Sample LBL velocity spectrum for Barnard’s star showing the scatter of velocity measurements over a wide velocity range (±10 km/s of mean velocity; upper panel); lines with uncertainties smaller than 300 m/s are shown in dark blue to improve readability. Lines with uncertainties < 300 m/s are mostly concentrated within the H band and a large part of the Y and J bands are dominated by lines with km/s-level RV uncertainties. Lower panels show the same plot zoomed on one of the domain with the highest density of high-accuracy lines (1500-1550 nm; compare with RV accuracy in Figure 4), a domain strongly affected by telluric absorption but with significant RV content (1800-1850 nm) and the CO bandhead (past 2290 nm). Parts of the domain, such as the redder half of K band and most of J band, have very few, if any, high-quality lines. These regions correspond to domains where lines are either shallow (K) or broader (e.g., J; see Artigau et al. 2018b) than they are in H band. These domains contribute very little to the overall RV budget. The large number of high-quality lines past 2290 nm (lower-left inset) corresponds to the CO band heads.

Radial velocity accuracy achieved for a ∆λ/λ = 5% running window (blue line). As demonstrated in (Artigau et al. 2018b), the H band contains the domain with the highest RV content for the near-infrared domain. Remarkably, a single bin centered at 1.75 μm would allow a 5 m/s RV accuracy, only a factor of ∼2 worse than the full domain of SPIRou (2.53 m/s) for the observation considered. The full spectrum of Barnard’s star is shown as an orange overplot.

Radial velocity time series of Barnard’s star with the LBL method and the standard SPIRou CCF. No activity correction has been performed. The median LBL RV uncertainty is 2.57 m/s, only slightly smaller than the point-to-point dispersion 2.59 m/s. The Ribas et al. (2018) circular orbital solution is shown. The data strongly favors the scenario for which the radial velocity is constant compared to that with the candidate planet with the reported solution.

Radial velocity measurements of the HARPS post-fiber change on Proxima Centauri with the LBL and HARPS-TERRA algorithms. The top panel shows both datasets with Proxima b and d Keplerian contribution (solution from Faria et al. 2022). The bottom panel shows the difference between LBL and HARPS-TERRA; within each sequence the agreement is excellent (RMS of difference 0.7 and 1.2 m/s in 2016 and 2017 respectively), but a systematic difference between sequences at the ∼3 m/s is seen. Uncertainties in the difference between LBL and HARPS-TERRA are derived from the per-sequence RMS. One cannot simply add the errors from each method in quadrature as the noise sources in the two are highly correlated; the two used the same input datasets with the same noise, albeit with different weighting schemes.

Same as previous figure, but for the NAIRA time series. The measurements are in remarkable agreement, with a 0.7 m/s RMS difference between values. The ∼3 m/s bulk offset between the 2016 and 2017 datasets, as seen in the LBL to HARPS-TERRA comparison, is not present. Overall, the scatter after subtraction of the Proxima b and d ephemeris is the same at 1.9 m/s level for both time series.

Proxima Centauri activity modeling with the dLW and the CCF FWHM. Left panels: Changes in the dLW line shape parameter compared to the CCF FWHM. The green and red curves represent the mean prediction of the best-fit quasi-periodic Gaussian process (described in Appendix C), each surrounded by a 68% confidence envelope. Middle panel : Direct comparison between the dLW (expressed in FWHM) and the CCF FWHM. One does not expect a perfect correspondence between the two variables, as the equivalence between the dLW and the FWHM is only strictly true for Gaussian lines. Right panel : Posterior distributions on Prot from the quasi-periodic Gaussian Process model of the dLW and CCF FWHM time series. The 68% confidence intervals on Prot are represented with green (LBL) and red (CCF) regions. The black dashed lines show the 10% relative uncertainty interval for Proxima’s rotation period (Prot = 89 days) from Newton et al. (2018). There is no specific uncertainty for the Newton et al. (2018) rotation period but that typical uncertainties on the period are at the 10% level for their sample.


Step 1: Download the github repository

git clone

Step 2: Install python 3.8 and required modules

Using conda, create a new environment and activate it

conda create --name lbl-env python=3.8

conda activate lbl-env

Then install requirements

cd lbl

pip install -r requirements.txt

Step 3: Add to PATH and PYTHONPATH



export PATH={LBL_ROOT}/lbl/recipes/:$PATH

export PATH={LBL_ROOT}/lbl/resources/:$PATH


Raw input data link:

Output data link:

embed jupyter notebook?

Support for additional instruments

Possibility of collaboration for new instruments to be added to the LBL code.

Terms of our support:

  1. All LBL instrument configuration and setup code will be on the main github repository

  2. Papers using LBL must have Etienne Artigau, Rene Doyon, Charles Cadieux and Neil Cook as CoIs


Lead author:

Code base: