%-----------------------------------------------------------------------
%;  Copyright (C) 1995
%;  Associated Universities, Inc. Washington DC, USA.
%;
%;  This program is free software; you can redistribute it and/or
%;  modify it under the terms of the GNU General Public License as
%;  published by the Free Software Foundation; either version 2 of
%;  the License, or (at your option) any later version.
%;
%;  This program is distributed in the hope that it will be useful,
%;  but WITHOUT ANY WARRANTY; without even the implied warranty of
%;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%;  GNU General Public License for more details.
%;
%;  You should have received a copy of the GNU General Public
%;  License along with this program; if not, write to the Free
%;  Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,
%;  MA 02139, USA.
%;
%;  Correspondence concerning AIPS should be addressed as follows:
%;          Internet email: aipsmail@nrao.edu.
%;          Postal address: AIPS Project Office
%;                          National Radio Astronomy Observatory
%;                          520 Edgemont Road
%;                          Charlottesville, VA 22903-2475 USA
%-----------------------------------------------------------------------
\documentstyle{article}
\begin{document}
\begin{center}
   {\LARGE Polarization Calibration of VLBI Data \par} {\large W. D.
Cotton, N.R.A.O. \par} {\large 9 June 1992 \par}

\end{center}
\vskip 20pt
\centerline{\bf ABSTRACT}
\vskip 1em
\begin{quotation}
   This document discusses several techniques for the calibration of
the polarized response of radio interferometers.  Special attention is
paid to the problems of Very Long Baseline Interferometers but the
results are applicable to short baseline interferometers.  A
linearized model of feed response and the ellipticity -- orientation
model are discussed.  The interaction between phase calibration and
polarization calibration is considered as is the effect of spatial
resolution of the polarization calibrators.  A suggested calibration
procedure is outlined.
\end{quotation}
\vskip 20pt
\section{Introduction}

   The purpose of this document is to describe various aspects of the
calibration of interferometric data sensitive to the structure of
radio sources in polarized light.  This discussion follows the
development of Cotton 1989. A good discussion of polarization in the
context of radio interferometry is given in Fomalont and Wright 1974.
The methods described in this document are implemented in the NRAO
AIPS data analysis package as an option in the standard polarization
calibration; most notably the task PCAL.

   Polarization sensitive measurements are usually (but not always)
made by cross correlating signals from pairs of detectors sensitive to
orthogonal polarizations.  For historical reasons these detectors will
be referred to as feeds.  In the following, the discussion will be
limited to the case of feeds nominally sensitive to right and left
circular polarization.  In this case, the relationship between the
measured correlations and the correlations of the Stokes' $i$, $q$,
$u$ and $v$ values are:

$$ i = 0.5 \times (RR + LL) $$
$$ q = 0.5 \times (RL + LR) $$
$$ u = 0.5 \times \sqrt{-1}(LR - RL)$$
$$ v = 0.5 \times (RR - LL) $$

$RR$, $LL$, $RL$, and $LR$ represent the correlations derived from the
various combinations of right ($R$) and left ($L$) circular feeds.
$RR$ and $LL$ will be referred to as parallel polarized correlations
and $RL$ and $LR$ as cross polarized.  $I$, $Q$, $U$ and $V$ will be
used to represent the Stokes' parameters of the derived image.
Alternately, the observed correlations are related to the Stokes'
parameters by:

$$ RR = i + v $$ $$ LL = i - v $$ $$ RL = q + \sqrt{-1} u $$ $$ LR = q
- \sqrt{-1} u $$

   The calibration of polarization sensitive data involves two
distinct steps: 1) the determination of the true instrumental feed
response and the correction of the data to what would have been
observed with perfect feeds and 2) correction of the apparent
polarization angle (the angle of the apparent E-vectors of the
polarized radiation on the sky) to the correct value at the top of the
atmosphere.

   The first step is necessary because any feed will have
imperfections, i.e. will respond to signals with polarizations other
that the intended one.  There are two basic approaches to this
problem, 1) model the feed as sensitive to elliptical radiation or 2)
model the feed as sensitive to the desired polarization plus a complex
factor times the orthogonal polarization.  The first approach is
relatively general but is strongly non linear and therefore
computationally expensive. The second method can be easily linearized
and therefore cheaper to compute but in this case is adequate only for
nearly perfect feeds.

   Calibration of the polarization angle is necessary for a number of
reasons.  The usual phase calibration schemes adjust the systems of
parallel hand feeds to internally consistent values but allow an
arbitrary phase difference between the two parallel hand systems.
This converts directly into an arbitrary, but constant, rotation of
the apparent orientation of the E-vectors on the sky.  The other
problem is that the propagation of the signal through the magnetized
plasma of the ionosphere will cause an apparent rotation of the
E-vectors.  This effect, when significant, can be quite variable with
time and observing geometry.

\section {Interaction with Total Intensity Calibration}

   In practice, the response of an interferometer is modified by the
earth's atmosphere and the instrument itself.  The effects on
amplitude, phase, etc. should be determined simultaneously with the
parameters needed to describe the response to polarized signals.
However, if the feeds are nominally sensitive to right and left
circular polarization and weakly circularly polarized calibrator
sources are used, then amplitude, phase, delay and rate corrections
can be determined from the measurements obtained using the parallel
polarized systems of feeds and applied to the data before determining
the polarization parameters.  This method will break down if the feeds
depart too much from circular or the calibrators have significantly
circular polarization.  Fortunately, these conditions are met for a
large range of circumstances.

   If amplitude and phase calibration is applied before determining
the polarization parameters the details of the calibration process
will affect the detailed model of the response to a polarized signal.

\subsection {Phase}
   The best example of the interaction between phase calibration and
polarization calibration is the effect of parallactic angle.  Fixed
feeds on an antenna with an altitude-azimuth (alt-az) mount will
appear to rotate with time as viewed from the source.  This apparent
orientation of the feed is called the parallactic angle.  For circular
feeds the effect of the parallactic angle on the parallel polarized
correlations is to rotate the phases by the difference in the
parallactic angles of the two antennas involved.  Cross polarized
correlations have their phases rotated by the sum of the parallactic
angles.  If a correction for the parallactic angle is not made to the
data before phase calibration, the phase calibration process will
include the parallactic angle of the phase reference antenna in the
calibration phases.  Since the effect of parallactic angle is different for
parallel and cross polarized data, the parallactic angle of the
reference antenna must be known to determine and apply corrections for
the instrumental polarization. Since the parallactic angle of the
reference antenna, or even the reference antenna itself, is a function
of time, this leads to a messy bookkeeping problem.  An alternate
approach to phase calibration is to correct the phases of the data for
the effects of parallactic angle before phase calibration.  Since this
correction is a function only of geometry it is easily computed.  In
either of these cases the model used to determine to polarization
characteristics must reflect what has been done about the parallactic
angles.

   A similar problem arises with modeling the feeds as sensitive to
elliptically polarized signals.  In this case the phases of the
correlations are rotated by the orientation of the feed of the
reference antenna in a manner similar to that for parallactic angle.
The principle differences are that this angle is constant in time but
unknown prior to calibration.  The difficulty here is that the
same reference antenna may not be used for all observations; a common
situation in VLBI observations is that no antenna
participates in all observations.  In this case, either the phase
calibration of all the data must be referred to the same reference
antenna, even at times when it was not used, or the reference antenna
used for each datum must be known.

   During phase calibration the phases must all be referred
to the same antenna for another reason.  In the calibration of the
orientation of the E-vectors it is usually assumed that the two
orthogonal phases systems are internally consistent and only differ by
a constant phase (ignoring the possibility of ionospheric Faraday
rotation).  This will only be true if the phases are all referred to
the same antenna and thus the phase difference between the orthogonal
systems is the one for that antenna.  This may require referencing
phases etc. to an antenna at times for which it was not observing the
source.

   The bookkeeping problems in polarization calibration are greatly
simplified if the phases of the data are corrected for parallactic
angle before phase calibration. All following discussion will assume
that this has been done and that all phases are referred to the same
reference antenna.

\subsection {Delays and Rates}

   Since delays and rates are simply the frequency and time
derivatives of phase, calibration of residual delay and rate errors
will be similar to that of residual phase errors.  Since the right and
left hand systems involve substantially different electronics and
cabling, there may be  a delay difference between these two systems.
Properly functioning phase cal measurements will remove these
differences.  However, the phase cals used with MkIII observations
cannot correct single-band delays as they only involve no more that a
single tone per IF.  If no phase cals are available then there may be
an offset in the multi-band delays and in  each of the single-band
delays between the right and left hand systems.
Since the usual method of residual delay error
calibration is to measure the differences from a reference antenna,
the derived delay corrections must all be referred to the same
antenna for the entire  dataset if there is to be a constant set of
delay residual offsets between the two systems.  If there is a
constant set of delay residual offsets for the data set then these
offsets can be estimated from a single calibrator observation on a
single baseline.

   The antenna electronics should be sufficiently stable that the time
derivatives of any right-left differences, i.e. rates, should be very
small.  If this is not the case then the data is not sufficiently
coherent to be calibrated.  The following will ignore any right-left
rate differences.

\subsection {Amplitude}

   Amplitude calibration, if done prior to polarization calibration,
may also affect the polarization calibration.  The usual assumption in
the amplitude calibration stage is that the calibrators have no
circular polarization and the feeds are perfectly circularly
polarized.  Errors in these assumptions will cause the addition of
vectors to the measured correlations.  Since these errors are additive
they will not factorize into antenna components and will appear partly
as baseline dependent amplitude errors.  If these errors are small
they may be ignored.  If they are large then several iterations of
amplitude and polarization calibration using the
ellipticity-orientation model may be necessary.
\vfil\eject

\section {Source Resolution}

   One of the many complications of polarization calibration is that
the very compact sources suitable for phase and polarization
calibration are frequently variable in both total intensity and
polarized emission.  This means that the polarization of the
calibrators must be determined simultaneously with the instrumental
polarization.  Fortunately, alt-az mounts cause the contribution to
the measured correlations due to the polarized emission from the
source to rotate with parallactic angle whereas the instrumental
contribution is constant.  Hence, if observations are made with a
range of parallactic angle, source polarization may be separated from
instrumental polarization.

   This process is simple enough if the source is spatially
unresolved; a value of Q and U for the source is sufficient.  If the
source is resolved then the spatial distribution of the polarized
emission must be known or determined.  At typical VLBI resolutions
there are no completely unresolved calibrators and this problem
becomes fairly serious.

   One way of relaxing the requirement that the calibrator be
unresolved is to assume that the polarized emission is a scaled
version of the total intensity with a constant orientation of the
E-vectors.  In this case, the only free parameters are the source
fractional Q and U.  Unfortunately, this is usually a rather poor
assumption; the peak polarized emission is frequently not coincident
with the peak total intensity and the orientation of the E-vectors may
vary dramatically.  However, for a completely unpolarized calibrator
this approximation is completely adequate and most potential
calibrators are weakly polarized.  In this case it is possible to
initially solve for the source plus polarization parameters, image the
calibrator in polarized emission and then iteratively use the
deconvolved model to refine the determination of the instrumental
polarization parameters.

\section {Models of the Feed Response}

   The response of the feeds is usually represented by a model
characterized by a small number of parameters.  Two such models are
discussed in this section.

\subsection {Ellipticity - Orientation Model}

   A general model for the feed response is to assume that the feed
responds to elliptical polarization and is characterized by the
ellipticity and orientation of the ellipse.  Following Fomalont and
Wright 1974 we will parameterize the response of a feed to the
electric field as:
$$ {\bf G} = {\bf e} _x [\cos (\theta )\cos (\phi
+\chi ) - i \sin (\theta )\sin (\phi +\chi )] + {\bf e} _y [\cos
(\theta ) \sin (\phi + \chi ) + i \sin (\theta )\cos (\phi + \chi )]
$$

%\hbox to \hsize{\hfil\vbox{\halign {\lft{#}{#\hfill}
where ${\bf e}_x$ and ${\bf e}_y$ are unit vectors, $\theta\,$ is the
feed ellipticity, $\phi\,$ is the orientation of the ellipse $i =
\sqrt{-1}$ and $\chi\,$ the parallactic angle given for an alt-az
mounted antenna by:
\footnote{Actual computation of the parallactic angle should involve a
two argument arctangent function to resolve the quadrant ambiguities.}
%}}\hfil}
  $$\chi = \tan^{-1} \left({{\cos (lat) \sin (ha)} \over {\sin (lat)
\cos (dec) -\cos (lat) \sin (dec) \cos (ha)}}\right) $$
%\hbox to \hsize{\hfil\vbox{\halign {\lft{#}{#\hfill}
where $lat$ is the antenna latitude, $dec$ is the declination of the
source and $ha$ is the hour angle of the source.
%}}\hfil


   The response of a given interferometer including the effects of
phase calibration can be written as the following:
$$ F^{obs}_{jk} = g_j g_k^*\{RR_{jk}[(\cos \theta_j +
\sin\theta_j)e^{-i(\phi_j+\chi_j)}] \times [(\cos \theta_k + \sin \theta_k)
e^{i(\phi_k+\chi_k)}] $$
$$ + RL_{jk}[(\cos \theta_j + \sin \theta_j)
e^{-i(\phi_j+\chi_j)}] \times [(\cos \theta_k - \sin \theta_k)
e^{-i(\phi_k+\chi_k)}]$$
$$ + LR_{jk}[(\cos \theta_j - \sin \theta_j)
e^{ i(\phi_j+\chi_j)}] \times [(\cos \theta_k + \sin \theta_k) e^{
i(\phi_k+\chi_k)}]$$
$$ + LL_{jk}[(\cos \theta_j - \sin \theta_j) e^{
i(\phi_j+\chi_j)}] \times [(\cos \theta_k - \sin \theta_k)
e^{-i(\phi_k+\chi_2)}]\} $$
where the effects of phase calibration are
given by $g_R = e^{-i(-\chi - \phi_R + \phi_{Rref})}$ and $g_L = e^{
i(-\chi - \phi_L +
\phi_{Lref} + \phi_{R-L})}$, $\phi_{R-L} = $ Right - Left phase
difference, $RR_{jk}$, $LL_{jk}$, $RL_{jk}$ and $LR_{jk}$ are the
responses of interferometers with perfect right and left circular
feeds to the source polarization.
A least squares fit of the parameters of this model to data will
require the partial derivatives of the above relation.  These partial
derivatives are given in Appendix A.


   To include the effects of source resolution the values of
$RR_{jk}$, $LL_{jk}$, $RL_{jk}$ and $LR_{jk}$ can be determined from
the observed total intensity, $0.5(RR_{jk}+LL_{jk})$, and fractional
$Q$, $U$ and $V$ values.

   The determined corrections can be applied by making use of the
matrix relationship between the polarization vectors: $$ F^{obs}_{jk}
= M_{jk} F^{true}_{jk}$$ where $F^{obs}$ are the observed stokes
correlations and the $F^{true}$ are the true values.  This
relationship can be inverted to determine the corrected Stokes'
correlation vector: $$ F^{corr}_{jk} = M_{jk}^{-1} F^{obs}_{jk}$$

%     The Fortran source is in PCAL.FOR routines IPCALC and FG.


\subsection {Linearized Model}

   For nearly perfect feeds and weakly polarized calibrators it is
possible to model the response of the feeds with a ``leakage'' term:


$$ R_{k} = G_{kR} e^{i(\chi_k)}\, (E_{R} e^{-i \chi_k} + D_{kR} E_L
e^{i \chi_k}) $$
$$ L_{k} = G_{kL} e^{-i(\chi_k)}\, (E_{L} e^{i
\chi_k} + D_{kL} E_R e^{-i \chi_k}) $$
%\hbox to \hsize{\hfil\vbox{\halign {\lft{#}{#\hfill}
where $E_R$ and $E_L$ are the electric field strengths of the right
and left hand polarizations and $G_{kR}$ and $G_{kL}$ are the complex
gains needed to calibrate the amplitude and phase of the right and
left circularly polarized feeds.
%}}\hfil}

   In the case of nearly perfect feeds and weakly polarized sources,
second
order terms in $D$ and terms involving the product of $D$ and
polarized emission can be ignored leaving a linear expression in $D$
and source polarization.  If the approximations of no circular
polarizations and similar total intensity and polarized structure is
made then the response will be approximated by:

%     RL/II       = ((Q+iU)/II) + DRa*exp(-i*2*chia) +
%                   conj(DLb)*exp(-i*2*chib)
%     conj(LR/II) = ((Q+iU)/conj(II))+ DRb*exp(-i*2*chib) +
%                   conj(DLa)*exp(-i*2*chia)
%
%     where II = 0.5*(RR+LL), chia, chib are the parallactic angles of
%     antennas a and b and DLx and DRx are the instrumental parameters.
%
$$ {RL^{obs}_{jk}\over {II}} = {(Q + iU)\over {II}} + D_{jR} \,
e^{-2i\chi_j} + D^*_{kL}\, e^{-2i\chi_k}$$
$$ \left({LR^{obs}_{jk}\over {II}}\right)^* = {(Q + iU)\over{II^*}} +
D_{kR} \, e^{-2i\chi_k} + D^*_{jL}\, e^{-2\chi_j}$$
where $II = 0.5(RR_{jk}+LL_{jk})$.
A least squares fit of the parameters of this model to data will
require the partial derivatives of this relation.  These partial
derivatives are given in Appendix B.

Using this model and data which has been amplitude and phase
calibrated as described above, the two complex parameters $D_R$ and
$D_L$ needed to describe each feed pair can be determined.  To first
order the observed values can then be corrected:

$$ RL^{corr}_{jk} = RL^{obs}_{jk} - RR^{obs}_{jk}
D^*_{kL}e^{-2i\chi_k} - LL^{obs}_{jk} D_{jR}e^{-2i\chi_j} $$ $$
LR^{corr}_{jk} = LR^{obs}_{jk} - RR^{obs}_{jk} D_{jL}e^{2i\chi_j} -
LL^{obs}_{jk} D^*_{kR}e^{2i\chi_k} $$

Since corrections to $RR_{jk}$ and $LL_{jk}$ depend only on the higher
order terms ignored in the determination of the $D$ terms they cannot
be corrected using this approximation.  This model can be used to
correct $RR$ and $LL$ and improve its usefulness for feeds which are
significantly non circular by including the higher order terms in
source and antenna polarization when solving for the model.
Unfortunately this causes the solutions to be nonlinear.

\section{Ionospheric Faraday Rotation}

   During times of enhanced solar activity, Faraday rotation in the
ionosphere may be significant, especially at lower frequencies (see
Cotton 1989).  Faraday rotation is a rotation of the apparent
orientation of the linear polarization and will therefore change the
right-left phase difference.

   The exact amount of Faraday rotation depends on the integral of the
product of the electron density and the component of the magnetic
field which is parallel to the line of sight.  This will cause strong
variations of the Faraday rotation with the observing geometry.  The
electron density in the ionosphere has strong diurnal variations due
to the variable exposure to the ionizing radiation (both photon and
charged particle) from the sun.

   The effects of Faraday rotation will therefore differ among
sources observed at the same time but with different celestial
positions and will vary with time for a given source.  This will cause
a variable right-left phase difference.  Since this phase difference
is not constant it can result in bogus estimates of the polarization
parameters and can severely defocus the polarized image.

   The amount of Faraday rotation can be estimated from a model of the
ionosphere and the earth's magnetic field.  The magnetic field is only
weakly variable (in human experience but geological evidence says
otherwise) but the electron density is strongly variable.  The
electron density may be estimated from a model based on solar activity
as parameterized by mean sunspot number (Chiu 1975) of by direct
measurement by one of a number of methods.

   There are several possible techniques for correcting for Faraday
rotation. Since the effects of Faraday rotation are similar to that of
parallactic angle rotation, a correction for Faraday rotation can be
made in the determination of polarization parameters and the
application of calibration of the data by subtracting the Faraday
rotation from the parallactic angle and using this value as the
parallactic angle.  If this technique is used then the Faraday
rotation corrections must be included every time the parallactic angle
is used including the initial correction of the phases for the effects
of parallactic angle.

   In principle, Faraday rotation could be determined from
observations of a strongly polarized, unresolved source but in
practice estimates of Faraday rotation are usually derived from
external data.  This being the case, a simpler method of removing
Faraday rotation is to compute the effects once and adjust the
relative phases of the right and left hand systems before determining
or applying any corrections determined directly from the observations.
To the degree that the estimates of Faraday rotation are accurate this
should completely correct this effect.

\section{Calibration of the Orientation of the E-vectors}

The right and left handed systems of phases will be given an arbitrary
offset by the effects of the earth's atmosphere and the electronics of
the interferometer.  With proper calibration this phase difference can
be made the same for all data.  This phase difference will still
contain a component due to atmospheric and instrumental effects.  The
proper value for the right-left phase difference can only be
determined from observations of a source with known polarization
properties.  In the following discussion it will be assumed that the
polarization angle of the linear polarization integrated over the
entire source is known for one or more calibrator sources.

\vfil\eject

   The orientation of the polarization, i.e. the E-vectors of the
electric field of the radiation, is by definition given by:
$$\Phi = {1\over{2}} \tan^{-1} {Q\over{U}}.$$
Since $RL = q + iu$ it follows
that for a point source at the phase center the true right-left phase
difference after removing atmospheric and instrumental effects is:
$$\phi^{true}_{R-L} = 2\Phi.$$

\subsection{Unresolved Polarization Calibrator}

   If observations of a point source of known polarization
orientation were made, the correction to the right-left phase
difference can be determined by direct inspection of the calibrated
$RL$ (or $LR^*$) phases.  However, it may be desirable to incorporate
the right-left phase calibration into the normal phase calibration
process.  Unfortunately, phase calibration must be applied before the
application of polarization corrections.  This means that the
instrumental polarization parameters must be suitably modified for the
right-left phase correction.

   An alternative method of applying the right-left phase difference
is by suitable rotation of the polarization angles derived from the
$Q$ and $U$ images.  If the right-left phase difference is constant
this will result in a constant rotation of the apparent polarization
angle.  Thus,  the images in linear polarization will be correct except
for a constant rotation of the orientation of the polarization angle.

\subsection{Resolved Polarization Calibrator}

   It is frequently the case with VLBI observations that all
calibrators are resolved.  The observed $RL$ and $LR$ phases of a
resolved source (or one not at the phase center) will not have a
simple relation to the right-left phase difference and is therefore
not directly usable for calibration.  If the calibrator is unresolved
on a subset of the baselines and then the right-left phase difference
may be determined from these baselines.

   If the calibrator is too resolved, the data are too noisy or the
residual calibration errors are too high on the baselines for which
the source is unresolved then the correction to the right-left phase
difference must be determined from the derived image of the
calibrator.  This can be done using the integrated $Q$ and $U$ flux
density in the images (e.g. sum of the CLEAN components).  The
apparent, integrated polarization angle is given by:
$$\Phi = {1\over{2}} \tan^{-1} {\Sigma Q\over{\Sigma U}}.$$
A correction to the apparent polarization angle or right-left phase
difference can then be determined and then applied as in the unresolved
calibrator case.


\section{Imaging Considerations}
%(assymmteric sampling, complex beam deconvolution etc.)

   The usual imaging technique for linear polarization is to form $q$
and $u$ values from the observed $RL$ and $LR$ correlations and
separately image and deconvolve the $Q$ and $U$ images.
This inhibits the use of data for which only one of $RL$ or $LR$ are
available.  There are many reasons why only one of the cross polarized
correlations may be available but the impact may be fairly serious for
observations using VLBI techniques as the uv plane sampling is usually
rather sparse.  If sufficient data exist with both cross
polarized correlations then the traditional approach is adequate.

   Single cross polarized measurements may be used to form an image of
the linear polarization if a complex imaging and deconvolution of
$Q+iU$ is done.  In the aperture domain $RL$ and $LR$ sample
conjugate uv coordinates.  Since the $Q+iU$ image is complex its
Fourier transform is in general assymetric so $RL$ and $LR$ measure
different aspects of the source.  Conversely, if the sampling function
is assymetric (some measurements don't have both $RL$ and $LR$) then
the Fourier transform of the sampling function, the dirty beam, is
complex.   It is therefore possible to use assymetric sampling and
produce a $Q+iU$ complex image and complex beam.  A complex
deconvolution should result in a complex image for which the real part
represents the $Q$ emission from the sky and the imaginary part the
$U$ emission.  The CLEAN deconvolution algorithm is especially easily
adapted as all operations used have complex analogs.

\vfil\eject
\section{Suggested Method of Calibration}

   This section suggests a method of calibration and describes how
this is accomplished using AIPS tasks in the 15APR92 or later
releases.  In the examples of instructions to AIPS comments are given
in square brackets ([~]).

If the polarization of the calibrator sources is unknown then
the observations should include measurements of one or more
calibrator sources over a range of parallactic angles.  The
observations of these calibrators will be used to determine the
instrumental polarization parameters and should be calibrated in as
nearly as possible the same manner as the program sources.
The task LISTR can be used to examine the parallactic angles
observed using:
\par\noindent
$>$task='LISTR'; opty='GAIN'; inext='CL'; inver=0; dparm=9,0; go


\begin{enumerate}

\item Evaluation of phase cal.

   Multi IF VLBI data such as is obtained from the MkIII or VLBA
systems normally use a tone injected into the feed (or later in the
system) to measure the instrumental phase of the different parts of
the bandpass (IFs in AIPS).  These phase cal signals may or may not be
present for any antenna and/or IF and may have trouble.  AIPS task
MK3IN, if it determines that the phase cal is coherent leaves these
values as the phase in the CL table.  If MK3IN determines that there
was no phase cal present it blanks the CL table entries.  In this
latter case it is necessary to manually set the phase cals.  A listing
of the phase cal phases can be obtained using task LISTR by:
\par\noindent
$>$task='LISTR'; opty='GAIN'; inext='CL'; inver=0; dparm=1,0; go
\par\noindent
A graphical display can be obtained using task SNPLT:
\par\noindent
$>$task='SNPLT'; inext='CL', inver 0; bif=1; eif=0; opty='PHAS';
\par\noindent
$>$ opcode='PLIF'; go

   If some of the phase cals are missing or badly behaved they should
be set to zero using CLCOR and selecting the affected data:
\par\noindent
$>$task='CLCOR'; opcode='PCAL'; antenna=[list of antenna numbers];
\par\noindent
$>$ bif=[?]; eif=[?]; gainver=1; CLCORPRM=0; go
\par\noindent

   If valid phase cal phases are available they should be used as they
should remove time variations in the instrumental phase.  This may be
especially critical for maintaining a constant phase relationship
between the right and left handed systems.  If possible the reference
antenna should have good phase cal values.  The phase cals set to zero
will be set to appropriate values in a later step.

\vfil\eject
\item Check/correct antenna mount type.

   The mount type of each antenna determines the parallactic angle by
which the source polarization is rotated.  The mount type is stored in
the antenna (AN) table.  Usually the values are the default values
corresponding to alt-az mounts.  The values in the AN table can be
examined using PRTAN:
\par\noindent
$>$task='PRTAN'; inver 1; ncount=0; go

   If any of the mount types need to be changed this can be done using
verb TABPUT, first find the mount type column number and the row
numbers of the antennas to be changed:
\par\noindent
$>$task='PRTAB'; inext='AN'; inver=1; ncount=0; go
\par\noindent
Note the column number for the column labeled ``MNTSTA'' and the row
numbers of the antennas with incorrect mount types.  A table entry
can then be changed as follows (assuming the new mount is equatorial):
\par\noindent
$>$pixxy= [row no., column no., 1]; keyv=1,0; tabput
\par\noindent
It's a good idea to rerun PRTAN to be sure you've got it right.


\item A priori amplitude calibration.

   All data should have amplitude corrections applied using the usual
techniques employing system temperature, antenna gain measurements,
and calibrator source observations.  Amplitude calibration is done
using AIPS task ANCAL.  Since the procedures for amplitude calibration
differ little from those for single polarization VLBI data the reader
is referred to the EXPLAIN documentation for ANCAL.

\item Correction for parallactic angle.

   The phases of all data should be corrected for the effects of
parallactic angles.  If a copy of the CL table was not done in the
amplitude calibration step it should be done here in case the
calibration needs to be restarted (quite likely).  This is done using
task TACOP:
\par\noindent
$>$task='TACOP'; clro; inext='CL'; inver=1; outver=2; ncount=1; go

The correction for parallactic  angle is done using task CLCOR.
\par\noindent
$>$task='CLCOR'; opcode='PANG'; gainver=2; ante=0; bif=1; eif=0;
\par\noindent
$>$stokes=' '; clcorprm=1; go

\item Correction for Faraday rotation.

   If ionospheric Faraday rotation is a problem then a correction to
the phases of the data should be done at this point.  If this
correction is done by adjusting feed based gains then the phases of
one set of feeds (e.g. all left circular) can be adjusted to remove
the effects of Faraday rotation.  This correction is done using task
FARAD and the reader is referred to it's documentation.  Note: for
VLBI arrays FARAD may have to be run multiple times.

\item Right-left multi- and single-band delay difference correction.

  The cross polarized data from a short segment of data on a single
baseline involving the reference antenna should be used to determine
the delay differences between the right and left hand systems.  If a
multi-frequency system such as MkIII or VLBA recorders have been used
then a phase difference in each frequency band should also be
determined after applying any phase cal measurements.  The application
of corrections for these delay and phase measurements should align the
single- and multi-band delays between the right and left handed
systems.

   In 15OCT92 and later releases of AIPS this calibration step can be
accomplished using the procedure CROSSPOL.  See EXPLAIN CROSSPOL for
details of its use.  CROSSPOL can use data from several calibrators
but the number of baselines is restricted.  In older versions of AIPS
the recommended procedure is to use SWPOL to switch the right and left
circular data for one antenna, preferably the reference antenna, for a
short segment of data on a strong calibrator.  First use UVCOP to
select a short section of calibrator data:
\par\noindent
$>$task='UVCOP'; timerang=[set time range]; antenna=[antennas];
\par\noindent
$>$  basel=ante; outn=inn; outc='SHORT'; outs 0; go

   Since parallel hand delay and rate calibration has not already been
done for this dataset,  FRING should be run for the two antennas.
The solution interval depends on the
frequency, source strength, etc. but usually a few minutes is
sufficient.  The details of the values for DPARM may be different; see
EXPLAIN FRING for details.
\par\noindent
$>$task='FRING'; inc='UVCOP'; snver=0; antenna=[refant, other]
\par\noindent
$>$ docal=1; gainuse=0; refant=[ref. ant]; solint=[?];
\par\noindent
$>$ aparm=2,0; dparm=1,500,50,2; go

   After FRING completes CLCAL can apply the solution to the prior CL
table and produce a new CL table.  Task SWPOL can then switch the
polarization for the reference antenna:
\par\noindent
$>$task='SWPOL'; inc='SHORT'; ins 0; outc='SWPOL';
\par\noindent
$>$antenna=[ref. ant, 0]; docalib=1; go
\par\noindent
This will produce a data set in which all baselines to the reference
antenna have their RR and LL data exchanged with the RL and LR data.
Whether the ``RR'' data is actually RL or LR depends on whether the
reference antenna has a higher or lower number that the other antenna
making the baseline.  If the reference antenna has a lower number then
``RR'' is actually LR and ``LL'' is actually RL; if the reference
antenna number is higher then ``RR'' is RL and ``LL'' is LR.

   The single band delay differences can be determined using FRING.
FRING should apply the CL table produced  in the previous CLCAL step
and modified by SWPOL.  Run FRING on the output of SWPOL
as before:
\par\noindent
$>$task='FRING'; inc='SWPOL'; inver=0; antenna=[refant, other];
\par\noindent
$>$ docal=1; gainuse=0; refant=[ref. ant]; solint=[?];
\par\noindent
$>$ aparm=2,0; dparm=1,500,50,2; go

   The fitted values of the single band delays can be read from the SN
table produced by FRING using LISTR
\par\noindent
$>$task='LISTR'; opty='gain'; inext='CL'; inver 0; dparm 6 0; go
\par\noindent
The value reported for ``R'' for the ``other'' antenna should have the
opposite sign from that for ``L''.  After possibly averaging in time
and polarization (with the appropriate sign flip) these corrections
can be entered into the CL table of your original data using CLCOR:

\par\noindent
$>$ tget CLCOR; opcode='SBDL'; clcorp=(list of IF single-band delays);
\par\noindent
$>$ stokes='L'; go

Running SHOUV can help determine if you got the signs correct.
\par\noindent
$>$task='SHOUV'; opty='SPEC'; docal=1;gainuse=0;
\par\noindent
$>$ antenna=[ref. ant,other]; dparm=1,0,0,1[=averaging time];
\par\noindent
$>$ stokes='RL'; go
\par\noindent
If all worked as it should the phases in each IF should be flat with
frequency although there may be IF to IF differences.

   The multi-band delay differences and any IF peculiar phase
differences can be determined by averaging the data in frequency in
each IF using SHOUV.  Since 15APR92 and earlier versions of CLCOR will
modify the multi-band delay when correcting the single band delay the
following step should be done using the same data and calibration as
was used in the last SHOUV step.
\par\noindent
$>$task='SHOUV'; opty='AVIF'; stokes='RL' [or 'LR']; go
\par\noindent
The phases should have opposite sign in RL and LR.  The IF values
should be referenced to the first IF by subtracting the phase in the
first IF; this allows time averaging in the presence of nonzero fringe
rate.

Suitable time/polarization averaged values can be used to
correct the data using CLCOR:
\par\noindent
$>$tget CLCOR; opco='POLR'; stokes=' ';
\par\noindent
$>$ clcorp=[list of IF phase corrections]; go
\par\noindent
Run SHOUV again as before to be sure that the phases are constant in
IF.

\item Fringe fit on calibrator to align delays and phases.

   For multi-frequency systems involving separate electronics for
different parts of the measured cross-correlation spectrum it is
usually necessary to align the phase and delays of various parts of
the system.  Run time phase calibration measurements may be available
but currently existing systems are accurate to only 10 or 20 degrees
and corrections may be needed.  These corrections can be made using a
short time segment on a strong calibrator source involving all
antennas. A fringe fit to determine phase and delay for each separate
set of electronics (video/baseband converter) is made to the short
segment of calibrator data and then applied to all data.  If fringe
rates are determined in this process then the fringe rate corrections
should be set to zero before application.

   The fringe fit is done using FRING.  Some of the details may need to
be different from the example; see the documentation for FRING.  The
calibrator source and timerange should specify a couple of minutes on a
strong source during which all antennas/ IF etc were working.
\par\noindent
$>$task='FRING'; getn [original data]; calsour=[source]; docal=1; gainuse=0;
\par\noindent
$>$ timerang=[appropriate timerange]; solint=15;
\par\noindent
$>$ smodel=1,0; refant=[ref. ant.]; aparm=3,0,0,0,0,1;
\par\noindent
$>$ dparm=1,1000,50,2; snver=1; go

   Examine FRING output or the SN table with LISTR to be sure that
FRING worked OK.  The quoted SNR for all antennas and IF should be
acceptable (at least several 10s).  There should be only one solution
per antenna in the SN table.

   The fringe rates can be zeroed using SNCOR
\par\noindent
$>$task='SNCOR'; snver=1; opcode='ZRAT'; go


  This solution can be applied to all data using CLCAL
\par\noindent
$>$task='CLCAL'; gainver=2; gainuse=3; snver=1; opcode='CALI';
\par\noindent
$>$interp=''; smotype=''; refant=[ref. ant.]; go


\item Fringe fit.

   All data should then be fringe fitted solving for single-band plus
multi-band delays if appropriate.  The details may differ from the
example shown below; consult the documentation for FRING to help
determine the correct values of the parameters.


   Noise and differences in the time sampling of the left and right
handed systems may result in different estimates of the residual
fringe rates thus
causing a decorrelation of the right and left hand systems.  It is
therefore necessary to average all rates determined at a single time
for a given antenna before applying corrections.  If the
rates actually are different then the right and left hand systems are
intrinsically incoherent and the data cannot be used to image
polarized emission.

   All phase like measurements (phase, delay and rate) should be
referred to a common reference antenna if multiple phase reference
antennas were used in the fringe fitting.  Measured phase (etc.)
differences between the primary and secondary reference antennas can
be used to interpolate/extrapolate corrections to data referred to
secondary antennas.  This step is necessary to assure that a single
set of right-left phase and delay differences are adequate for all
data.

\par\noindent
$>$task='FRING'; getn [original data]; calsour=' ';
\par\noindent
$>$ docal=1; gainuse=0; timerang=0; solint=4;
\par\noindent
$>$ smodel=1,0; refant=[ref. ant.]; aparm=3,0,0,0,2,1;
\par\noindent
$>$ dparm=1,1000,50,2,1; snver=2; go

   Examine FRING output or the SN table with LISTR to be sure that
FRING worked OK.  The fitted delays and rates should be relatively
consistent with time for a given antenna and most solutions should be
present.

   If the data set had to be divided up by time (e.g. for reasons of
disk space) then the solution tables produced by FRING must be
combined using TABED before the following step.
In 15OCT92 and later use SNSMO to remove solutions outside of a
specified range of values, average fringe rates for a given
antenna/time, re-reference the solution to a common
antenna, smooth and interpolate failed solutions.  The details may
vary from the example given below.

\par\noindent
$>$task='SNSMO'; snver=2; antenna=0; timer=0; interpol='BOX';
\par\noindent
$>$smotype ='VLMB'; refant=[ref. ant.]; bparm=0.25,0.01, 0.25, 0.25,0.01;
\par\noindent
$>$cparm=0.25,0.25,0.25,0.25,0, 0, 10, 50, 30; go

   In the 15APR92 release this step requires using 1) SNCOR with
opcode='AVRT' to average fringe rates, 2) CLCAL with opcode='SMOO' but
interpol='' , intparm=0; smotype='' to re-reference the solutions to a
common antenna. 3) SNCOR will remove wild solutions if necessary (see
explain SNCOR). 4) SNSMO with SMOTYPE='VLMB' to smooth/interpolate
solutions.  5) Another run of SNCOR with opcode='AVRT' will insure
that all rates for a given antenna/time are the same.

   At this point it is prudent to examine the fringe fit phase
solutions to check for coherence between the right and left hand
systems.  The difference between the right and left hand phases
determined for the same time should be constant.  If not, a problem
has occurred in the previous steps.  The consistency of the solutions
can be checked using SNPLT.  If
a multi-band fit (APARM(5)$>$0) was done in FRING examining the phases
in a single IF (use 1 prior to 15OCT92) is sufficient.  If single band
fits were done then all IFs must be examined independently.
\par\noindent
$>$task='SNPLT'; inext='SN', inver 2; bif=1; eif=1; opty='PHAS';
\par\noindent
$>$opcode=''; stokes='DIFF'; ncount=5; go

   The most serious potential problem is the failure of solutions in
one of the two polarizations of a primary or secondary reference
antenna (a reference antenna used when the primary antenna is
unavailable) in the first solution interval after a period of data
during which one of them was not available. Prior to 15OCT92 this can
cause problems in the re-referencing routines.  Editing of the data and
or solution table and re-running FRING and/or the SN table filtering
routines may help restore R-L coherence.



  These solutions can be applied using CLCAL
\par\noindent
$>$task='CLCAL'; gainver=3; gainuse=4; snver=2; opcode='CALI';
\par\noindent
$>$interp='SELF'; smotype=''; refant=[ref. ant.]; go

\item Phase calibration (self-calibration)

   The phase calibration of all data (calibrator and program sources)
should be done using the usual techniques (self-calibration).  Phase
corrections determined from the parallel polarized data should be
applied to the cross polarized data.  In AIPS this is usually done
with a combination of CALIB and MX.  The procedure MAPIT (see EXPLAIN
MAPIT) may simplify this process.

\item Determine instrumental polarization.

   The fully amplitude and phase calibrated observations of the
calibrator source(s) should be used to determine the instrumental
polarization parameters and the calibrator source polarization if
unknown.  This may involve iterating through the calibration/imaging
process several times to converge on a polarization model for the
calibrator(s).  The model of the instrumental polarization depends on
the quality of the feeds of the antennas used; if all are well behaved
(or at least similar) then the linearized approximation will probably
be adequate.  For poor feeds the ellipticity-orientation model is
required.  In some cases the feed polarization parameters may be
frequency dependant.  The same reference antenna as was used for
fringe fitting and phase calibration should be used for polarization
calibration.

   The fully self-calibrated calibrator data set should be converted
to a multi-source data set (containing one source) using task MULTI.
The instrumental polarization determination is done using task
PCAL.  If the antenna feeds are poor (usually the case) the relatively
expensive soltype='ORI-' must be used for the ellipticity-orientation
model.  If the feeds are well behaved use the soltype='RAPR' linear
approximation model.
\par\noindent
$>$task='PCAL'; solint=4; calsour='[calibrator source]';
\par\noindent
$>$soltype='ORI-'; prtlev=1; refant=[ref. ante.]; bparm=1,0,0,0,0,1;
\par\noindent
$>$cparm=0; go

   If the solutions are consistent in IF then PCAL can be run again
with CPARM(1)=1 to average in IF before doing the solution.  If the
calibrator is unresolved and the polarization is known (or resolved
and completely unpolarized) the polarization model can be given in
adverb PMODEL and fitting to source polarization can be turned off
using bparm(10)=1.
   If the calibrator is significantly resolved and the polarization
structure differs from the total intensity (to be expected) then it is
necessary to iterate through PCAL, imaging and deconvolution.  The
first time PCAL is run it should be allowed to fit for fractional Q
and U.  This solution should be applied to the calibrator as described
below, and the resulting set of I, Q, and U CLEAN images given to the
next run of PCAL as the source polarization model (IN2NAME, IN2CLASS,
IN2SEQ, IN2DISK, NCOMP and NMAPS).

   If multiple calibrator sources are to be used then the source
polarization of each needs to be subtracted using UVSUB.  The
different sources should then be  concatenated using MULTI and DBCON.
PCAL using this subtracted dataset should be told not to solve for
source polarization (BPARM(10)=1).

\item Correct for instrumental polarization.

   Properly amplitude and phase calibrated data should have the
appropriate correction for the feed polarization applied. Task SPLIT
can apply polarization corrections using the parameters in the AN
table using DOPOL=true for either a single- or multi-source data set.
The input to  SPLIT for polarization calibration should be a fully
self calibrated data set.

\item Image.

   Images can then be formed and deconvolved in Stokes' I, Q and U
polarization.  Task MX or HORUS and APCLN can be used to image and
deconvolve the Stokes I, Q and U data.  These routines can only use
data for which both the RL and LR correlations are present in each
visibility used.

   In the 15OCT92 and later releases assymetric polarization uv
coverage can be used with a combination of the procedure CXPOLN and
task CXCLN.  CXPOLN uses UVPOL and MX to make complex dirty and beam
images.  CXCLN will then deconvolve these images and produce Q and U
deconvolved images.  See the documentation for CXPOLN and CXCLN.
   CXCLN produces a CX table with the complex CLEAN components
attached to the deconvolved Q image.  If a
pair of CC tables containing the Q and U clean components is desired
(e.g. for PCAL) then task TBSUB can make the conversion.
\par\noindent
$>$task='TBSUB'; inex='CX'; inver=1;  IN2EXT='CC'; outver=1; bcount=1;
\par\noindent
$>$ ecount=0; sourc='COL\#(3)','COL\#(1)','COL\#(2)';
\par\noindent
$>$ calsour='FLUX','DELTAX','DELTAY' ; go
\par\noindent
$>$ SOURC(1)='COL\#(4)'; outver=2;go

   This will leave the Q components in CC table 1 and the U components
in CC table 2 which can be copied to the U deconvolved image using
task TACOP.


\item Correction of position angle of E-vectors.
   The proceeding process will leave the derived images with an
arbitrary offset in the apparent orientation of the E-vector of the
image.  Correction requires knowledge of the orientation of the
integrated polarized emission of at least one observed source
(presumably a calibrator).  The correction to the polarization angles
can be determined from the integrated emission in the derived image
and then applied to all sources.

   The calibration of polarization angle can be done either in COMB by
adding an offset to the polarization angle when making the
polarization angle image or to the uv data using CLCOR and
opcode='POLR'.  CLCOR must be used on a multi-source data set before
running SPLIT.  This correction may be applied before the self
calibration and polarization calibration of the program source but it
is rather inconvenient to go back to this stage for the calibrator
source(s).
   The apparent integrated polarization angle is given by:
$$PA = {1\over{2}} tan^{-1} ({\Sigma U\over{\Sigma Q}}) $$
where $\Sigma U$ is the sum of the U CLEAN components and $\Sigma Q$
is the sum of the Q clean components.  (Note: use a two argument
arctangent function.)  The correction to apply in
CLCOR or COMB is the true polarization angle minus the apparent
polarization angle. CLCOR can be run as follows.
\par\noindent
$>$task='CLCOR'; opcode='POLR'; gainver=4; ante=0; bif=1; eif=0;
\par\noindent
$>$stokes=' ';clcorprm=[PA correction]; go

\end {enumerate}

\vfil\eject
\section{Acknowledgments}
   Athol Kemball was of invaluable assistance in the development and
debugging of the methods described in this document.  Fred Schwab  was
involved in many useful discussions and located appropriate software
for the implementation of the methods described in this document.

\section{References }
\par\noindent
Chiu,~Y.~T.~1975, {\it J. Atm. and Terr. Phys.} {\bf 37}, 1563.

\par\noindent
Cotton, W.~D. ~1989, in {\it Very Long Baseline Interferometry.
\par\parindent 30pt
Techniques and Applications} Ed.~M.~Felli and R.~E.~Spencer,

\par\parindent 30pt
Kluwer Academic Publishers.  pp 279-287.

\par\noindent
Fomalont, E.~B.~and Wright, M.~C.~H.~1974, in {\it Galactic and Extragalactic}
\par\parindent 30pt
{\it Radio Astronomy}, Ed.~G.~L.~Verschuur and K.~I.~Kellermann
\par\parindent 30pt
(Berlin:Springer)

%\hspace*{  -0.50cm } Wells, D. C., Greisen, E. W., and Harten R. H.
%1981, ``FITS: A Flexible Image Transport System'', {\it Astron.
%Astrophys. Suppl}, vol. 44, pp 363 - 370.\\
%

\vfil\eject
\appendix{}
\begin{center}
   {\LARGE\bf Appendix A \par}
   \vskip 1em
   {\large\bf Formulae for Ellipticity-Orientation Model}
\end{center}
\vskip 20pt
   This appendix gives the partial derivatives of the
Ellipticity-Orientation model given in Section 5.1 with respect to the
model parameters.   The model can be factorized into antenna based components
using the following:
$$ S_{Ri} = {\cos\theta_{Ri} + \sin\theta_{Ri}}$$
$$ D_{Ri} = {\cos\theta_{Ri} - \sin\theta_{Ri}}$$
$$ S_{Li} = {\cos\theta_{Li} + \sin\theta_{Li}}$$
$$ D_{Li} = {\cos\theta_{Li} - \sin\theta_{Li}}$$
$$ P_{Ri} = e^{2i\phi_{Ri}} $$
$$ P_{Li} = e^{-2i\phi_{Li}} $$

   The model values of the correlations $RR_{jk}$, $RL_{jk}$,
$LR_{jk}$, and $LL_{jk}$ can either be provided from the Fourier
transform a model of the source emission or by using the similarity
approximation and the following relations:
$$RR_{jk} = (I+V)\,0.5 (RR^{obs}_{jk} + LL^{obs}_{jk}) $$
$$RL_{jk} = (Q+iU)\,0.5 (RR^{obs}_{jk} + LL^{obs}_{jk}) $$
$$LR_{jk} = (Q-iU)\,0.5 (RR^{obs}_{jk} + LL^{obs}_{jk}) $$
$$LL_{jk} = (I-V)\,0.5 (RR^{obs}_{jk} + LL^{obs}_{jk}). $$
Here $I$ is the fractional total intensity (=1). $Q$, $U$, and $V$ are the
fractional polarizations.

\section{Partial Derivatives for RR Correlations}
Compute the components of the model:
$$C_{RR} = 2S_{Rj} {S_{Rk}} $$
$$C_{RL} =  2S_{Rj} D_{Rk} P^*_{Rk} e^{2i\chi_k}$$
$$C_{LR} =2{D_{Rj}} {P_{Rj}} {S_{Rk}} e^{-2i\chi_j} $$
$$C_{LL} = 2{D_{Rj}} {P_{Rj}} D_{Rk} P^*_{Rk} e^{-2i(\chi_j - \chi_k)}$$
$$RR^{mod}_{jk} = RR_{jk} C_{RR} + RL_{jk} C_{RL} + LR_{jk} C_{LR} +
LL_{jk} C_{LL} $$

%                                       partial of model wrt phi1
$${\partial RR \over{\partial \phi_{Rj}}} =
   4i D_{Rj} e^{-2i\chi_j}
   (LL_{jk} D_{Rk} P^*_{Rk}
   e^{2i\chi_k} + LR_{jk} {S_{Rk}}) $$
%                                       partial of model wrt phi2
$${\partial RR \over{\partial \phi_{Rk}}} =
    -4iD_{Rk} e^{2i\chi_k}
   (LL_{jk}  {D_{Rj}} {P_{Rj}}
   e^{-2i\chi_j} + RL_{jk}  {S_{Rj}})$$
%                                       partial of model wrt theta1
$${\partial RR \over{\partial \theta_{Rj}}} =
    2\{D_{Rj} (RR_{jk}
   {S_{Rk}} + RL_{jk}    D_{Rk} P^*_{Rk} e^{2i\chi_k}) $$
   $$- S_{Rj} P_{Rj} e^{-2i\chi_j} (LR_{jk}
   {S_{Rk}} + LL_{jk}  {D_{Rk} {P^*}_{Rk}} e^{2i\chi_k})\} $$
%                                       partial of model wrt theta2
$${\partial RR \over{\partial \theta_{Rk}}} =
    2\{D_{Rk} (RR_{jk}  {S_{Rj}} + LR_{jk}  {D_{Rj}} {P_{Rj}}
   e^{-2i\chi_j}) $$
   $$-S_{Rk} P^*_{Rk} e^{2i\chi_k} (RL_{jk}  {S_{Rj}} + LL_{jk}
   {D_{Rj}} {P_{Rj}} e^{-2i\chi_j})\} $$
%                                        partial of model wrt Ipol
$${\partial RR \over{\partial I}} =
   0.5[RR_{jk} + LL_{jk}] (C_{RR} + C_{LL})$$
%                                       partial of model wrt Qpol
$${\partial RR \over{\partial Q}} =
   0.5[RR_{jk} + LL_{jk}] (C_{RL} + C_{LR})$$
%                                       partial of model wrt Upol
$${\partial RR \over{\partial U}} =
   i 0.5[RR_{jk} + LL_{jk}] (C_{RL} - C_{LR}) $$
%                                       partial of model wrt Vpol
$${\partial RR \over{\partial V}} =
   0.5[RR_{jk} + LL_{jk}] (C_{RR} - C_{LL}) $$


\section{Partial Derivatives for RL Correlations}
Compute the components of the model:
$$PP^* = e^{i(\phi_{Rref} + \phi_{Lref} + \phi_{R-L})} $$
$$C_{RR} =  2{S_{Rj}}  {S_{Lk}} P^*_{Lk}  e^{-2i\chi_k} $$
$$C_{RL} =  2{S_{Rj}} D_{Lk} $$
$$C_{LR} =  2{D_{Rj}} {P_{Rj}}
   S_{Lk} P^*_{Lk}  e^{-2i(\chi_j + \chi_k)}$$
$$C_{LL} =  2{D_{Rj}} {P_{Rj}}
   {D_{Lk}}  e^{-2i\chi_j} $$
$$ RL^{mod}_{jk} = PP^* (RR_{jk} C_{RR} + RL_{jk} C_{RL} +
   LR_{jk} C_{LR} + LL_{jk} C_{LL}) $$
%                                       partial of model wrt phi1
If j is the reference antenna then
$${\partial RL \over{\partial \phi_{Rj}}} =
   2i {e^{i(\phi_{Lref} + \phi_{R-L})}}
    D_{Rj} {e^{-i(\phi_{Rref} + 2\chi_j)}}
   (LL_{jk}  {D_{Lk}} + LR_{jk}  S_{Lk} P^*_{Lk} e^{-2i\chi_k})$$
else
$${\partial RL \over{\partial \phi_{Rj}}} =
   4i PP^* e^{-2i\chi_j} D_{Rj} (LL_{jk}  {D_{Lk}} + LR_{jk}
    S_{Lk} P^*_{Lk} e^{-2i\chi_k})$$
and
$${\partial RL \over{\partial \phi_{Rref}}} = i RL^{mod}_{jk}$$
%                                       partial of model wrt phi2
If k is the reference antenna then
$${\partial RL \over{\partial \phi_{Lk}}} =
   2i e^{i(\phi_{Rref} + \phi_{R-L})}
    S_{Lk} e^{-i(\phi_{Lref} + 2\chi_k)}
   (RR_{jk}  {S_{Rj}} + LR_{jk}{D_{Rj}} {P_{Rj}} e^{-2i\chi_j}) $$
else
$${\partial RL \over{\partial \phi_{Lk}}} =
   4i PP^* e^{-2i\chi_k} S_{Lk}
  (RR_{jk}  {S_{Rj}} + LR_{jk}
  {D_{Rj}} {P_{Rj}} e^{-2i\chi_j})$$
and
$${\partial RL \over{\partial \phi_{Lref}}} = i RL^{mod}_{jk}$$
%                                       partial of model wrt theta1
$${\partial RL \over{\partial \theta_{Rj}}} =
    2PP^* \{D_{Rj} (RR_{jk} S_{Lk} P^*_{Lk} e^{-2i\chi_k} +
   RL_{jk}  {D_{Lk}}) $$
   $$- S_{Rj} P_{Rj} e^{-2i\chi_j} (LR_{jk}
   S_{Lk} P^*_{Lk} e^{-2i\chi_k} + LL_{jk}  {D_{Lk}})\}$$
%                                       partial of model wrt theta2
$${\partial RL \over{\partial \theta_{Lk}}} =
     2PP^* \{D_{Lk} P^*_{Lk} e^{-2i\chi_k} (RR_{jk}  {S_{Rj}}+
   LR_{jk}  {D_{Rj}} {P_{Rj}}  e^{-2i\chi_j})$$
   $$ - S_{Lk} (RL_{jk}  {S_{Rj}}
   + LL_{jk}  {D_{Rj}} e^{-2i\chi_j})\}$$
%                                        partial of model wrt Ipol
$${\partial RL \over{\partial I}} =
    0.5[RR_{jk} + LL_{jk}] (C_{RR} + C_{LL})$$
%                                       partial of model wrt Qpol
$${\partial RL \over{\partial Q}} =
   0.5[RR_{jk} + LL_{jk}] (C_{RL} + C_{LR}) $$
%                                       partial of model wrt Upol
$${\partial RL \over{\partial U}} =
   i 0.5[RR_{jk} + LL_{jk}] (C_{RL} - C_{LR})$$
%                                       partial of model wrt Vpol
$${\partial RL \over{\partial V}} =
   0.5[RR_{jk} + LL_{jk}] (C_{RR} - C_{LL}) $$
%                                       partial of model wrt PD
$${\partial RL \over{\partial \phi_{R-L}}} = i  RL^{mod}_{jk} $$



\section{Partial Derivatives for LR Correlations}
Compute the components of the model:
$$PP^* = e^{-i(\phi_{Lref} + \phi_{Rref} + \phi_{R-L})} $$
$$C_{RR} =  2{S_{Lj}} {P_{Lj}}
   S_{Rk}  e^{2i\chi_j} $$
$$C_{RL} =  2{S_{Lj}} {P_{Lj}}
   {{D_{Rk}} {{P^*}_{Rk}}}
   e^{2(i\chi_j + \chi_k)}$$
$$C_{LR} =  2D_{Lj} S_{Rk} $$
$$C_{LL} =  2D_{Lj} D_{Rk} P^*_{Rk}  e^{2i\chi_k} $$
$$LR^{mod}_{jk} = PP^* (RR_{jk} C_{RR} + RL_{jk} C_{RL} +
   LR_{jk} C_{LR} + LL_{jk} C_{LL})$$

%                                       partial of model wrt phi1
If j is the reference antenna then
$${\partial LR \over{\partial \phi_{Lj}}} =
    -2i e^{-i(\phi_{Lref} + \phi_{R-L})} D_{Rk} e^{i(\phi_{Rref} + 2\chi_k)}
   (LL_{jk}  {D_{Lj}} + RL_{jk} {S_{Lj}} {P_{Lj}} e^{2i\chi_j})$$
else
$${\partial LR \over{\partial \phi_{Lj}}} =
   -4i PP^* e^{2i\chi_j} S_{Lj}
   (RR_{jk}  {S_{Rk}} + RL_{jk}
   D_{Rk} P^*_{Rk} e^{2i\chi_k})$$
and
$${\partial LR \over{\partial \phi_{Lref}}} = -i LR^{mod}_{jk}$$

%                                       partial of model wrt phi2
If k is the reference antenna then
$${\partial LR \over{\partial \phi_{Rk}}} =
    -2i e^{i(\phi_{Rref} - \phi_{R-L})} S_{Lj} {e^{-i(\phi_{Rref} - 2\chi_j)}}
   (RR_{jk}  {S_{Rk}} + RL_{jk} D_{Rk} P^*_{Rk} e^{2i\chi_k})$$
else
$${\partial LR \over{\partial \phi_{Rk}}} =
   -4i PP^* e^{2i\chi_k} D_{Rk}
   (LL_{jk}  {D_{Lj}} + RL_{jk}
   {S_{Lj}} {P_{Lj}} e^{2i\chi_k})$$
and
$${\partial LR \over{\partial \phi_{Rref}}} = -i LR^{mod}_{jk}$$

%                                       partial of model wrt theta1
$${\partial LR \over{\partial \theta_{Lj}}} =
     2PP^* \{D_{Lj} P_{Lj}  e^{2i\chi_j} (RR_{jk}  {S_{Rk}} +
   RL_{jk}  D_{Rk} P^*_{Rk} e^{2i\chi_k})$$
   $$ - S_{Lj} (LR_{jk} {S_{Rk}} + LL_{jk}  D_{Rk}
   P^*_{Rk} e^{2i\chi_k})\}$$
%                                       partial of model wrt theta2
$${\partial LR \over{\partial \theta_{Rk}}} =
    2PP^* \{D_{Rk} (RR_{jk}
    {S_{Lj}} {P_{Lj}} e^{2i\chi_j} + LR_{jk}  {D_{Lj}})$$
   $$ - S_{Rk} P^*_{Rk} e^{2i\chi_k} (RL_{jk}  {S_{Lj}}
   {P_{Lj}} e^{2i\chi_j} + LL_{jk} {D_{Lj}})\}$$
%                                        partial of model wrt Ipol
$${\partial LR \over{\partial I}} =
    0.5[RR_{jk} + LL_{jk}] (C_{RR} + C_{LL})$$
%                                       partial of model wrt Qpol
$${\partial LR \over{\partial Q}} =
    0.5[RR_{jk} + LL_{jk}] (C_{RL} + C_{LR}) $$
%                                       partial of model wrt Upol
$${\partial LR \over{\partial U}} =
   i 0.5[RR_{jk} + LL_{jk}] (C_{RL} - C_{LR})$$
%                                       partial of model wrt Vpol
$${\partial LR \over{\partial V}} =
   0.5[RR_{jk} + LL_{jk}] (C_{RR} - C_{LL})$$
%                                       partial of model wrt PD
$${\partial RL \over{\partial \phi_{R-L}}} = -i  LR^{mod}_{jk} $$


\section{Partial Derivatives for LL Correlations}
Compute the components of the model:
$$C_{RR} =  2{S_{Lj}} {P_{Lj}} S_{Lk} P^*_{Lk}
   e^{2i(\chi_j - \chi_k)}$$
$$C_{RL} =  2S_{Lj} {P_{Lj}} D_{Lk}  e^{2i\chi_j}$$
$$C_{LR} =  2D_{Lj} S_{Lk} P^*_{Lk}  e^{-2i\chi_k}$$
$$C_{LL} =  2D_{Lj} D_{Lk} $$
$$LL^{mod}_{jk} = RR_{jk} C_{RR} + RL_{jk} C_{RL} + LR_{jk} C_{LR} +
   LL_{jk} C_{LL} $$
%                                       partial of model wrt phi1
$${\partial LL \over{\partial \phi_{Lj}}} =
   -4i S_{Lj} e^{2i\chi_j} (RR_{jk}  S_{Lk} P^*_{Lk}
   e^{-2i\chi_k} + RL_{jk}  {D_{Lk}})$$
%                                       partial of model wrt phi2
$${\partial LL \over{\partial \phi_{Lk}}} =
   4i S_{Lk} e^{-2i\chi_k}
  (RR_{jk}  {S_{Lj}} {P_{Lj}}
  e^{2i\chi_j} + LR_{jk}  {D_{Lj}})$$
%                                       partial of model wrt theta1
$${\partial LL \over{\partial \theta_{Lj}}} =
     2\{D_{Lj} e^{2i\chi_j} P_{Lj} (RR_{jk}  S_{Lk} P^*_{Lk}
   e^{-2i\chi_k} + RL_{jk}  D_{Lk})$$
   $$- S_{Lj} (LR_{jk}  S_{Lk} P^*_{Lk} e^{-2i\chi_k} + LL_{jk}
    {D_{Lk}})\}$$
%                                       partial of model wrt theta2
$${\partial LL \over{\partial \theta_{Lk}}} =
    2\{D_{Lk} P^*_{Lk} e^{-2i\chi_k} (RR_{jk}  {S_{Lj}} {P_{Lj}}
   e^{2i\chi_j} + LR_{jk}  {D_{Lj}})$$
   $$- S_{Lk} (RL_{jk}  {S_{Lj}} {P_{Lj}} e^{2i\chi_j} + LL_{jk}
    {D_{Lj}})\}$$
%                                        partial of model wrt Ipol
$${\partial LL \over{\partial I}} =
   0.5[RR_{jk} + LL_{jk}] (C_{RR} + C_{LL})$$
%                                       partial of model wrt Qpol
$${\partial LL \over{\partial Q}} =
   0.5[RR_{jk} + LL_{jk}] (C_{RL} + C_{LR})$$
%                                       partial of model wrt Upol
$${\partial LL \over{\partial U}} =
   i 0.5[RR_{jk} + LL_{jk}] (C_{RL} - C_{LR})$$
%                                       partial of model wrt Vpol
$${\partial LL \over{\partial V}} =
   0.5[RR_{jk} + LL_{jk}] (C_{RR} - C_{LL})$$

\vfil\eject
\appendix{}
\begin{center}
   {\LARGE\bf Appendix B\par}
   \vskip 1em
   {\large\bf Formulae for Linearized Model}
\end{center}
\vskip 20pt
   This appendix gives the partial derivatives for the linearized
model given in section 5.2.
The model values of the correlations $RR_{jk}$, $RL_{jk}$,
$LR_{jk}$, and $LL_{jk}$ can either be provided from the Fourier
transform a model of the source emission or by using the similarity
approximation and the following relations:
$$RR_{jk} = (I+V)\,0.5 (RR^{obs}_{jk} + LL^{obs}_{jk}) $$
$$RL_{jk} = (Q+iU)\,0.5 (RR^{obs}_{jk} + LL^{obs}_{jk}) $$
$$LR_{jk} = (Q-iU)\,0.5 (RR^{obs}_{jk} + LL^{obs}_{jk}) $$
$$LL_{jk} = (I-V)\,0.5 (RR^{obs}_{jk} + LL^{obs}_{jk}). $$
Here $I$ is the fractional total intensity (=1). $Q$, $U$, and $V$ are the
fractional polarizations.

The partial derivatives are given by the following.
%                                       parameters C(1) = d(RL)/d(DRa):
$${\partial RL \over{\partial D_{Rj}}} = e^{-2i\chi_j} $$
%                                       C(2) = d(RL)/d(DLb*)
$${\partial RL \over{\partial D^*_{Lj}}} = e^{-2i\chi_k}$$
%                                       C(3) = d(RL)/d(Q+iU)
$${\partial RL \over{\partial Q+iU}} = {1\over{0.5 [RR + LL]}}$$
%                                       C(1) = d(LR)/d(DLa*):
$${\partial LR \over{\partial {D^*_{Lj}}}} = e^{-2i\chi_j} $$
%                                       C(2) = d(LR)/d(DRb)
$${\partial LR \over{\partial D_{Rk}}} = e^{-2i\chi_k}$$
%                                       C(3) = d(LR)/d(Q+iU)
$${\partial LR \over{\partial Q+iU}} = {1\over{0.5
{[RR + LL]}^*}} $$


\end{document}

