%-----------------------------------------------------------------------
%;  Copyright (C) 2013
%;  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
%-----------------------------------------------------------------------
%Body of intermediate AIPSletter for 31 December 2013 version

\documentclass[twoside]{article}
\usepackage{graphics}

\newcommand{\AIPRELEASE}{June 30, 2013}
\newcommand{\AIPVOLUME}{Volume XXXIII}
\newcommand{\AIPNUMBER}{Number 1}
\newcommand{\RELEASENAME}{{\tt 31DEC13}}
\newcommand{\NEWNAME}{{\tt 31DEC13}}
\newcommand{\OLDNAME}{{\tt 31DEC12}}

%macros and title page format for the \AIPS\ letter.
\input LET98.MAC
%\input psfig

\newcommand{\MYSpace}{-11pt}

\normalstyle

\section{General developments in \AIPS}

\subsection{Reduction of JVLA and ALMA data in \AIPS}

This \Aipsletter\ and those from 2010 through 2012 contain numerous
improvements to \AIPS\ that enable full calibration of modern VLA data
and most imaging operations as well.  The one exception is the
wide-band (bandwidth synthesis) deconvolution algorithm (``MSMFS'')
being developed in \CASA\ by Urvashi Rao Venkata, for which there is
no comparable function in \AIPS\@.  Calibrated $uv$ data may be ported
from \AIPS\ in ``UVFITS'' format for use in that program.  ALMA data
may also be reduced in \AIPS, although the package is not fully
qualified to calibrate data from linearly-polarized feeds.  See
Appendix E of the \AIPS\ Cookbook, available via the \AIPS\ web site,
for details.

\subsection{\Aipsletter\ publication}

We have discontinued paper copies of the \Aipsletter\ other than for
libraries and NRAO staff.  The \Aipsletter\ will be available in
PostScript and pdf forms as always from the web site listed above.  It
will be announced in the NRAO eNews mailing and on the bananas list
server.

\subsection{Current and future releases}

We have formal \AIPS\ releases on an annual basis.  While all
architectures can do a full installation from the source files,
Linux (32- and 64-bit), Solaris, and MacIntosh OS/X (PPC and Intel)
systems may install binary versions of recent releases.  The last,
frozen release is called \OLDNAME\ while \RELEASENAME\ remains under
active development.  You may fetch and install a copy of these
versions at any time using {\it anonymous} {\tt ftp} for source-only
copies and {\tt rsync} for binary copies.  This \Aipsletter\ is
intended to advise you of improvements to date in \RELEASENAME\@.
Having fetched \RELEASENAME, you may update your installation whenever
you want by running the so-called ``Midnight Job'' (MNJ) which copies
and compiles the code selectively based on the changes and
compilations we have done.  The MNJ will also update sites that have
done a binary installation.  There is a guide to the install script
and an \AIPS\ Manager FAQ page on the \AIPS\ web site.

The MNJ serves up \AIPS\ incrementally using the Unix tool {\tt cvs}
running with anonymous ftp.  The binary MNJ also uses the tool {\tt
rsync} as does the binary installation.  Linux sites will almost
certainly have {\tt cvs} installed; other sites may have installed it
along with other GNU tools.  Secondary MNJs will still be possible
using {\tt ssh} or {\tt rcp} or NFS as with previous releases.  We
have found that {\tt cvs} works very well, although it has one quirk.
If a site modifies a file locally, but in an \AIPS-standard directory,
{\tt cvs} will detect the modification and attempt to reconcile the
local version with the NRAO-supplied version.  This usually produces a
file that will not compile or run as intended.  Use a copy of the task
and its help file in a private disk area instead.

\AIPS\ is now copyright \copyright\ 1995 through 2013 by Associated
Universities, Inc., NRAO's parent corporation, but may be made freely
available under the terms of the Free Software Foundation's General
Public License (GPL)\@.  This means that User Agreements are no longer
required, that \AIPS\ may be obtained via anonymous ftp without
contacting NRAO, and that the software may be redistributed (and/or
modified), under certain conditions.  The full text of the GPL can be
found in the \texttt{15JUL95} \Aipsletter, in each copy of \AIPS\
releases, and on the web at {\tt http://www.aips.nrao.edu/COPYING}.


\section{Improvements of interest in \RELEASENAME}

We expect to continue publishing the \Aipsletter\ approximately every
six months.  Henceforth, this publication will be primarily
electronic.  There have been several significant changes in
\RELEASENAME\ in the last six months.  Some of these were in the
nature of bug fixes which were applied to \OLDNAME\ before and after
it was frozen.  If you are running \OLDNAME, be sure that it is up to
date; pay attention to the patches and run a MNJ any time a patch
releavnt to you appears.  New tasks in \RELEASENAME\ include {\tt
  RMFIT} to fit polarization models to Q/U cubes interactively, {\tt
  DSKEW} to remove coordinate skew from input (usually optical)
images, {\tt FTFLG} to edit {\it uv} data interactively in a
frequency-time display with all baselines averaged, {\tt CLVLB} to
apply calibration to correct VLBI data for phase-stopping positions
away from the pointing position, {\tt VLAMP} to determine system
temperature calibration for the phased VLA in VLBI observations, and
{\tt PCVEL} to include planetary velocities when correcting {\it uv}
data spectra to be centered on a line at the source.  The interactive
Gaussian-fitting task {\tt XGAUS} was overhauled to become a much more
usable tool to fit large spectral cubes.  The handling of more global
coordinate types was expanded and brought up to more modern standards
to handle images, primarily optical, now being brought into \AIPS\@.
A fifth name group ({\tt IN5NAME}, {\it et al.}) was added with new
verbs {\tt GET5NAME}, {\tt M5CAT}, {\tt U5CAT}, {\tt IM5HEAD}, and
{\tt Q5HEADER} to support it.

{\tt 31DEC09} contains a significant change in the format of the
antenna files, which will cause older releases to do wrong things to
data touched by {\tt 31DEC09} and later releases.  {\tt 31DEC08}
contains major changes to the display software.  You are encouraged to
use a relatively recent version of \AIPS, whilst those with VLA data
to reduce should get the latest release.

\subsection{UV-data}

\subsubsection{Calibration application}

Calibration application subroutines, shared by all tasks with {\tt
  DOCAL} as an adverb, were found to have numerous difficulties.
Simple corrections included making various in-memory calibration
arrays be structured to include auto-correlations as well as
cross-correlations.  Prior to that, {\tt DOCAL} on data which included
auto-correlations would fail miserably.  Then it was found that
bandpass calibration was done only for channels {\tt BCHAN} through
{\tt ECHAN} even when more channels would be needed to do frequency
smoothing after the bandpass was applied ({\tt SMOOTH(1)}$> 4$).

The {\tt CL} table is supposed to have records at the very start and
end of each scan for each subarray as well as at regular intervals in
between.  If this is in fact the case, then the two {\tt CL} table
records to be applied to any datum are easily found and unambiguously
correct for the source observed at that time.  However, {\tt CL}
tables can lose correspondence with the data file in a variety of
ways.  The most damaging is through the task {\tt CLCAL} which can
create a new {\tt CL} table omitting sources, times, antennas, and
more.  The intention of this omission is to build up a new {\tt CL}
table piece-by-piece with different inputs until a new and complete
table results.  That often fails however.  To reduce the frequency of
this failure, the default {\tt OPCODE} in {\tt CLCAL} was made {\tt
  'CALP'} which passes all {\tt CL} table information including that
which is not selected for change in the current execution.

The {\tt CL} table contains corrections that are specific to the
source for which the record is intended.  These include amplitude
corrections for antenna elevation gain dependence and atmospheric
opacity and phase corrections for antenna and source location, for
clock errors, for affects due to the atmosphere and ionosphere, and
more.  It is therefore an error to use a {\tt CL} table record from
one source for data from another source.  Unfortunately, when the {\tt
  CL} table was not in pristine condition, the software quite happily
did this.  It was changed to use only records for the current source,
a change that exposed numerous inadequacies in the way the required
{\tt CL} data records are found.  It is believed that these have now
been found and corrected.  However, pathalogical {\tt CL} tables may
still cause difficulties.  Be sure to run the midnight job on {\tt
31DEC13} regularly --- or whenever you encounter difficulties applying
calibration.

{\tt INDXR} was corrected for two ways in which it was able to write
more than one {\tt CL} table record for each antenna at
indistinguishable times.  Scans consisting of a single record would
trigger this as would scans microscopically longer than an integer
times the {\tt CL} table interval.

Polarization calibration also had its issues.  Oddly, {\tt PCAL} had
at least 5 separate declarations of the maximum number of calibration
sources, with three quite different values.  They all now agree on one
upper limit (50).  {\tt DOPOL} true with a spectral-channel dependent
solution using a polarization model other than the default ({\tt
  'APPR'}) would run without complaint, but produce nothing but zero
for output.  The bottom-level routines for these polarization models
were all prepared to work correctly for spectral solutions, but a
higher level routine refused to call them except for non-spectral
solutions.  That has been fixed and tested.

\subsubsection{VLA Calibration}

{\tt SETJY} has received a variety of significant modifications.  It
was changed to ignore some of the adverbs on some of the {\tt
  OPTYPE}s. Previously, unintended changes could suddenly appear in
the source table.  A new collection of primary calibration source
fluxes was added which includes time dependence for sources 3C48,
3C138, and 3C147\@.  An additional model of source fluxes at low
frequencies, due to Anna Scaife and George Heald, was also added.  It
is the default for data taken at frequencies $< 500$ MHz.  {\tt BPASS}
was also changed to use the new, time-dependent spectral indices for
the primary calibration sources.

S-band models at 2141, 2663, 3047, 3463, and 3847 MHz for 3C48, 3C138,
3C147, 3C196, 3C286, and 3C295 were made available.  The 3463 MHz ones
were made the default S-band ones.  Note that these images are based
on one A-array data set only and we expect to improve on these models
at a later time.

{\tt TYAPL} was corrected to examine the validity only of the
parameters it needs to use.  Previously, it would flag post-gain
calibrations when the values of Pdif and/or Psum appeared bad.  It was
given the option to review all the {\tt SY} data to decide which
antennas, polarizations, and IFs have an excessive amount of obviously
bad calibration values.  With this option, the ``bad'' correlations
are passed through without application of the {\tt SY} data while those
data are applied to all other correlations.  {\tt CALIB} should be
able to correct for the omitted {\tt SY} calibration and it certainly
beats deleting the affected data.

{\tt SYCOP} is used to correct IFs that have bad values in the {\tt
  SY} table due to RFI and the like.  It was given additional {\tt
  OPTYPE}s to control which data are averaged and which replaced.

\subsubsection{VLBI Calibration}

{\tt FRING} was changed to run much faster in some cases.  The useless
division by source fluxes from the {\tt SU} was dropped.  Model
division must be done in some cases, but a simple division by flux has
no affect on the task other than to waste time.  When {\tt FRING} is
told to determine no rates ({\tt DPARM(9)}$ > 1$) and to use no
solution sub-intervals ({\tt SOLSUB = 0}), the data are now averaged
on the fly rather than after reading them all separately into memory.
This saves a lot of memory in many cases and saves compute time.
{\tt FRING} was corrected to flag multi-band delay when it solves for
it, but finds too low a S/N and blanks the individual IF solutions.
The routine at the start of {\tt FRING} that examines the data to find
an integration time was improved to return errors and appropriate
messages when no data are found or other basic dataset errors arise.

The new task {\tt VLAMP} was written to use the VLA {\tt SY} table to
write an {\tt ANTAB} file for the phased VLA.  It sums up the system
temperatures of the antennas suitably weighted by calibration
amplitudes from the {\tt CL} table to provide the amplitude
calibration needed for VLBI arrays which include the phased VLA\@.

The new task {\tt CLVLB} was written to correct {\tt CL}-table
amplitudes for any difference in antenna pointing and phase-stopping
positions.  In VLBI observations, which have minuscule fields of view,
this can be done in the $uv$ plane, while such corrections must be
done in the image plane for interferometers with larger fields of view.
The DiFX software correlator is now capable of using numerous phase
stopping positions while correlating a VLBI observation.  Data from
each of these phase-stopping positions are written to separate data
files so that software such as \AIPS\ will not be confused by multiple
sources observed simultaneously.  {\tt CLVLB} attempts to model beam
squint for each antenna as well as changes in the primary beam size
above and beyond those which are simply a linear function of
frequency.  Initial attempts with this task provided encouraging
results, but left a good bit to be desired.  As a consequence, debug
options have been left in to display solutions in selected ways and to
choose two different approaches to the handling of the angles involved
(the one we believe to be correct and the one that seems to give
better answers).

\subsubsection{Editing}

{\tt TVFLG} and {\tt SPFLG} received some useful attention over the
past six months.  The most important change was the addition of a new,
large dynamic-memory method to prepare the work files.  The old method
of writing the same row of multiple output planes at the same time
worked well on older disk systems, but does not perform well with
modern disk systems.  It is now better to read the input file more
times if necessary and to write the output file one plane at a time.
With large memory usage, it is often possible to reduce the number of
passes through the input data while still writing the grid file one
plane at a time.  Both tasks now have the {\tt DOCENTER} option to
control the positioning of the data plot with respect to the menu.
This often helps reduce or avoid the overlap of the two.  Both tasks
also needed the X-axis labeling to be corrected for plots that have
so many baselines or spectral channels that only every $n$'th value
can be displayed.  {\tt SPFLG} now also has the option to smooth the
data in frequency after the grid file has been filled with interactive
control over the degree of smoothing.

{\tt FTFLG} is a new task based on {\tt SPFLG}\@.  Like the latter, it
displays the data with frequency changing along the horizontal axis
and time on the vertical axis.  Unlike {\tt SPFLG}, the data from all
baselines are averaged together; only the different Stokes are kept
separate.  Mostly this task in intended as a quick way to examine the
data for wide-spread RFI.  It does have most of the display and
flagging options of {\tt SPFLG}, but, of course, flags all baselines
in every flag it generates.

{\tt SNEDT} and {\tt EDITA} were given the ability to edit based on
multi-band delay values recorded in {\tt SN} and {\tt CL} tables.
Flags generated using multi-band delay, of course, must flag all IFs.
{\tt RFLAG} has a new {\tt DOSCALE} option which instructs it to find
flux scales for each IF and baseline in an attempt to bring them all
up to the same scale.  When {\tt RFLAG} is required before {\tt CALIB}
can be run, this option provides a near uniform scaling for the cutoff
levels.

\subsubsection{Miscellaneous $uv$-data matters}

\begin{description}
\myitem{FITLD} was changed to honor {\tt DIGICOR} for all array names
        rather than just those labeled VLBA.  This requires a {\tt CQ}
        table in order to apply some of the corrections.  Since many
        files do not have this, {\tt FITLD} was changed to be
        forgiving about the lack.  Handling of {\tt SO} tables was
        corrected to make a buffer large enough for a significant
        number of IFs and to fix a bad error message.
\myitem{TIORD} now also checks baseline codes for correctness and has
        the new {\tt PRTLIMIT} adverb to limit the number of messages
        printed for the various types of errors in $uv$-data files
        that it can detect.
\myitem{SPLAT} now honors {\tt OUTNAME} even when writing multiple
        single-source output files.  In that mode, {\tt OUTSEQ} is
        honored for the first output file and then set to 0 (highest
        $+ 1$) for all others.
\myitem{UVFIX} was given the {\tt INVERS} adverb to control the
        version of the {\tt CL} or {\tt FO} table read for Doppler
        offsets.  It now checks that file to see if there are any
        non-zero values and, if not, skips reading the file further.
        The reading of these files was improved in numerous ways to
        improve the extraction of the Doppler values.
\myitem{PCVEL} is a new task that reads a text file providing a
        sequence of planetary velocities.  It adds these, with various
        options, to the corrections for the Earth's motions to shift
        the visibility spectra so that a selected channel represents a
        selected velocity with respect to the planet.
\myitem{SPECR} was corrected to avoid losing the data sort order and
        to handle the fact that the {\tt FQ} table had a format change
        some time ago.
\myitem{BPASS} was corrected to avoid creating apparent overlaps
        between scans which could cause very short integrations to be
        used in bandpass solutions.
\end{description}

\subsection{Display}

\begin{description}
\myitem{UVPRT} offers the option to display real and imaginary instead
        of amplitude and phase and the option to apply an additional
        scaling to the visibilities.  It now prints as many channels
        as will fit on the line and displays the actual frequency of
        the first channel being displayed.
\myitem{SNPLT} now offers the option to display multiple data types in
        separate panels at the same time each with its own plot
        range.  Thus one could set {\tt NPLOTS=3} and plot {\tt PDIF},
        {\tt PSUM}, and {\tt PSYS} from the {\tt SY} table with one
        antenna per page.  The task now offers azimuth as an optional
        horizontal axis.
\myitem{POSSM} now offers the option to smooth the plotted data over
        frequency after the plot has been averaged.  This speeds up
        frequency smoothing a lot, although it will give somewhat
        different results than doing it one record at a time when the
        data have lots of channel-dependent flagging.  The task was
        fixed to recognize Stokes ``formal I'', to access the
        calibration data more efficiently, and to handle the upper
        plot scaling and labeling more correctly.
\myitem{UVPLT} and {\tt WIPER} were given frequency and spectral
        channel number as additional available axes.
\myitem{PRTAB} was corrected to handle really big numbers in
        floating-point format and to allow non-integer comparison
        numbers for integer-valued columns.
\myitem{Tick} mark computation and labeling were corrected for
        excessive round-offs that led to offsets in the plotted
        coordinates.  Edge issues, especially with difficult
        coordinate systems (see below), were also addressed.
\end{description}

\subsection{Imaging}

\subsubsection{Image coordinates}

The IAU FITS Working Group has endorsed a World Coordinate Systems
agreement which came along many years after \AIPS\ required solutions
to the problem\footnote{Greisen, \AIPS\ Memos 27 (1983), 46 (1986)}.
Part I of the agreement\footnote{Greisen \&\ Calabretta, 2002, A\& A,
  395, 1061} is a generalization of the \AIPS\ methods which adds the
possibility of a skew in the coordinates.  While \AIPS\ has always
allowed a rotation, it still does not support skew generally.
However, fits to image coordinates in optical astronomy often find a
slight skew which is dutifully recorded by IRAF and other packages in
the FITS files which reach \AIPS\@.  {\tt IMLOD} and {\tt FITLD}
report this when they cannot convert the FITS header into something
that will be understood fully in \AIPS\@.  A new task {\tt DSKEW} has
now been written to re-grid such images to remove the skew recorded in
the {\tt CD{\it i}\_{\it j\/}} FITS keywords saved by {\tt IMLOD} and
{\tt FITLD} in the \AIPS\ history file.  The new task uses much of the
machinery of {\tt OHGEO} with only the coordinate translation portion
replaced.  As such, it will handle blanked pixels congenially.

\begin{figure}
\centering
%\resizebox{!}{3.4in}{\gname{uvpltuv}\hspace{0.1cm}\gname{uvpltbf}}
\resizebox{!}{!}{{\includegraphics{FIG/AITdisp.eps}}}
\caption[{\tt -AIT} displays]{Displays of the celestial sphere in
  Hammer-Aitoff projection.  At left, the reference longitude and
  latitude are 0, 0 while at right they are 135, 30 degrees.}
\end{figure}

{\tt AIPS} does not and will not handle the full generality of the IAU
agreements.  That has been considered carefully and found to be an
enormous amount of work for little general benefit.  Nonetheless, some
of the second part of the agreement on celestial coordinates\footnote{
Calabreta \&\ Greisen, 2002, A\& A, 395, 1076} appears moderately
often in images that \AIPS\ users need for comparison with their radio
data.  \AIPS\ has been revised to handle some of the more global
coordinate systems in a manner incorporating much of the more
commonly used generality.  Coordinate systems previously known to
\AIPS\ (Sanson-Flamsteed previously called global-sinusoidal,
Mercator, and Hammer-Aitoff) were revised and new ones (Plate-Caree,
Molweide, and Parabolic) were added.  The old \AIPS\ mathematics
worked correctly as long as the latitude reference pixel had a value
of zero.  The big change arises when the latitude reference value is
not zero.  In the new agreement, the ``native'' coordinate system of
the projection has by definition reference longitude and latitude
equal to zero, but the celestial coordinates become oblique when the
reference celestial latitude is not zero.  This is illustrated in
Figure 1.

\subsubsection{{\tt IMAGR}}

The main imaging and deconvolution task, {\tt IMAGR} received a number
of bug fixes in this half year, with one new option.  That option
allows the user to specify in the {\tt BOXFILE} ranges of facet
numbers to be entirely ignored in the cleaning steps.  The expected
usage is to ignore the more extended scales in the outer facets, but
any facet may be so specified.  This specification can be absolute or
allow a facet to be turned on interactively after it has been ignored
in earlier cycles.

Bug fixes include a slight difference in the formul\ae\ for memory
requirements between the ``planning'' stage and the execution stage
which was able to cause the task to shoot itself in the foot.  The
output header values for pointing (``observed'') position were
sometimes set to zero due to zeros from the data acquisition tasks;
the phase stopping coordinate is a better guess in that case.  If the
{\tt BOXFILE} defines a facet more than once, an error is now raised.
When {\tt IMAGR} is told to use a specific work file whose contents
are not currently good ({\tt ALLOKAY} $\leq 1.5$), the task deletes
the file and recreates it to insure that its structure fits current
needs.  If the user has accidentally specified some file in {\tt
  IN2NAME} \etal, this may result in unhappiness when a non-work $uv$
data set or image gets deleted.  {\tt IMAGR} was changed to try to
avoid this, when it can.  If the purported work file is in fact an
image, a compressed $uv$ data set, or a $uv$ data set with more than
one Stokes value, {\tt IMAGR} will quit with an error condition.
Unfortunately, uncompressed $uv$ data with one Stokes looks just like
an {\tt IMAGR} work file and cannot be protected.

\subsection{Image analysis}

\subsubsection{{\tt XGAUS} and {\tt RMFIT}}

{\tt XGAUS} was substantially overhauled.  In the new version, the
task starts by building and initializing a table with the fitting
results with one row for each pixel within {\tt BLC} to {\tt TRC}\@.
It then begins an interactive session trying to fit the Gaussian model
to every {\tt YINC}'th and {\tt ZINC}'th pixel.  Initial guesses are
based on the previous fit and, for each new row, the left-most fit in
the previous row.  If things are going well, the user may turn of
interactivity to allow the task to find initial guesses and fits by
itself.  Interactivity will turn back on automatically if a bad answer
is found.  After this pass through the data, {\tt XGAUS} will then go
through the data doing interactive fits at very pixel that has not
already been fit.  The results of the fitting are stored in the table
as soon as they are determined.  This means that the user may elect at
any time to exit the task and resume the fitting at the next
convenient time.  The task may also be restarted with a higher number
of Gaussians to be fit and/or a lower flux cutoff level for the
fitting.

After all pixels above specified cutoff levels have been fit, {\tt
  XGAUS} goes into a menu-driven ``editing'' mode.  The primary
purpose at this stage is to try to improve upon, or flag, the fits at
those pixels where the fit appears less than desirable.  There are
three methods for doing this.  The first is to establish the parameter
values (S/N in peak, peak residual, center values, width values, and
error in widths) which constitute desirable values.  There are
operations to review all fit pixels to see if they meet these criteria
and, if not, to flag the pixel or to try a new interactive fit on that
pixel.  The second method is to make a list of suspect pixels and then
to flag or re-fit those pixels.  The pixel numbers may be entered by
hand or by pointing at them while looking at images of the fit
results.  The third editing method is a swap of the results between
components $n$ and $m$ since the fitting task may confuse which
component number goes with those from previous pixels.  The swap may
be done on the pixel list or on an area marked with a TV blotch
function like that used in the {\tt AIPS} verb {\tt TVSTAT}\@.  This
editing phase will display images of the fit results including the
``flux'' (integral of the Gaussian in frequency) and their errors.
While looking at the image, you may engage in many of the familiar
image display functions to adjust the transfer function, color, and
zoom as well as examine pixel values with a {\tt CURVALUE}-like
function.  It is that last function that allows you to add pixels to
the list most easily.

When the user really believes that the results are as good as can be,
the task can be told to write out images of the residuals and of each
parameter and its uncertainty.

{\tt RMFIT} is a new task based on the overhauled {\tt XGAUS}\@.  It
follows the sequence of functions described above, but fits the data
with the model
\begin{eqnarray*}
   Q(i) & = & \sum_{j=1}^n P_j \cos ( 2 \theta_j + 2 {\rm RM}_j
               \lambda^2(i)) \\
   U(i) & = & \sum_{j=1}^n P_j \sin ( 2 \theta_j + 2 {\rm RM}_j
               \lambda^2(i)) \, ,
\end{eqnarray*}
where i is the spectral channel.  {\tt RMFIT} will attempt to fit $n$
polarization components of total polarization $P_j$, intrinsic
polarization angle $\theta_j$ and rotation measure ${\rm RM}_j$.  The
output of the Faraday rotation measure synthesis task {\tt FARS} is
used to provide the data from which initial guesses are found, while
the fit is done to transposed image cubes of the Q and U Stokes
parameters.  During fitting, the {\tt FARS} results are displayed as
amplitude and phase versus rotation measure to allow selecting the
initial guess.  Then the spectra of Q and U are displayed with the
initial guess and the fit in different colors.  After the user accepts
the result, the task repeats the process on the next pixel.

\begin{figure}
\centering
%\resizebox{!}{3.4in}{\gname{uvpltuv}\hspace{0.1cm}\gname{uvpltbf}}
\resizebox{!}{4.0in}{{\includegraphics{FIG/RMFIT.eps}}}
\caption{Result of {\tt RMFIT} at one pixel in a model image with two
  components.  The solid line is the guess based on the {\tt FARS}
  output rotation-measures at this pixel; the dots are both the data
  and the fit, which are indistinguishable at this high S/N.}
\end{figure}

{\tt RMFIT} is still in the early development phase.  It also differs
from {\tt XGAUS} in that it allows the spectral data to be weighted,
with weights provided either by an external text file or by fitting
the rms, by robust means, of each spectral channel in the Q and U
images.  The model may become more complicated.  Adding an optional
fit for spectral index is  one obvious improvement.  That will force
$P_j$ to be the polarization at some fiducial frequency (1 GHz is
widely used in \AIPS) rather than being the polarization at $\lambda =
0$.  More complex models, such as thick polarized emitters, may
require more advanced mathematical fitting methods.  The fitting code
currently used is the modified Levenberg-Marquardt algorithm used by
{\tt IMFIT} and {\tt XGAUS}, among others, in \AIPS\@.  It is fast and
converges well if the initial guess is not too bad.  An example fit to
one pixel of a model image is shown in Figure 2.

\subsubsection{Other analysis changes}
\begin{description}
\myitem{IMFIT,} {\tt JMFIT}, and {\tt MAXFIT} now return the new
        adverb {\tt FSHIFT} which provides a net shift parameter to be
        used to force the particular component to land exactly on a
        cell.
\myitem{FQUBE} was given a new option to control whether a fully
        blanked input image plane is written to the output image.  It
        also checks that each input image plane has a corresponding
        {\tt CG} table (Clean Gaussian) entry before allowing it to be
        written to the output image.
\myitem{COMB} attempts to scale the input images so that they are in
        units of Jansky per the {\it same} beam.  This caused issues
        which have been corrected in 'POLC' with noise values in {\tt
          BPARM} and with images not in Jansky/beam.
\myitem{IRING} was changed to include column labels and a column of
        uncertainties in the output text file.  It was corrected to
        use double-precision floats for its counters.
        Single-precision runs out of sensitivity on large images (\eg\
        7000 x 7000).
\myitem{FARS} was corrected to blank the output, computing nothing,
        for those pixels which were completely blanked on input.
        Previously it did something with such rows, producing
        microscopic output values which were almost, but not quite
        zero.
\myitem{AFARS} was corrected to handle its input headers more
        carefully; it tried to read more image planes than were
        present.
\end{description}

\subsection{General}

\begin{description}
\myitem{SETMAXAP} \hspace{2em} was changed to allow the user to
        request up to 12288 Mega-bytes in 64-bit computers.  This is
        1536 mega-words in the pseudo-AP since it is now implemented
        in double precision.
\myitem{IN5NAME,} \hspace{0.3em} {\tt IN5CLASS}, {\tt IN5SEQ}, and
       {\tt IN5DISK} are new adverbs to describe a fifth input data
       file (required by {\tt RMFIT})\@.  New verbs {\tt GET5NAME},
       {\tt M5CAT}, {\tt U5CAT}, {\tt IM5HEAD}, and {\tt Q5HEADER}
       support this fifth name set.
\end{description}

%\vfill\eject
\section{Patch Distribution for \OLDNAME}

Important bug fixes and selected improvements in \OLDNAME\ can be
downloaded via the Web beginning at:

\begin{center}
\vskip -10pt
{\tt http://www.aoc.nrao.edu/aips/patch.html}
\vskip -10pt
\end{center}

Alternatively one can use {\it anonymous} \ftp\ to the NRAO server
{\tt ftp.aoc.nrao.edu}.  Documentation about patches to a release is
placed on this site at {\tt pub/software/aips/}{\it release-name} and
the code is placed in suitable sub-directories below this.  As bugs in
\NEWNAME\ are found, they are simply corrected since \NEWNAME\ remains
under development.  Corrections and additions are made with a midnight
job rather than with manual patches.  Since we now have many binary
installations, the patch system has changed.  We now actually patch
the master version of \OLDNAME, which means that a MNJ run on
\OLDNAME\ after the patch will fetch the corrected code and/or
binaries rather than failing.  Also, installations of \OLDNAME\ after
the patch date will contain the corrected code.

The \OLDNAME\ release has had a number of important patches:
\begin{enumerate}
  \item\ Bandpass calibration was not applied to enough channels to
         support frequency smoothing afterward. {\it 2013-01-16}
  \item\ Tick increments were computed with an erroneous round-off
         parameter leading some tick marks to be plotted at offset
         values. {\it 2013-01-29}
  \item\ {\tt POSSM} had a variety of irritating bugs. {\it
         2013-02-05}
  \item\ {\tt FITLD} turned off DIGICOR corrections when the array
         name was not VLBA. {\it 2013-02-05}
  \item\ {\tt FITLD}, after correction 4, failed if it could not make
         a {\tt CQ} table. {\it 2013-02-18}
  \item\ {\tt CL2HF} aborted because of an internal name conflict {\it
         2013-02-19}
  \item\ {\tt PRTAB} had a format issue with large F formats (NDIG <=
         0).{\it 2013-03-01}
  \item\ {\tt COMB} did not do {\tt POLC} correctly when using
         constant noise values {\it 2013-04-04}
  \item\ {\tt AFARS} had a header bug causing it to try to write too
         much {\it 2013-04-05}
  \item\ {\tt FITLD} could get the {\tt EQUINOX} wrong in the {\tt SU}
         table  with FITS-IDI input {\it 2013-04-11}
  \item\ {\tt COMB} messed up scaling when combining two images with
         one of them not {\tt JY/BEAM} {\it 2013-05-03}
  \item\ {\tt FITLD} had a bad warning message, causing aborts on some
         machines. {\it 2013-05-21}
  \item\ {\tt BPASS} rounded times outward for each scan by too much
         {\it 2013-06-17}
  \item\ {\tt SETJY} used Perley 2010 coefficients but reported Perley
         2013 coefficients {\it 2013-06-26}
\end{enumerate}

\section{\AIPS\ Distribution}

We are now able to log apparent MNJ accesses and downloads of the tar
balls.  We count these by unique IP address.  Since some systems
assign the same computer different IP addresses at different times,
this will be a bit of an over-estimate of actual sites/computers.
However, a single IP address is often used to provide \AIPS\ to a
number of computers, so these numbers are probably an under-estimate
of the number of computers running current versions of \AIPS\@. In
2013, there have been a total of 795 IP addresses so far that have
accessed the NRAO cvs master.  Each of these has at least installed
\AIPS\ and 265 appear to have run the MNJ on \RELEASENAME\ at
least occasionally.  During 2013 more than 193 IP addresses have
downloaded the frozen form of \OLDNAME, while more than 525 IP
addresses have downloaded \RELEASENAME\@.  The binary version was
accessed for installation or MNJs by 350 sites in \OLDNAME\ and 525
sites in \RELEASENAME\@.  A total of 1104 different IP addresses have
appeared in one of our transaction log files.  Some of these numbers
are a bit lower than those of 2012 at a comparable date, while the
total is noticeably higher.

\centerline{\resizebox{!}{3.0in}{\includegraphics{FIG/PLOTIT13a.PS}}}

\vfill\eject
% mailer page
% \cleardoublepage
\pagestyle{empty}
 \vbox to 4.4in{
  \vspace{12pt}
%  \vfill
\centerline{\resizebox{!}{3.2in}{\includegraphics{FIG/Mandrill.eps}}}
%  \centerline{\rotatebox{-90}{\resizebox{!}{3.5in}{%
%  \includegraphics{FIG/Mandrill.color.plt}}}}
  \vspace{12pt}
  \centerline{{\huge \tt \AIPRELEASE}}
  \vspace{12pt}
  \vfill}
\phantom{...}
\centerline{\resizebox{!}{!}{\includegraphics{FIG/AIPSLETS.PS}}}

\end{document}
