# Phase Correction Algorithms

On this page, we describe what the phase correction algorithms set out to do and the framework we have developed to optimally use all of the available information. Information about why we need to correct phase fluctuations for ALMA and the WVRs themselves can be found here.

Essentially, the problem is simple, we need to determine the most
likely change in path length from a given variation in the sky
brightness measured by the WVRs. However, we want to use all of the
available information *optimally*. We are developing a *Bayesian* framework to combine all
the information we have about the current and future meterological
conditions (which are naturally accommodated as priors in a Bayesian scheme) with detailed
physical models of the atmosphere.

We initiated this framework by looking at the SMA test data (see our WVR page) with a simple model atmosphere:

- Water vapour constrained to a single thin layer
- Atmosphere fully constrained by three parameters: pressure (
*p*), temperature (*T*) and column of water vapour (*c*)

The maximum likelihood model was determined using a Markov Chain Monte
Carlo alogirthm to explore the parameter space. The full details are
presented in ALMA Memo 587 (Nikolic 2008). Fig. 1 shows an
example of the joint distributions of two of three model parameteres
with the third one marginalized, for a low-elevation SMA
observation. This demonstrates the degeneracy between *p* and *T* and
*p* and *c* in the model.

Figure 1: Joint posterior distribution of a combination of two of the three parameters with the third marginalized.

In Fig. 2 we show the optimal path estimates from the Bayesian scheme (in blue, righthand side) compared to the measured interferometer paths (in red). The lefthand side shows the estimated paths from least-squares model fitting (see the SMA tests page).

Figure 2: Optimal path estimates from the Bayesian framework (righthand side, blue) compared to the measured path using the interferometer (red) and simple least-squares model fitting (lefthand side, blue). The residual RMS path has been reduced from 74 to 71 microns in the new framework.

We are currently extending and enhancing this framework, exploring more sophisticated atmospheric models and different samplers.

## Future developments

To refine and test our algorithms we crucially depend on real test data from ALMA , on a range of baselines and under varying weather conditions. In July 2009, we will be making our first field trip to the ALMA site to gather interferometric test data using production WVRs on ALMA antennas.