# Maths background¶

## Statistical distribution of visibilities¶

We will consider only a single channel. Let \(e^k\) be the electric field at source \(k\) and \(J_p^k\) be the Jones matrix representing all effects (direction-dependent and -independent) for antenna \(p\) and source \(k\) (in general, we will use superscripts for sources and subscripts for antennas). Each antenna will also experience thermal noise, which we’ll denote as \(n_p\). The channelised voltage \(v_p\) then satisfies

We can break these terms into scalars with separate variables for the real and imaginary components. Let

The covariance matrix of these elements has some important properties:

Different sources are assumed to be uncorrelated. This in turn means that \(J_p^k e^k\) and \(J_q^l e^l\) are also uncorrelated.

Noise terms are assumed to be uncorrelated with everything.

Applying the same phase shift to all voltages does not affect the distribution (i.e., it is circular). From this it can be deduced that \(E[a_p] = E[b_p] = 0\), \(E[(a_p^j)^2] = E[(b_p^j)^2]\) and \(E[a_p^jb_p^j] = 0\) (and similarly for \(c\) and \(d\)); and \(E[a_pa_q] = E[b_pb_q]\), \(E[a_pb_q] = -E[b_pa_q]\), and similarly for cross-hand terms.

The visibility matrix for antennas \(p\) and \(q\) is

This matrix is then accumulated \(N\) times. Assuming \(N\) is large, the sum will behave like a multi-variate Gaussian distribution, and thus to generate samples it is sufficient to know the mean and covariance matrix for the 8 terms.

Expanding to a sum of sources, most terms disappear under the assumptions of independence, giving an expected value of

The terms in this sum are exactly the source coherencies, and can be predicted from the RIME [rime], with the exception of the noise power that appears in the autocorrelations. Using the expectation identities listed earlier, we can also simplify this to

It’s important to note that it is only the *expectations* that are equivalent
to the previous formula; the values inside the expectations are not the same
for particular samples of the random variables.

Next, let us compute variance for the visibility matrix, using Isserlis’ Theorem:

The expectations in this expression all appear in the visibility matrix itself. Variances for the other seven terms can be computed similarly by substituting \((b_p, -a_p)\), \((c_p, d_p)\) or \((d_p, -c_p)\) in place of \((a_p, b_p)\) and the same for \(q\). The covariance between real and imaginary parts can be computed similarly:

For now we omit covariances between polarizations and between baselines and treat them as zero. While incorrect, these covariances currently have no effect on ingest (it may eventually have an effect if flagging is done jointly across polarisations).

- rime
Smirnov, O.M. Revisiting the radio interferometer measurement equation. I. A full-sky Jones formalism. A&A 527 A106 (2011).