Quadratic baseline curvature in gated energy integration (source code)

= Quadratic baseline curvature in gated energy integration
{title2=$b(t)=b_0+b_1t+b_2t^2$}

\b[Quadratic baseline curvature in gated energy integration] describes a baseline whose second time derivative is nonzero over the measurement gate. Averaging only its two endpoint values is exact for a linear baseline but generally not a quadratic one. The <baseline-drift bias in pulse-energy integration> article derives the resulting endpoint-subtraction error.

A focused correction follows from <Simpson's rule>. For a quadratic baseline on $[0,T]$,
$$
\int_0^T b(t)\,dt=\frac T6\left[b(0)+4b(T/2)+b(T)\right].
$$
For an original example, take $T=12\,\mathrm{\mu s}$ and baseline readings $10,11,14\,\mathrm{mW}$ at the beginning, midpoint and end. The integrated baseline is $0.136\,\mathrm{\mu J}$. Endpoint averaging would instead subtract $0.144\,\mathrm{\mu J}$, biasing the inferred signal by $-8\,\mathrm{nJ}$.

This <Simpson baseline integration for pulse-energy correction> needs a genuine baseline at the midpoint. A sample taken during the pulse contains signal as well as background. A separate matched blank run or independently characterized reference can supply additional information; treating a contaminated pulse sample as baseline does not improve the correction. If the midpoint estimate is biased by $\Delta b$, the Simpson integral is biased by $2T\Delta b/3$.

Historical NIST measurements used before/after baselines and averaged them for background and thermal-drift compensation.<Calibration Service for Low-level Pulsed-Laser Radiometers at 1.06 µm: Pulse Energy and Peak Power by Rodney W. Leonhardt>[§3.5; §7.2, Leakage Effect]{ref} The three-point quadratic example is an independent mathematical extension, not a description of that apparatus's processing.