%-----------------------------------------------------------------------
%;  Copyright (C) 2009
%;  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 2009 version

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

\newcommand{\AIPRELEASE}{June 30, 2009}
\newcommand{\AIPVOLUME}{Volume XXIX}
\newcommand{\AIPNUMBER}{Number 1}
\newcommand{\RELEASENAME}{{\tt 31DEC09}}
\newcommand{\NEWNAME}{{\tt 31DEC09}}
\newcommand{\OLDNAME}{{\tt 31DEC08}}

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

\newcommand{\MYSpace}{-11pt}

\normalstyle

\section{General developments in \AIPS}

\subsection{Happy birthday AIPS, changes in the \Aipsletter}

We started work on the software system now known as \AIPS\ on July 1,
1979, making it 30 years old.  Had we realized its longevity, would we
have had the nerve to start it?

With this issue, we have decided to discontinue 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
e-News 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.

\AIPS\ is now copyright \copyright\ 1995 through 2009 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}.

\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\ {\tt CALIB} could go into an infinite loop if the first {\tt
      NX} record was of 0 length {\it 2009-01-27}
\item\ {\tt TYAPL} would apply the highest flag table without
      permission when it should just be copied {\it 2009-02-04}
\item\ {\tt OFM} files were not adjusted to the new TV intensity
      ranges {\it 2009-04-02}
\item\ {\tt IMAGR} TV option {\tt FORCE A FIELD} caused all facets to
      be re-imaged; scratch files were way too large under some
      circumstances {\it 2009-04-22}
\item\ {\tt DBCON} copied keyword {\tt MAXBLINE} which confused later
      imaging routines {\it 2009-04-27}
\item\ {\tt IMAGR} had a limit test that was too small affecting
      restoration of large numbers of CCs from one facet to another
      {\it 2009-05-18}
\item\ {\tt IMAGR} had a tendency to sort input data sets when it did
      not really have to do so  {\it 2009-06-19}
\end{enumerate}

\section{Improvements of interest in \RELEASENAME}

We expect to continue publishing the \Aipsletter\ approximately every
six months along with the annual releases.  Henceforth, this
publication will be primarily electronic.  There have been several
significant changes in \RELEASENAME\ in the last six months.  The most
significant of these are new tasks and options in {\tt IMAGR} to
assist in boxing of sources.  New task {\tt SABOX} will prepare a
list of boxes by using a {\tt SAD}-like search over a set of facet
images.  New task {\tt FILIT} simplifies the interactive checking and
setting of boxes for a set of facet images, even those larger than the
TV display window.  {\tt IMAGR} now has the ability to add to the {\tt
  OBOXFILE} list of Clean boxes automatically.  A new verb {\tt
  ROAMOFF} was written to convert a TV display in {\tt TVROAM} mode
into a simple display which other \AIPS\ tasks and verbs can handle.
Another new verb {\tt DELAY} will let users put measured pauses into
scripts and procedures.  The new task {\tt RLCOR} will correct a
single- or multi-source data set directly for the RL phase difference.
({\tt CLCOR} will do this but only for multi-source data sets.)
Support for 64-bit Linux operating systems was added since it was
discovered that Intel-compiled load modules had a performance
improvement over those computed for 32-bit systems.

\OLDNAME\ contains major changes to the display software.  Older
versions may use the \OLDNAME\ display ({\tt XAS}), but \OLDNAME\ code
may not use older versions of {\tt XAS}\@.  {\tt 31DEC04} through
\RELEASENAME\ use a new numbering scheme for magnetic tape logical
unit numbers that is incompatible with previous versions.  Thus all
tape tasks and the server {\tt TPMON} must be from one of these six
releases.  Other than these issues, \RELEASENAME\ is compatible in all
major ways with the with the {\tt 15OCT98} and later releases.  There
are significant incompatibilities with older versions.

\subsection{Imaging}

Leonia Kogan noticed a clever way in which the ``W'' problem could be
recast allowing multiple facets to be imaged accurately while
remaining in the same coordinate system as the central tangent plane.
The mathematics of this method are described in \AIPS\ Memo 113 by
Kogan and Greisen available from the \AIPS\ web site.  The ``new''
mathematics have been implemented in {\tt IMAGR} when the adverb {\tt
  DO3DIMAG = FALSE}\@.  The previous imaging done with this parameter
set to false was known to be incorrect for significant shifts from the
center, but the present imaging is believed to be nearly as good as
that done with {\tt DO3DIMAG = TRUE}\@.  The latter produces facets on
different geometries, each tangent to the center of the facet.  The
implementation of both values of {\tt DO3DIMAG} is now very similar
and means that $u,v$ depend on facet.  This violates fundamental
structures in a variety of old software, causing tasks {\tt MX} and
{\tt HORUS} to be removed from \AIPS\@.

Although {\tt FLATN} will be needed in both cases to deal with
overlapping facets, bad corners, and the like, the regridding done
with {\tt DO3D FALSE} will be much simpler.  {\tt FLATN} was revised
recently to weight the corners of images --- actually all pixels
outside an inscribed ellipse --- much lower than those pixels inside
the ellipse.  These pixels are much less reliable in synthesis imaging
due to aliasing and accumulated mathematical error which is emphasized
in the corners of images.  The revised {\tt FLATN} provides a method
to avoid this down-weighting when the input images are reliable all
the way to the edge.

Boxing --- limiting Clean to portions of the input image only --- has
been well established as a method to reduce the problem of Clean
taking noise bumps as sources.  A completely unconstrained Clean often
finds 10-40\%\ more flux than is actually present in an image.  If
short spacings are missing, it is also capable of finding rather less
flux than is present.  However, in large imaging problems it is very
time consuming to create the list of Clean boxes by hand using
interactive verbs like {\tt TVBOX}, {\tt REBOX}, and {\tt FILEBOX} OR
their equivalents available with the TV display while {\tt IMAGR} IS
running.  {\tt IMAGR} has been given yet another array of parameters
{\tt IM2PARM}, the first of which are used to request and control a
new auto-boxing capability.  Each image facet is examined to find
``islands'' of emission above $ n \sigma$.  Those islands with a peak
greater than $F$, where $F = {\rm max} (m \sigma, f P)$, $m \geq n$,
$P$ is the current peak residual, and $f = 0.1$ by default, may become
a new Clean box if the peak is not already within a box.  Only the
strongest of these are actually taken as boxes at any one time.  The
maximum number of new boxes at any one time per facet, $n$, $m$, and
$f$ are set by {\tt IM2PARM}, along with the number of pixels by which
each box is extended outward and the diameter of the ellipse within
the facet image which is examined for the rms and the islands.

To assist with the boxing, two new tasks were also written.  {\tt
  SABOX} uses the algorithm described above on a set of facets to make
a list of boxes.  One might do a preliminary image of a field with no
boxing (\eg\ using the circles output by {\tt SETFC}) and then run {\tt
  SABOX} to produce a more accurate list of boxes for a deeper, more
careful Clean.  {\tt FILIT} is an interactive task that allows the
user to modify the list of boxes for a set of facet images.  It uses a
menu on the TV display to allow creation of new boxes, editing of
existing boxes, and auto-boxing.  It handles images larger than the TV
display with a {\tt TVROAM}-like function always followed by a {\tt
  ROAMOFF} capture of the current sub-image.  There is a full set of
image enhancement functions and a way to alter the auto-boxing
parameters while running the task.  {\tt FILIT} should be more
efficient than the {\tt FILEBOX} verb in {\tt AIPS}, which functions
only on a single sub-image of one facet at a time.

All interactive boxing routines were corrected to allow the display of
the inscribed ellipse.  Previously, they only understood circles, but
rectangular images call for ellipses as do images loaded with {\tt
  TXINC} not the same as {\tt TYINC}\@.  The creation of circular
Clean boxes will now display ellipses when the display increments are
not equal.

Three other changes were made to {\tt IMAGR} as well.  During Clean
with {\tt OVERLAP=2}, more than one facet is imaged at each cycle in
an attempt to reduce the number of times it has to cycle through the
$uv$ work file looking for the strongest facet.  This is useful some
of the time, but has proved costly at other times.  The parameter {\tt
  IMAGRPRM(18)} was added to allow users to limit the number of facets
imaged at each cycle.  During testing with very large data sets (100
Gbyte uncompressed), it was found that {\tt IMAGR} insisted on sorting
the data when an {\tt XY} sort was not required.  Bugs in handling the
sort test were found in two places and corrected to avoid excessive
and time consuming sorts.  The automatic restart of Cleaning after a
``final'' filtering was made an option, with the default being not to
do this.  The restart may be a good idea if the filtering (using {\tt
  IMAGRPRM(8)} and {\tt IMAGRPRM(9)}) changes the residual images
significantly.
\vfill\eject

\subsection{UV-data calibration and handling}

\begin{description}
\myitem{CALIB} continued to get corrections to the algorithm
               sub-dividing scans after the previous \Aipsletter.
               These made it into {\tt 31DEC08} directly and as
               patches.  The {\tt 31DEC09} version only was changed to
               avoid counting fully flagged data as ``failed''
               solutions.
\myitem{FRING} was corrected to remove a few spots that assumed the
               frequencies were in ascending order, after which it
               worked well on data in either order.
\myitem{VLANT} has had difficulties on some but not all Mac computers
               which were traced to a mysterious abort when the first
               record in a text file is null.  We will avoid that in
               the VLA data files henceforth.
\myitem{RLDIF} was changed in the order of averaging and the reported
               sigmas which are now reasonable.
\myitem{PCAL} now allows the user control over the updating of the
               source table with the source polarization solutions.
\myitem{RLCOR} is a new task to apply the {\tt POLR} corrections from
               {\tt RLDIF} directly to a data set; the {\tt CLCOR}
               route requires multi-source data.
\myitem{CLCOR} will now allow the {\tt POLR} {\tt OPCODE} on data
               which have not had {\tt PCAL} run although it cannot
               correct the solutions in that case.
\myitem{CLCOR} has a new {\tt OPCODE = 'IONO'} to correct delays for
               the ionosphere using data from an input text file.
\myitem{SPLIT} and {\tt SPLAT} were corrected to deal smoothly with
               sources for which no data are found.
\myitem{FITLD} was corrected to handle files written by {\tt FITAB}
               better.  Multi-file tapes had trouble retaining the
               original file name/class and the {\tt DOCONCAT}
               operation is no longer possible on such files.  They
               are now written correctly which means that information
               needed to decide about concatenation is not available
               until well past the point where it would be required.
\myitem{FILLM} was changed to use, by default, the system shadowing
               bit in those format versions for which it was correct
               and 25m for the other versions.  Shadowing is now
               correctly computed --- except for sub-arrays --- when
               the user specifies a shadowing diameter in the inputs.
               On-line {\tt FILLM} should now actually stop when
               requested and the observation code changes.
\end{description}

\subsection{Other UV-data matters}

\begin{description}
\myitem{POLARXY} the pole position will be tabulated in the usual arc
               seconds rather than the meters which was erroneously
               declared for \AIPS\@.  It is possible to tell the two
               units apart in the period 1979-2008 and all usages are
               checked and the units corrected if necessary.
\myitem{FLOPM} has a new option to reverse the IFs as well as the
               spectral channels.
\myitem{DIFUV} has a new {\tt OPTYPE = 'DIV'} that will divide one
               data set into another, making a gains file which can be
               plotted with {\tt UVPLT} and {\tt VPLOT}, et al.
\myitem{UVMOD} will now read in a text file with up to 9999 source
               components, allowing more general models including
               components of all types and spectral index.
\myitem{UVCON} was changed to use the $W$ term with the same sign as
               used in {\tt UVMOD} and {\tt IMAGR}\@.  It was enhanced
               to allow multiple IFs with frequencies specified in the
               inputs.
\myitem{LISTR} was changed in a variety of ways to improve the {\tt
               LIST} and {\tt MATX} displays, including avoiding
               missing antennas and controlling whether a baseline is
               shown both as $n-m$ and $m-n$.
\myitem{CMODEL} was added to numerous tasks that compute models and
               the defaults were changed so that an error occurs on
               missing {\tt CC} tables only when they are required by
               the user.
\myitem{PRTAN} was corrected to stop confusing row number with antenna
               number and was changed to recognize the new {\tt EVLA}
               station names from the Widar correlator.
\end{description}

\subsection{Display and image analysis matters}

\begin{description}
\myitem{SNPLT} was given the option of plotting the locations of
               failed (blanked) solutions.
\myitem{TVROAM} creates a scrolled, split screen display that baffles
               most \AIPS\ TV functions.  Added defenses to those
               functions so that they don't do bad things if they
               encounter such a display.
\mylitem{ROAMOFF} is a new verb to take a display left by {\tt TVROAM}
               and convert it into a single-plane image of the selected
               sub-image.
\myitem{OFM files} were updated to the new range of TV intensities.
               They worked when used in plotting but not when loaded
               to the TV.
\myitem{ISPEC} and {\tt BLSUM} were given the option to save their
               results in {\tt SL}ice extension files and all slice
               plotting and fitting routines were adjusted to use them.
\myitem{XBASL} was improved in its defaults, in its behavior when not
               writing output images of the parameters, and in its
               setting of windows.  More information is now available
               in the {\tt EXPLAIN} section.
\myitem{WIPER} was changed to display during editing the $x,y$
               coordinates in the scaled units of the display and the
               menu was re-arranged to reduce the chance of
               inadvertent {\tt ABORT}s and {\tt EXIT}s.
\myitem{EDITR} {\tt EDITA}, {\tt SNEDT}, and the edits in {\tt SCMAP}
               and {\tt SCIMG} had a blank menu item added before
               {\tt ABORT} and {\tt EXIT} to avoid inadvertent use.
\end{description}

\subsection{System-wide matters}

\begin{description}
\myitem{LNX64} is a new ``operating system'' supported by \AIPS; it
               uses Intel-compiled tasks for 64-bit Linux computers
               and achieves some performance enhancement.
\myitem{DELAY} is a new verb to delay {\tt AIPS} by a specified number
               of seconds; it should be useful in scripts.
\mylitem{RENUMBER} verb can now renumber an image or data set to slot
               numbers larger than those currently on the disk.
\myitem{TIMDEST} verb has been rendered inaccessible --- it is really
               dangerous.
\myitem{USERID} adverb has been removed from all tasks and verbs
               except those that require it ({\tt DISKU}, {\tt MOVE},
               and {\tt PRTAC})\@.  It was left in all plot-file tasks
               to avoid breaking {\tt PLGET} and {\tt EXTLIST}, but
               those tasks now ignore the {\tt USERID} value entirely.
\end{description}

\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
2009, there have been a total of 1406 IP addresses so far that have
accessed the NRAO cvs master.  Each of these has at least installed
\AIPS\ and {\bf 310} appear to have run the MNJ on \RELEASENAME\ at
least occasionally.  During 2009 more than 196 IP addresses have
downloaded the frozen form of \OLDNAME, while more than 685 IP
addresses have downloaded \RELEASENAME\@.  The binary version was
accessed for installation or MNJs by 348 sites in \OLDNAME\ and 588
sites in \RELEASENAME\@.  The attached figure shows the cumulative
number of unique sites, cvs access sites, and binary and tar-ball
download sites known to us as a function of week --- so far --- in
2009.  These numbers are more than 12\%\ greater than those reported
one year ago for last year's releases.
\vfill\eject
%\vspace{12pt}

\centerline{\resizebox{!}{3.1in}{\includegraphics{FIG/PLOTIT9a.PS}}}


\section{Recent \AIPS\ and related Memoranda}

All \AIPS\ Memoranda are available from the \AIPS\ home page.  There
are three new memoranda in the last six months.  In addition, a paper
entitled "Aperture Synthesis Observations of the Nearby Spiral NGC
6503: Modeling the Thin and Thick Disks" by Greisen, E. W, Spekkens,
K., \&\ van Moorsel, G. A. has appeared in the Astronomical Journal,
volume 137, pages 4718-4733.  It contains an appendix which is a good
description of imaging  in \AIPS\ and may be useful as a reference.

\begin{tabular}{lp{5.8in}}
{\bf 113} & {\bf Faceted imaging in \AIPS}\\
   &  Leonid Kogan \&\ Eric W. Greisen (NRAO)\\
   &  May 22, 2009\\
   &  ``Image-plane faceting,'' in which each small image plane or
      facet is computed as tangent to the celestial sphere, has been
      the solution to the ``W problem'' in \AIPS\ for some time.  This
      memo describes another approach in which the facets are all in
      the same plane which is tangent to the sphere at the center of
      the field of view.  This ``uv-plane faceting'' method may have
      some computational advantages and has replaced the {\tt DO3DIMAG
        = FALSE} methods in \AIPS\@.
\end{tabular}

\begin{tabular}{lp{5.8in}}
{\bf 114} & {\bf The FITS Interferometry Data Interchange Convention}\\
   &  Eric W. Greisen (NRAO)\\
   &  June 25, 2009\\
   &  The FITS Interferometry Data Interchange Convention
     (``FITS-IDI'') is a set of conventions layered upon the standard
     FITS format to assist in the interchange of data recorded by
     interferometric telescopes, particularly at radio frequencies and
     very long baselines.  It is in use for the VLBA telescope for
     data from the current hardware correlator and the future software
     correlator and has also been used with other correlators such as
     the JIVE correlator for the EVN.  This convention is intended to
     separate a standard set of conventions from those used within
     particular software packages such as \AIPS.
\end{tabular}

\begin{tabular}{lp{5.8in}}
{\bf 115} & {\bf Auto-boxing for Clean in \AIPS} \\
   &  Eric W. Greisen (NRAO)\\
   &  June 29, 2009\\
   &  Cotton (EVLA Memo~116) has demonstrated the importance of
      constraining the Clean deconvolution to search for model
      components only within restricted regions (``Clean boxes'') of
      the dirty image.  An option to create such boxes in an unbiased
      and automatic fashion has been added to the \AIPS\ task {\tt
      IMAGR} and two new tasks have been written to find these boxes
      in images which have already undergone a preliminary Clean.
      This memo describes the implementation of auto-boxing in \AIPS.
\end{tabular}

\vfill\eject
\hphantom{.}
\vfill
\centerline{This page deliberately left blank}
\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}
