---
title: fBLS for Ultra-short Period Exoplanet Searches
url: https://www.emergentmind.com/topics/fast-folding-bls-method-fbls
type: topic
---

# fBLS for Ultra-short Period Exoplanet Searches

The fast-folding Box-Least-Squares method (fBLS) is a search algorithm designed for efficient detection of periodic transiting signals, particularly ultra-short-period exoplanets, in large time-series photometric datasets. By integrating the fast-folding algorithm (FFA)—widely used in pulsar searches—with the Box-Least-Squares (BLS) matched-filter technique for transit detection, fBLS generates all binned phase-folded lightcurves for a range of trial periods in $\mathcal{O}(N_p \log N_p)$ time, providing substantial computational advantages over classical BLS methods when searching for box-shaped signals in the regime where both the number of data points $N$ and the number of trial periods $N_p$ are large [2204.02398].

## 1. Algorithmic Integration: Fast-Folding and BLS Matched Filtering

fBLS combines two algorithmic paradigms:  
- **Fast-Folding Algorithm (FFA):** The FFA arranges the detrended, zero-mean light curve $f(t)$ (with $N$ points) into a matrix of $2^n$ blocks (rows) each of $m$ phase bins (columns), such that $N = 2^n m$ (with zero-padding if required). The recursive FFA procedure co-adds rows of this matrix with appropriate cyclic phase shifts, constructing $2^n$ folded profiles, each corresponding to a particular trial period $P_i = m + i/(2^n - 1)$.
- **Box-Least-Squares (BLS):** After producing all folded profiles with FFA, fBLS applies a matched-filter for box-shaped transit signals. For each folded binned profile, it computes the detection statistic ("Signal Residue" or SR) over a range of box-widths and ingress phases using fast convolutional techniques.

Classical BLS phase-folds the full time-series for each trial period, then convolves the folded series with a boxcar of varying widths and phases. In contrast, fBLS executes the folding for all trial periods in tandem, and then applies the convolutional BLS filter, achieving significant speedups, especially in densely-sampled short-period regimes [2204.02398].

## 2. Mathematical Framework and Key Formulae

The core mathematical operations in fBLS are as follows:
- **Trial period grid construction:**  
  \[
  P_i = m + \frac{i}{2^n - 1},\quad i=0,\ldots,2^n-1.
  \]
- **FFA recursion:**  
  \[
  f^{(\ell+1)}_{2^\ell i' + p}[\phi] = f^{(\ell)}_{2^\ell i' + \lfloor p/2 \rfloor}[\phi] + f^{(\ell)}_{2^\ell i' + \lfloor p/2 \rfloor + 2^{\ell-1}}[(\phi + S_\ell(p)) \mod m]
  \]
- **BLS averages in each phase-bin $\phi$:**
  \[
  s_i[\phi] = \frac{F_{i,\phi}}{n_{\text{tot}}}, \quad r_i[\phi] = \frac{N_{i,\phi}}{n_{\text{tot}}}
  \]
- **Box convolution for box width $w$:**
  \[
  s_i^{(w)}[\phi] = \sum_{k=0}^{w-1} s_i[(\phi + k) \mod N_b], \quad r_i^{(w)}[\phi] = \sum_{k=0}^{w-1} r_i[(\phi + k) \mod N_b]
  \]
- **Signal Residue (SR) statistic:**
  \[
  SR_i = \max_{\phi, w} \frac{|s_i^{(w)}[\phi]|}{\sqrt{r_i^{(w)}[\phi] \, [1 - r_i^{(w)}[\phi]]}}
  \]
  where $SR_i$ is interpreted as the matched-filter signal-to-noise ratio for a rectangular transit.

These operations yield an $N_p \times N_b$ matrix of folded, binned light curves and their associated transit significance metrics.

## 3. Computational Complexity and Performance

The total computational cost of fBLS, for $N_p = 2^n$ trial periods, $N_b$ bins, and $N_w$ box widths, is:
\[
N_{\text{fBLS}} \simeq N_p N_b ( \log_2 N_p + N_w )
\]
In contrast, classical BLS costs:
\[
N_{\text{BLS}} \simeq N_p\, N\, N_w
\]
For typical surveys where $N \gg \log_2 N_p$ or $N \gg N_w$, fBLS provides asymptotically superior scaling. Empirically, for $N \sim 10^4$–$10^5$, fBLS achieves $10$–$20\times$ speedup; for $N \sim 10^6$, the speedup reaches $100\times$. The method exhibits truly linear scaling with $N$ after a brief JIT compilation overhead of $\sim 1$ s when implemented in modern runtimes [2204.02398].

| Setting         | Classical BLS Runtime | fBLS Runtime | Speedup     |
|-----------------|----------------------|--------------|-------------|
| $N\sim 10^4$–$10^5$   | Baseline              | $1/10$–$1/20$   | $10$–$20\times$ |
| $N\sim 10^6$         | Baseline              | $1/100$          | $100\times$ |

## 4. Stepwise Procedure for fBLS Execution

The canonical execution sequence for fBLS comprises:
1. **Preprocessing:**  
   Detrending the input light curve, subtracting the mean, and (optionally) weighting by photometric uncertainty.
2. **Matrix construction:**  
   Filling the zeroth-level FFA matrix $f^{(0)}_i[\phi]$ with appropriate indexing to ensure alignment with potential transit phases.
3. **Fast-folding recursion:**  
   Repeatedly pairing and cyclically shifting matrix rows through $n = \log_2 N_p$ iterations to construct folded profiles in a computational tree.
4. **Folding outputs:**  
   Producing summed flux ($F_{i,\phi}$), sample counts ($N_{i,\phi}$), and trial period vectors ($P_i$).
5. **Box-Least-Squares application:**  
   Employing box convolution to derive SR statistic for each period, width, and phase.
6. **Periodogram peak selection:**  
   Ranking SR values to identify significant transit candidates.

This methodology allows all $N_p$ periodograms to be computed in a single pass.

## 5. Detection and Signal Validation

fBLS offers a rigorous two-stage validation scheme, exemplified in the Kepler ultra-short-period planet demonstration:
- **Stage I:** Applies rapid statistical filters to all candidates with depths $<200$ ppm:
  - $SNR > 8.5$
  - Rectangular vs. harmonic model likelihood ratio $<1\%$
  - Odd-even depth consistency at $1\%$
  - Bootstrap test via phase randomization across quarters
- **Stage II:** Astrophysical false-positive vetting for Stage I survivors includes:
  - Seasonal depth stability (per-season depth $p>1\%$)
  - Flux-centroid correlation in CCD coordinates (combined via Fisher's method, $p>1\%$)
  - Yearly depth-variation test across mission years ($p>1\%$)
  
This strategy allows for efficient rejection of spurious candidates while preserving sensitivity to bona fide transiting exoplanets [2204.02398].

## 6. Empirical Results and Astrophysical Implications

Application to $\sim75,000$ Kepler main-sequence stars (mean $\sim65,000$ points per lightcurve) over $P = 0.2$–$1.0$ days (with $N_p \simeq 250,000$, $N_b = 80$, $N_w = 10$) demonstrates the practical efficacy of fBLS:
- The initial candidate set ($\sim$81 at SNR $>$ 8.5 and depth $<$ 200 ppm) yields 6 high-confidence discoveries after Stage II vetting: 3 previously known ultra-short-period planets and 3 new candidates (e.g., KIC 9217391 with $R_p \simeq 0.75R_\oplus$ at $P \simeq 0.67$ d).
- The fBLS periodogram and SR distribution yield sensitivity and selectivity comparable to standard methods but at massively reduced cost—especially in the ultra-short-period regime requiring extremely fine period-sampling and high-cadence photometry.

fBLS is especially well suited for large surveys and computational environments where $N$ and $N_p$ make classical BLS runtime prohibitive. Open-source code and example notebooks are provided by the authors [2204.02398].

Source: https://www.emergentmind.com/topics/fast-folding-bls-method-fbls