# The modelled pipeline For every segment the modelled pipeline fits two single-link noise spectra, the test-mass acceleration noise (TMA) and the optical metrology noise (OMS), and propagates them through the TDI-2 transfer functions to the XYZ covariance $$ C(f) = S_\mathrm{tma}(f)\, \bar{K}_\mathrm{tma}(f) + S_\mathrm{oms}(f)\, \bar{K}_\mathrm{oms}(f) , $$ where the averaged kernels $\bar{K}$ are fixed by the light travel times of the segment (see Eq. (19) in [Noisy Pipelines I](https://arxiv.org/abs/2610.28726)). The light travel times are read from the processed file via [MojitoProcessor](https://github.com/OllieBurke/MojitoProcessor). ## Stages 1. **Load** the segment and crop its FFT to the science band. 2. **Knots.** Each PSD is a cubic spline in log10 PSD against log10 frequency. The knots start at a parametric instrument model (`modelled.instrument`): the TMA knots are concentrated around the turning point of its PSD, the OMS knots are evenly spaced in log frequency. One fixed knot either side of the band anchors each spline; beyond them the PSDs follow the parametric shape. 3. **Data model.** The instrument covariance is passed through the same conditioning as the data: the filter and decimation response, then the taper convolution (both below). The filtering, decimation and windowing properties are read from the processed file. 4. **Prior.** Uniform in each knot value, `prior.width_dex` wide and centred on its starting value. 5. **Null mask** (optional): bins around the TDI nulls are left out of the likelihood. 6. **Inference** with the Whittle likelihood of the three channels: either `mle`, a multi-start L-BFGS-B optimisation, or `mcmc`, the eryn parallel-tempered ensemble sampler. 7. **Write** the best fit, any samples, and everything needed to rebuild the covariance (see [](results.md)). ## Windowed (taper-convolved) covariance See Sec III. C of [Noisy Pipelines I](https://arxiv.org/abs/2610.28726). The processed segments are tapered (Tukey, α = 0.025 by default) before the FFT. The exact variance of each frequency bin of tapered data is the circular convolution of the model covariance with the squared spectral window (Burke et al., "[Mind the second gap](https://arxiv.org/abs/2609.31550)", Eq. 91), applied entry-wise to the 3×3 XYZ cross-spectral matrix. This is what the likelihood uses when ```yaml modelled: windowed_covariance: enabled: true # default method: "patches" # or "exact" patch_tol: 1.0e-5 kernel_tol: 1.0e-10 window_kwargs: null # read from /pipeline_params/window in the data file ``` `method: exact` convolves the whole band by FFT on every likelihood call. `method: patches` (default) does so only on the regions where leakage reshapes the covariance — the TDI transfer nulls and the steep low-frequency band edge, located at set-up from the exact convolution of the seed model — and scales the covariance by `mean(w²)` elsewhere, where the two agree to better than `patch_tol`. The pipeline logs the patches and the maximum deviation from the exact convolution at the seed. This is for computational efficiency. If gaps are placed in the data, and the gaps are frequent, we suggest setting `method: exact`. The covariance returned by `get_XYZ_inst_cov` (the model from `model_from_result`) remains the untapered instrument covariance; `get_XYZ_cov` (the model from `data_model_from_result`) gives the conditioned, taper-convolved one a result was fit with (`lisa-noise-verify` overlays it automatically). Fitted PSDs are higher by `mean(w²)` (≈ 1.6 % for α = 0.025) than fits made without the window, which absorbed the taper's power loss into the spectrum. ## Geometry drift and the null mask See Sec III. B of [Noisy Pipelines I](https://arxiv.org/abs/2610.28726). The arm lengths change by a few 1e-4 over a 7-day segment, which moves the TDI transfer nulls by tens of frequency bins. A geometry frozen at the segment start therefore mis-places the nulls even with the windowed covariance. With ```yaml modelled: geometry: n_ltt_epochs: 8 ``` (the default) the frozen TDI kernels are averaged over that many epochs spread across the segment, i.e. the model is the time-averaged spectrum of the drifting geometry. The averaging is parameter-independent, so it costs nothing per likelihood call; `n_ltt_epochs: 1` recovers the geometry at the segment start only. With the windowed covariance and the averaged geometry the whitened residuals are statistically consistent through the nulls, and the null mask can be switched off with `modelled.mask.enabled: false`: the bins around the nulls carry about 1 % of the information on any knot, so masking them changes no inferred parameter beyond its uncertainty, and leaving them in removes a threshold-dependent step. The mask remains essential for the untapered covariance or a geometry frozen at the segment start. ## Filter and decimation response See Eq.(21) and Eq.(22) of [Noisy Pipelines I](https://arxiv.org/abs/2610.28726). MojitoProcessor high-passes (or band-passes) the record with a zero-phase Butterworth filter and, optionally, decimates it with a Kaiser-windowed FIR (`scipy.signal.resample_poly`) before cutting and tapering the segments. Both are linear and time invariant, so on a stationary process they multiply the covariance by a known, channel-independent factor `R(f) = |H_bw(f)|⁴ |H_fir(f)|²` (the fourth power because the Butterworth is applied forwards and backwards), and the decimation to `fs_out` folds the power above `fs_out / 2` back into the band: ``` C_data(f) = k ⊛ [ R(f) C(f) + Σ_{k≠0} R(|f + k fs_out|) C(|f + k fs_out|) ] ``` With ```yaml modelled: conditioning_response: enabled: true ``` (the default) the filter and decimation settings are read from `/pipeline_params` of the processed file (the Level-1 rate is inferred from the raw light-travel-time samples stored alongside) and both effects are folded into the frozen TDI kernels at set-up; the per-call cost of the likelihood is unchanged. The aliased power is evaluated with the fitted splines where its source frequency lies inside the knot range and with the parametric seed shape beyond the upper ghost knot. `get_XYZ_inst_cov` still returns the instrument covariance; `get_XYZ_cov` returns the conditioned and tapered one. If the data are decimated so that the new Nyquist frequency is the top of the science band, the top of the band lies in the transition band of the anti-alias filter (`R = 0.25` at Nyquist from the FIR alone) and aliased power fills the bottom of the nulls. Both are modelled, but the aliased power is then taken from the parametric shape above the band, so the fit relies on the true spectrum being close to it there. Keeping the decimated Nyquist frequency well above the science band avoids this.