Marginal value of unused time below a Raman frame cap (source code)

= Marginal value of unused time below a Raman frame cap
{title2=$-dV/dW$}

The \b[marginal value of unused time below a Raman frame cap] measures how the optimum predicted Raman ratio <variance> changes with the allowed acquisition budget. Hold the pair count $n$, readout time $d$ and per-frame exposure cap $c$ fixed. Put $H=nc$ and $T=W-2nd>0$. The <wall-clock slack in saturation-limited Raman frame allocation> becomes positive once $T>2H$; additional budget then cannot increase exposure at that pair count.

For shot-noise coefficients $\alpha>\beta>0$, define $K=(\sqrt\alpha+\sqrt\beta)^2$. The unconstrained on fraction is $p=\sqrt\alpha/(\sqrt\alpha+\sqrt\beta)$. It reaches its cap when $T=H/p$. The minimized <variance> is therefore
$$
V(T)=\begin{cases}
K/T,&0<T\leq H/p,\\
\alpha/H+\beta/(T-H),&H/p<T<2H,\\
(\alpha+\beta)/H,&T\geq2H.
\end{cases}
$$
This follows by using the unconstrained ratio, then holding the weaker on state at its cap while extending the off state, and finally holding both at their caps.

Away from the transition points, the positive marginal improvement per extra wall-clock second is
$$
-\frac{dV}{dW}=\begin{cases}
K/T^2,&T<H/p,\\
\beta/(T-H)^2,&H/p<T<2H,\\
0,&T>2H.
\end{cases}
$$
The slope agrees on both sides of the first transition. At the final cap it changes to zero, because new time is unused.

For an original example, choose $n=2$, $c=0.10\,\mathrm s$, $d=0.010\,\mathrm s$, $\alpha=4\times10^{-6}\,\mathrm s$ and $\beta=10^{-6}\,\mathrm s$. The wall-clock transitions are $0.34$ and $0.44\,\mathrm s$:
$$
\begin{array}{c|c|c}
W\ (\mathrm s)&10^6V&10^6(-dV/dW)\ (\mathrm{s^{-1}})\\\hline
0.29&36.0000&144.0000\\
0.39&26.6667&44.4444\\
0.49&25.0000&0
\end{array}
$$
At the last setting, $0.05\,\mathrm s$ is slack. Optimizing the pair count as well introduces <frame-count switching in Raman acquisition-budget sensitivity>; the fixed-count slopes above need not describe that full integer optimization.

The primary Raman experiment capped exposures to avoid saturation and used shuttered readout between pump states.<Femtosecond Broadband Stimulated Raman: A New Approach for High-Performance Vibrational Spectroscopy by David W. McCamant and others>[Data Collection, exposure limit and shutter sequence preceding equation 4]{ref} The numerical timings here are illustrative. These marginal values concern the stated noise objective, without additional drift, read-noise or switching-cadence costs.