---
title: LiteBIRD Simulation Framework (LBS)
url: https://www.emergentmind.com/topics/litebird-simulation-framework-lbs
type: topic
---

# LiteBIRD Simulation Framework (LBS)

The LiteBIRD Simulation Framework (LBS) is a Python package designed for the implementation of pipelines that model the outputs of the data acquisition process from the three instruments on the LiteBIRD spacecraft—LFT, MFT, and HFT—and, more broadly, a reusable simulation infrastructure for LiteBIRD end-to-end analyses, specialized systematic-effect studies, and reduced map-based approximations [2507.04918]. In the literature it is presented both as a software framework and as the backbone of mission-scale numerical pipelines: it simulates scanning strategy, sky observation, instrumental noise, and selected systematic effects; it interfaces with the LiteBIRD Instrument Model (IMo); and it supports propagation from detector-level timelines to maps, angular power spectra, and, in some studies, biases on the tensor-to-scalar ratio \(r\) [2507.07122, 2509.03564].

## 1. Definition, mission role, and scope

LBS was developed for LiteBIRD’s requirement-driven simulation program. LiteBIRD is a space mission aimed at measuring CMB \(B\)-mode polarization and constraining primordial inflation, with a target sensitivity of \(\delta r \leq 10^{-3}\) [2507.04918]. The framework was created because the collaboration required not a single one-off simulator, but a common infrastructure able to support multiple pipelines with shared mathematical models, file formats, provenance tracking, and instrument descriptions [2507.04918].

In this role, LBS is described as supporting several distinct simulation modes. These include full end-to-end pipelines, studies of half-wave plate (HWP) systematics, transient-source simulations, and map-based approximations [2507.04918]. The first official LiteBIRD simulation release was realized with an end-to-end pipeline developed using LBS, and that release was explicitly tied to the mission objective of detecting primordial CMB \(B\)-modes with a target uncertainty on the tensor-to-scalar ratio of \(\delta r \sim 0.001\) [2507.07122].

The framework’s scope extends beyond nominal sky-plus-noise production. It is used to establish requirements, optimize observing strategy, validate ground-segment software and data storage, and create realistic data sets for Bayesian and component-separation analyses [2507.07122]. In systematic-effect papers, the same framework is used as an end-to-end bridge from instrumental perturbations to cosmological consequences, for example in studies of beam far side-lobe uncertainty and reflective-HWP misalignment [2312.09001, 2509.03564].

A plausible implication is that LBS occupies the boundary between instrument modeling, scan simulation, and cosmological inference rather than belonging exclusively to any one of those layers. That interpretation is consistent with its repeated use as a pipeline backbone in studies that begin with detector or optical perturbations and end with \(\delta r\)-level requirements.

## 2. Software architecture, data model, and provenance

LBS is implemented in Python, runs on 64-bit Unix systems, and is distributed as an open-source package, `litebird_sim`, on PyPI [2507.04918]. The code uses NumPy for array and matrix operations, Numba for CPU-intensive kernels, AstroPy for time and coordinate handling, Healpy for HEALPix maps, and HDF5/FITS for I/O [2507.04918]. Version 0.11.0 is the release identified as the one used in the companion end-to-end study, although the software evolved further through versions 0.12.0, 0.13.0, 0.14.0, and 0.15.1 [2507.04918].

The central object is the `Simulation` object, which acts as a container for mission-level parameters, the instrument model connection, the random-number generator, allocated observations, and the provenance record used for reporting [2507.04918]. This object stores both inputs and generated outputs and serves as the main anchor for assembling a pipeline. The framework is therefore organized around a persistent simulation state rather than isolated scripts.

Time-ordered data (TOD) are treated as a core data structure. A TOD is stored as a \(2\mathrm{D}\) matrix with rows corresponding to detectors and columns to time samples [2507.04918]. Because LiteBIRD-scale simulations are large, LBS supports MPI-based distribution of these matrices across processes. The split can be by time, by detectors, or by both dimensions, controlled through `n_blocks_det` and `n_blocks_time`, with redistribution available through `Observation.set_n_blocks()` [2507.04918]. An `Observation` may hold multiple TOD-like matrices simultaneously, allowing users to preserve separate components such as sky signal, white noise, \(1/f\) noise, CMB, dust, or synchrotron as distinct arrays [2507.04918].

Detector metadata are kept alongside the timelines. Examples explicitly listed include wafer name, white-noise level, \(1/f\) knee frequency, and noise slope [2507.04918]. Pointing information is stored as an \(N \times M \times 3\) array corresponding to colatitude, longitude, and orientation. In version 0.11.0, orientation and HWP angle were combined into a single polarization angle; later versions separated them, and version 0.14.0 no longer automatically folded polarization angle into beam orientation when using \(4\pi\) beams [2507.04918]. This evolution reflects a shift from idealized pencil-beam modeling toward more realistic beam and HWP treatments.

A major architectural element is the versioned Instrument Model database, IMo, implemented via InstrumentDB backed by SQLite and exposed through local or remote access [2507.04918]. The IMo stores versioned information about instruments, channels, detectors, and scanning parameters. LBS records every IMo query and the version used, and it prefers a local exported copy of the IMo for large simulations because querying the remote server would be too slow and could overload the SSDC server [2507.04918]. Output is written as HDF5 for timelines and pointings and FITS for HEALPix maps; in version 0.11.0, each MPI process writes its own HDF5 file [2507.04918].

Reproducibility is treated as a first-class requirement. LBS can generate a Markdown/HTML report automatically, copy the input TOML parameter file to the output directory, record the Git commit hash, save `git diff` output if the working tree is dirty, and require explicit initialization of the random-number generator through `random_seed` [2507.04918]. The framework also includes unit tests, integration tests, and end-to-end tests, along with assertions and explicit error checks for incorrect MPI splitting, inconsistent TOD/map handling, wrong module call order, frequencies outside bandpass, and inconsistent scanning inputs [2507.04918].

## 3. Scanning, sky, dipole, noise, and HWP modeling

LBS models the LiteBIRD scanning strategy as a composition of rotations: spin around the spin axis, precession of the spin axis around the Sun–Earth axis, and Earth’s revolution around the Sun [2507.04918]. Quaternions encode these rotations at low sampling rate, and spherical linear interpolation (slerp) is used to interpolate pointings to detector sample times [2507.04918]. In the first simulation release, the scanning strategy parameters loaded through the IMo include a boresight angle \(\beta=50^\circ\), a spin rate of \(0.05\) rpm, a precession angle \(\alpha=45^\circ\), and a precession period of about \(192.348\) min; the HWP rotation rates are \(46\) rpm for LFT, \(39\) rpm for MFT, and \(61\) rpm for HFT [2507.07122].

The sky-simulation layer includes Galactic diffuse foregrounds, extragalactic signals, the CMB, and the dipole. LBS uses the Map-Based Simulation module, MBS, as a wrapper around PySM [2507.07122]. In the first release, Galactic foregrounds include thermal dust, synchrotron, anomalous microwave emission (AME), free-free emission, and CO rotational line emission; extragalactic signals include thermal and kinetic Sunyaev–Zel’dovich effects, the cosmic infrared background, lensing convergence, and frequency-dependent radio sources from WebSky simulations and related catalogs [2507.07122]. The CMB is generated as 500 Monte Carlo realizations using Planck 2018 cosmological parameters and then lensed using the WebSky convergence map via lenspix [2507.07122]. These sky components are convolved with circular Gaussian beams using channel-specific FWHM values before timeline generation [2507.07122].

For map scanning, version 0.11.0 assumes ideal pencil beams with essentially zero FWHM and no sidelobes, so scanning a sky map reduces to sampling the HEALPix map at the detector boresight location for each time sample [2507.04918]. The paper explicitly notes that full beam convolution was not yet available in 0.11.0, while later versions introduced \(4\pi\) beam convolution using Ducc [2507.04918]. In systematic-effect studies requiring sub-pixel accuracy, LBS can use bilinear interpolation with four nearest neighbors, for example when a wedge-like HWP misalignment induces tiny pointing offsets smaller than the pixel scale [2509.03564].

The dipole model is treated explicitly. The moving-frame CMB temperature is written as
\[
T(\vec\beta, \hat n) = \frac{T_0}{\gamma \bigl(1 - \vec\beta \cdot \hat n\bigr)},
\]
with \(\vec\beta=\vec v/c\), \(\hat n\) the line of sight, and \(\gamma\) defined in the cited implementation [2507.04918]. In the first simulation release the dipole is included under the LBS nomenclature `TOTAL_FROM_LIN_T`, with
\[
\Delta T = \dfrac{T_0}{f(x)}\left(\dfrac{BB(\nu \gamma(1- \vec{\beta} \cdot \hat{n}),T_0)}{(\gamma(1- \vec{\beta} \cdot \hat{n}))^3 BB(\nu,T_0)}\right),
\]
where
\[
f(x)=\frac{x e^x}{e^x-1}, \qquad BB(\nu,T)=\frac{2 h \nu^3}{c^2}\frac{1}{e^{h\nu/k_B T}-1}
\]
[2507.07122].

Noise modeling includes white noise and \(1/f\) correlated noise. In the framework paper the noise power spectrum is written as
\[
P(f) = \sigma^2 \left(1 + \left(\frac{f_k}{f + f_\text{min}}\right)^\alpha\right),
\]
where \(\sigma^2\) is white-noise power, \(f_k\) the knee frequency, \(\alpha\) the slope, and \(f_\text{min}\ll f_\text{samp}\) a regulator at low frequency [2507.04918]. In the first official release, LBS simulates white-noise timelines and two mixed white-plus-\(1/f\) timelines per detector with \(f_{\rm knee}=30\) mHz and \(100\) mHz, the former intended to be realistic and the latter pessimistic [2507.07122]. The frequency-domain implementation is given as
\[
\tilde{f}_i \rightarrow \tilde{f}_i \times \sigma \sqrt{\frac{\nu_i^\alpha+\nu_{\mathrm{knee}}^\alpha}{\nu_i^\alpha+\nu_{\mathrm{min}}^\alpha}}, \quad i>0,\qquad \tilde{f}_0=0,
\]
with \(\alpha=1\) [2507.07122].

The HWP treatment depends on the application and software version. In version 0.11.0, the HWP model is ideal and only rotates the detector polarization orientation [2507.04918]. The broader LiteBIRD simulation program, however, repeatedly exploits the fact that polarized incident radiation is modulated at four times the HWP rotation frequency, shifting polarized signal above the \(1/f\) knee and helping separate sky signal from low-frequency noise [2507.07122]. In scan-optimization work, the continuously rotating HWP changes the scan-design problem by removing the need for rapid spacecraft spin to modulate polarization directly, while introducing a coupling between scan speed and HWP rotation rate [2408.03040].

## 4. End-to-end pipelines and the first simulation release

The first official LBS-based end-to-end pipeline is built around LiteBIRD’s baseline configuration: a satellite at the Sun–Earth \(L_2\) point, observing the full sky in 15 frequency bands from 34 to 448 GHz for a 3-year mission, with 4508 detectors sampled at 19.1 Hz [2507.07122]. The nominal mission performance cited there is an effective polarization sensitivity of \(2\ \mu\mathrm{K\text{-}arcmin}\) and angular resolution of 31 arcmin at 140 GHz [2507.07122]. The first release itself is a reduced pathfinder configuration using about one-third of the full mission duration and about one-third of the detectors, corresponding to 1678 simulated detectors out of 4508 [2507.07122].

The released products include 500 full-sky simulated maps at HEALPix \(n_{\rm side}=512\), and, for the first simulation only, one year of TOD for approximately one-third of LiteBIRD’s total detectors, along with pointing information and noise covariance matrices [2507.07122]. The channels cover the three LiteBIRD telescopes and use 22 channels from the IMo database; the beam FWHM values in the release span roughly from 70.5 arcmin at 40 GHz down to 17.9 arcmin at 402 GHz [2507.07122].

The pipeline architecture follows a modular sequence from IMo ingestion to map production. The IMo supplies detector counts, beam FWHM, detector efficiencies, noise levels, HWP rotation rates, and detector-orientation quaternions [2507.07122]. Sky maps are prepared component by component at \(n_{\rm side}=512\), scanned into detector TOD using the LBS pointing machinery, combined with dipole and noise components, and then converted into full-sky maps by a simple binner or naive map-maker [2507.07122]. The standard map-making relation is given as
\[
\hat{\mathbf{m}} = (\mathbf{A}^{\mathrm T}\mathbf{N}^{-1}\mathbf{A})^{-1}\mathbf{A}^{\mathrm T}\mathbf{N}^{-1}\mathbf{d},
\]
with pixel-space covariance
\[
\mathcal{N}^{-1}_{pp} = (\mathbf{A}^{\mathrm T}\mathbf{N}_{tt}^{-1}\mathbf{A})^{-1}
\]
[2507.07122]. In the release, the covariance is generated per channel and has \(3\times 3\) blocks for \(TT\), \(QQ\), \(UU\), and the cross-terms \(TQ\), \(TU\), \(QU\) [2507.07122].

The paper reports extensive validation. TOD are checked visually and through power spectra; noise covariance matrices are compared against binned-map residuals; and full-sky spectra of output-minus-input maps are averaged over 500 realizations [2507.07122]. In polarization, residual-map spectra are consistent with white noise, which the authors interpret as evidence that the HWP suppresses \(1/f\) noise effectively, whereas in temperature residual low-\(\ell\) power increases for \(f_{\rm knee}=100\) mHz relative to 30 mHz [2507.07122]. One limitation is explicitly acknowledged: a bug in the noise timestream generation caused an unintended increase in \(1/f\) noise, potentially affecting temperature simulations, though the impact is regarded as minor given the high signal-to-noise ratio in temperature [2507.07122].

The computational footprint of this first release is large but concrete. The total disk footprint is about 35 TB, and the production and validation required roughly 600 kcpu.h on 370 nodes of the MARCONI-CINECA cluster [2507.07122]. The authors anticipate that full focal-plane simulations over the full three-year mission will require about 1 Mcpu.h [2507.07122].

## 5. LBS as a framework for systematic effects and requirement setting

A defining feature of LBS in the literature is its repeated use as an end-to-end engine for requirement derivation. In the far side-lobe study, LBS functions as the organizing pipeline connecting beam simulations, sky simulations, scanning, map-making, beam correction, component separation, and cosmological inference [2312.09001]. The pipeline generates a sky model, produces beam-convolved data, applies beam correction and Galactic masking, runs a parametric component-separation method, and then converts residual \(B\)-mode contamination into a bias \(\delta r\) [2312.09001]. Under the assumptions of that study, the key quantity is the integrated fractional power mismatch in the far side-lobes, which must be known at approximately the \(10^{-4}\) level to keep the beam-induced bias below
\[
\delta r < 1.9\times 10^{-5}
\]
[2312.09001].

In the reflective-HWP misalignment study, LBS is used as the end-to-end numerical engine that propagates a deliberately injected optical misalignment from the instrument level to a final cosmological-parameter bias [2509.03564]. The systematic is a small constant tilt between the HWP rotation axis and the optical axis, parameterized by a wedge angle \(\alpha_{\text{wedge}}\). Because the reflective HWP is assumed ideal and plane-parallel, the misalignment acts like a physical wedge; the reflected beam deviation is \(2\alpha_{\text{wedge}}\), and the resulting sky displacement is a circle of angular diameter \(4\alpha_{\text{wedge}}\) [2509.03564].

In that study, the detector signal in the idealized modulation model is
\[
S(t)=I+Q \cos \left(4 \omega_{\mathrm{HWP}} t-2 \phi\right)+U \sin \left(4 \omega_{\mathrm{HWP}} t-2 \phi\right),
\]
while for orthogonal detector pairs with perfectly matched detectors the differential timestream is
\[
S_A(t)-S_B(t)=2Q \cos (4 \omega_{\mathrm{HWP}} t-2\phi)+2U \sin (4 \omega_{\mathrm{HWP}} t-2\phi)
\]
[2509.03564]. LBS is used to generate CMB-only \(I,Q,U\) maps, scan them into TOD with wedge-modified pointing using the LiteBIRD scan strategy, reconstruct maps using the nominal scan model without knowledge of the wedge, and compare recovered maps and spectra to inputs [2509.03564]. Because the wedge-induced offsets are tiny, bilinear interpolation with four nearest neighbors is used to evaluate the sky at sub-pixel displaced positions [2509.03564].

The principal result is that the contamination mainly resembles lensing \(B\)-modes rather than primordial tensor modes [2509.03564]. The likelihood-based systematic bias is defined as
\[
\delta r(\alpha)=r_{\mathrm{fit}}(\alpha)-r_{\mathrm{fit}}(\alpha=0),
\]
and is compared to a mission systematic budget with
\[
\delta r_{\max}=5.7\times 10^{-6}.
\]
From a fourth-order polynomial fit, the study infers a maximum allowable wedge angle
\[
\alpha_{\max}=12.7~\text{arcmin}
\]
for the two-detector case, corresponding to a mounting displacement of about \(\sigma_x=2\) mm for a 500 mm HWP [2509.03564]. When the number of detectors increases, the allowable wedge becomes less stringent: \(\alpha_{\max}=12.7\) arcmin for 2 detectors, \(22.4\) arcmin for 4 detectors, and \(22.7\) arcmin for 6 detectors [2509.03564].

These studies illustrate a general pattern. LBS is not restricted to producing nominal simulations; it is also used to isolate specific perturbations, reconstruct data under deliberately mismatched assumptions, and translate residual power into mission-level tolerances. This suggests that its scientific importance lies as much in requirement setting and systematic budgeting as in synthetic data generation.

## 6. Scan optimization, external Bayesian pipelines, and computational feasibility

LiteBIRD scan strategy is itself treated as a simulation input that can be optimized quantitatively. The scan-optimization study parameterizes the strategy by
\[
\{ \alpha,\beta,T_\alpha,T_\beta,\nu_\phi,f_s \},
\]
with geometric and kinetic constraints derived from full-sky coverage, Sun-shield and thermal requirements, and HWP modulation conditions [2408.03040]. It introduces metrics directly relevant to an LBS-style scan simulator: integrated planet visibility time, hit-map uniformity,
\[
\sigma_{\rm hits} = \sqrt{\frac{1}{N_{\rm pix}-1}\sum_i\left(N_{\rm hits}(\Omega_i)-\langle N_{\rm hits}\rangle\right)^2},
\]
and the cross-link factor,
\[
h_{n,m}(\Omega)= \sqrt{ \left\langle \cos\!\left(n\psi_j+m\phi_j\right)\right\rangle_j^2+ \left\langle \sin\!\left(n\psi_j+m\phi_j\right)\right\rangle_j^2 }
\]
[2408.03040]. The same work introduces Falcons.jl, a fast spacecraft scanning simulator, and validates a map-based method against TOD-based results for time-independent systematics with differences around \(10^{-14}\) for pointing offset and negligible differences for HWP non-ideality [2408.03040]. The standard LiteBIRD configuration
\[
(\alpha,\beta,T_\alpha,T_\beta,\nu_\phi,f_s) = (45^\circ,50^\circ,192.348\,{\rm min},20\,{\rm min},61\,{\rm rpm},19\,{\rm Hz})
\]
is identified as the best practical compromise within that analysis [2408.03040].

LBS outputs also interface with external Bayesian analysis software. In the Cosmoglobe/Commander3 feasibility study, the simulations analyzed are first-generation TOD produced by LBS via its map-based simulation module [2507.05324]. LBS generates HDF5 TOD products that are converted into Commander3-compatible format, ingested, compressed in memory using Huffman compression, and analyzed with Gibbs sampling [2507.05324]. The study treats this as the first non-LBS application of these TOD simulations and uses it to verify that the simulations can be readily used by external codes [2507.05324].

The computational estimates from that work quantify the scale of full Bayesian end-to-end analysis. For the reduced data set analyzed there, the uncompressed TOD volume is 1.55 TB and the compressed volume is 470 GB; extrapolated to the full three-year mission, the corresponding estimates are 238 TB and 70 TB [2507.05324]. The full-mission estimate for one Gibbs sample is approximately 3000 CPU hours, implying about 3 million CPU-hours for a 1000-sample production run [2507.05324]. The study concludes that such requirements are within the capabilities of future high-performance computing systems, but it also emphasizes that the current simulations are based on an ideal instrument model and include only correlated \(1/f\) noise [2507.05324].

Future development directions are stated explicitly across the LBS literature. Planned extensions include the full focal plane, the full three-year mission duration, and additional instrumental systematics such as gain drifts, downtime, cosmic-ray impacts, beam systematics, and HWP systematics [2507.07122]. The framework paper notes that realistic HWP simulators exist in later versions beyond 0.11.0 [2507.04918], while the Bayesian feasibility study identifies half-wave plate non-idealities, gain fluctuations, beam modeling, sidelobe modeling, and more complicated foreground components as required future additions for a fully realistic mission analysis [2507.05324]. A plausible implication is that LBS is intended to evolve from a mission simulation framework into the principal environment for continuous cross-validation between instrument design, data analysis, and cosmological inference.

Source: https://www.emergentmind.com/topics/litebird-simulation-framework-lbs