Visibility-domain matched filter (source code)

= Visibility-domain matched filter
{title2=$\widehat a=\frac{\operatorname{Re}(T^\dagger C^{-1}d)}{T^\dagger C^{-1}T}$}

For data $d=aT+n$, known complex source template $T$, real amplitude $a$, and known noise covariance $C$, generalized least squares gives the displayed amplitude. This convention takes $C$ in the quadratic objective $(d-aT)^\dagger C^{-1}(d-aT)$; factors of two in the amplitude <variance> depend on whether complex-component or real-component covariance is used. Source position, shape and contaminants must be fitted or marginalized when uncertain. An extended-source <complex visibility> template accounts for resolved-out flux rather than assuming the source is unresolved.