%-----------------------------------------------------------------------
%;  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
%-----------------------------------------------------------------------
% Summary of standard aips mapping process
% last edited by  glen langston
\documentstyle{article}
\newcommand{\lastedit}{{\it 91 May 7}}
\large
\parskip 4mm
\textwidth 6.5in
\linewidth 6.5in
\marginparsep 0in
\oddsidemargin 0in
\evensidemargin 0in
\topmargin -.5in
\headheight 0in
\headsep 0.25in
\textheight 9.in
\headheight 0.25in
\pretolerance=10000
\parindent 0in

\newcommand{\beq}{\begin{equation}}       % start equation
\newcommand{\eeq}{\end{equation}}
\newcommand{\beddes}{\begin{description} \leftmargin 2cm} % description list
\newcommand{\eeddes}{\end{description}} % description list
\newcommand{\backs}{$\backslash$}
\newcommand{\myitem}[1]{\item{\makebox[3cm][l]{\bf {#1}}}}
\newcommand{\mybitem}[1]{\item{\makebox[0.65cm][l]{\sc {#1}}}}
\newcommand{\AIPS}{{$\cal AIPS$~}}
\newcommand{\uvdata}{{{\it uv}-data~}}
\newcommand{\APEIN}[1]{{\normalsize \sc {#1}}}
\newcommand{\IF}{{\normalsize \sc IF}~}
\newcommand{\UV}{{\it uv}}
\newcommand{\etal}{{\it et al.}~}
\newcommand{\SN}{{\normalsize \sc SN}~}
\newcommand{\SU}{{\normalsize \sc SU}~}
\newcommand{\CL}{{\normalsize \sc CL}~}
\newcommand{\CELLS}{{\normalsize \sc CELLSIZE}~}
\newcommand{\IMSIZ}{{\normalsize \sc IMSIZE}~}
\newcommand{\SOLINT}{{\normalsize \sc SOLINT}~}
\newcommand{\MX}{{\sc MX}~}
\newcommand{\CLIP}{{\sc CLIP}~}
\newcommand{\CCFND}{{\sc CCFND}~}
\newcommand{\UVPRM}{{\sc UVPRM}~}
\newcommand{\CALIB}{{\sc CALIB}~}
\newcommand{\MAPIT}{{\sc MAPIT}~}
\newcommand{\MG}{{\sc MG1654+1346}~}
\newcommand{\TCTES}{{\normalsize \sc 3C286}~}
\newcommand{\TCOTE}{{\normalsize \sc 3C138}~}
\newcommand{\normalstyle}{\baselineskip 7mm \parskip 4mm \large}
\newcommand{\tablestyle}{\baselineskip 3mm \parskip 0mm \normalsize }

\begin{document}
\pagestyle{myheadings}
\newcommand{\HEADING}{{\it \AIPS Mapping Summary: {\sc MAPIT}}
\hfill Page~~}
\markboth{\HEADING}{\HEADING}
\vskip -.5cm
\pretolerance 10000
\normalstyle
\listparindent 0cm
\labelsep 0cm
\centerline{\Large{\it \AIPS Imaging and Self-Calibration: MAPIT}}
\centerline{\lastedit}
\begin{quote}
This document describes the Astronomical Image Processing System
(\AIPS) procedure called \MAPIT, which automatically maps
and self-calibrates \uvdata.
The \MAPIT procedures are useful to scientists who are
interested in quickly producing higher dynamic range (1000:1)
images from calibrated \uvdata.
For radio sources small compared to the primary beam of the
VLA, \MAPIT rapidly produces high quality images for the
standard VLA frequencies.
\MAPIT is particularly suited to VLA Snap-shot observations.
It has also been extensively tested with VLBI data.
\end{quote}
The \MAPIT procedures are explained with an example below.
For information and hints concerning \AIPS, see the \AIPS
cookbook.
The \MAPIT procedures require calibrated single-source \uvdata
in {\it UN}-compressed form.
For an example of calibrating \uvdata also see the
{\it Summary of \AIPS \uvdata Calibration} (\AIPS Memo 68, April 1991).

In the example below, the Gentle User has calibrated
continuum \uvdata and wishes to
fourier transform the data in order
to show their scientific break-through.
The Busy User uses the \AIPS uses the procedure \MAPIT
to fourier transform and self-calibrate the \uvdata.
The procedures are created within the \AIPS
environment using a {\it runfile}.

The MAPIT procedures will produce much better results if
most spurious \uvdata have been removed.
Some helpful commands for first examining the \uvdata
are listed below.

\begin{description}
\myitem{UVPLT} Plot your \uvdata in a variety of ways to
determine data quality and learn what to expect in the
fourier transformed images.  Never print more that
2000 UV points by setting \APEIN{XINC}.
In the example,
the sources has 15000 visibilities so \APEIN{XINC=15000/2E3}.
\APEIN{TASK='UVPLT'; BPARM=6,7,0; INP; GO}.~
When \APEIN{UVPLT} has finished, use \APEIN{QMSPL, LWPLA, TVPL} or
\APEIN{TXPL} to print the results.
Plot source amplitude as a function of time:
\APEIN{TGET UVPLT; BPARM=11,1,0; INP; GO}.  Next plot
source amplitude as a function of \UV-spacing:
\APEIN{TGET UVPLT; BPARM=0; INP; GO}.
\end{description}

%\clearpage
\centerline{{\MAPIT}}

Next, the Busy User will produce a quick, but often adequate,
image of there scientific break-through using the \AIPS procedure
\MAPIT.  The procedures needed to run \MAPIT are
created using an \AIPS runfile (\APEIN{RUN MAPIT}).  The user
next selects the source for imaging, checks inputs
and runs the procedure (i.e. \APEIN{GETN ?; INPUT MAPIT; MAPIT}).

The inputs to \MAPIT are described below.
Note that ONLY the input source Name is required.
(i.e.. \APEIN{INNAME='MY SOURCE';INCLASS='UVDATA';INDISK=?})
Defaults will be found for all other parameters.

\beddes
\myitem{INNAME} Input Name of \uvdata set.  The \uvdata
must be calibrated, and in single source format.
(See \APEIN{HELP CALIB; HELP SPLIT})
\end{description}
\clearpage
\normalstyle
\begin{figure}[b]
\vskip 3in

{\it \hskip 1.5in Antenna Locations \hfill $kilo \lambda$ \hskip 1.5in}

{\it \hskip 1.5in a) \hfill b) \hskip 1.5in}

\tablestyle

{\bf Figure 1:}
{\it a)} PRTAN output showing the locations of the antennas at
the time of observation.  {\it b)} UVPLT output showing
the location of the antenna pairs in the {\it uv} plane.
Note there are $N$ antennas and $N \times (N - 1) / 2$ pairs of
antennas at each observation.  The \uvdata are from a 3.6 cm
VLA A-array snapshot of Einstein Ring \MG.

\vskip 12pt

Use UVPLT to determine the types of errors in the data and learn the
basic source structure.  Choose XINC so that the total number of TGET
UVPLT; BPARM = 0; INP; GO.  For point sources it is easy to see the
points that deviate from the average.  Use the \AIPS\ tasks UVFND to
find the bad points and UVFLG to flag the bad points.

%\begin{figure}[b]
\vskip 3in
{\it \hskip 1.5in a) \hfill b) \hskip 1.5in}

{\bf Figure 2:}
{\it a)} Correlated Amplitude versus Antenna separation and {\it b)}
Correlated Amplitude versus Time of observation for a 3.6 cm
VLA A-array snapshot \MG.
\end{figure}
\clearpage
\beddes
\myitem{IN2NAME} Input Name of a Point source observed
with the program source.  This UV data is only used to find the
reference antenna for Self-Calibration.
\myitem{INDISK} Disk containing \uvdata.
\myitem{OUTDISK} Disk to contain output images and clipped
\uvdata.
\myitem{CELLSIZE} X and Y size of pixels in output image.
The \CELLS is related to the ``average'' \UV-spacing of the
observation.  The default is found using the task \APEIN{\UVPRM}.
If the maximum \UV-spacing is $U_{MAX} ~ \lambda$, the cellsize is
set by the equation
\APEIN{CELLSIZE=$2.06 \times 10^5 / (4 * U_{MAX})$}.
\myitem{IMSIZE} The output image size in pixels.  Determined
by the source size and the patience of the User.  Default is 512
pixels square.
\IMSIZ must be a power of 2; i.e. 64, 128, 256, 512, 1024,
2048, or 4096
\myitem{GAIN} Clean gain for {\it Clark} deconvolution
algorithm.  The default value, \APEIN{GAIN=0.05},
is good for most cases.  The small value of \APEIN{GAIN} is
important for the latter clean component selection
algorithm.
\setcounter{page}{3}
\myitem{NITER} Number of clean iterations. The default value
is \APEIN{NITER=1000}, but more iterations may be needed for
large complex sources.
\myitem{REFANT} Reference antenna for Self-calibration.  This
antenna should be one near the center of the array.
The default is chosen by the task \APEIN{\UVPRM}, by computing
the RMS noise as a function of antenna.
\myitem{SOLINT} Solution interval (in minutes) for Self-calibration.
This parameter a complex function of the signal-to-noise ratio
of the observation and the phase fluctuations of the atmosphere.
The default is 5 minutes.
\myitem{NMAPS} Number of Mapping and Self-calibration loops.
One source map is produced each loop.  After each map
is produced, the \UV-data are Self-Calibrated.
The source model clean components are found using the task
\APEIN{\CCFND}.  The default is 3 passes.
\myitem{DOPOL} Produce polarized intensity maps if \APEIN{DOPOL > 0}.
Requires that the \uvdata are polarization calibrated.
\myitem{DOCENTER} Move Source to map center if \APEIN{DOCENTER > 0}.
If requested, a large field of view map is produced and the
map peak is shifted to the center for all later images.
\myitem{DOALL} Do all types of Self-Calibration (i.e.. both phase and
amplitude self calibration).  IF \APEIN{DOALL > 5} then it
is used to determine when amplitude self-calibration is performed.
Amplitude self calibration is done only when the PEAK of the input model
is DOALL*RMS noise in the map.  (IF \APEIN{DOALL < 5} then amplitude
self calibration is done when the PEAK is 30 times the noise.)
\myitem{FLUX} Max flux level of \uvdata clipped before de-convolving.
A new clipped copy of the \uvdata is created with visibilities
limited to between 0 and FLUX Jy.  If FLUX is zero, the source
flux is estimated and the average visibility noise is used to
estimate a safe flux upper limit (many sigma above the source flux).
If FLUX is negative, no clipping is performed.
\myitem{UVTAPER} Width of Taper to apply to \uvdata (kilo-$\lambda$).
Should only be set if you are trying to find extended structures.
Default is no tapering.
\myitem{UVRANGE} Allow only sub-set of \uvdata to be include
in the source image.  Should only be used if some \uvdata
are thought to be bad.  Default is to include all \uvdata.
(Note \APEIN{UVRANGE} has two values, a minimum and max
\UV-spacing in units of Kilo-$\lambda$)
\myitem{UVWTFN} Weighting function for data. To use
natural weighting set \APEIN{UVWTFN='NA'}.
Uniform weighting generally
yields better resolution, while natural weighting yields
better signal-to-noise ratio.
\myitem{NBOX} Number of clean boxes in the image. Should be zero
during the first use of MAPIT.  However, if you know where you
source is, using boxes speeds {\it and} improves deconvolution.
\myitem{BOXES} Array of locations of the N clean boxes (in pixels).
In order to use \APEIN{BOXES}, a first map must be made and the
\APEIN{CELLSIZE} specified to \MAPIT.
\myitem{BMAJ} Major axis of the clean restoring beam.  If zero,
the clean beam is measured.  If BMAJ is negative, only the residual
noise is left in the image.  This is very useful for determining
problems with your \uvdata.  The cleaned map
can later be restored with the task \APEIN{RSTOR}.
\myitem{BADDISK} Disks to avoid for scratch. Should be used
if some of the system disks are faster than others.
\end{description}

\centerline{\bf Notes on Imaging}
Below a few of the \MAPIT fine points are described in more detail.

\beddes
\myitem{\CELLS} The angular size of the pixels must be calculated
for each image.
The \CELLS is determined by the range of antenna spacings and the
wavelength of the observations.
The angular resolution of your
observation is determined by the equation below.
\beq
\theta = \frac{\lambda}{D} \propto
\frac{1}{kilo~\lambda} \times 206 ~ arc~seconds
\eeq
The maximum separation of the antennas, $D$, and the wavelength
of the observation, $\lambda$, are measured in meters.
The factor $\frac{180}{\pi} \times 60 \times 60 = 206,264.8$
converts $\lambda^{-1}$ to arc seconds.
For \MX to work properly,
the \CELLS should be one third to one forth of $\theta$,
i.e. \CELLS = $\theta/3$.
The sample observations were made at a wavelength of 3.6 cm,
so $\theta_{BEAM} = \frac{0.036}{25} \times 2.06 \times 10^5 \sim
 300 ~ arc ~ seconds$.

The locations of aliased images of objects outside the field of
view depends on \CELLS.  To avoid freezing these aliases into the
image, \CELLS is varied by a few percent for successive self
calibration executions.
\myitem{\IMSIZ} The image size is determined by the size of the
Primary Beam of the telescope.
\beq
\theta_{BEAM} = \frac{\lambda}{25~meters} \times 2.06 \times 10^{5} ~
arc~seconds.
\eeq
The first map should show a large part of the primary beam.
Set \IMSIZ to the number of pixels with size \CELLS to cover
a size of diameter $\theta_{BEAM}$.
Unless \IMSIZ is specified, \IMSIZ will be no greater than 512 pixels.
\myitem{\SOLINT} The Self-Calibration solution interval is a complex
function of the signal-to-noise ratio of the observation.
Generally, \SOLINT should be as short as possible to allow corrections
for atmospheric fluctuations, but must be long enough to provide
a good fit to the source model.
Different ``typical'' values are used for different wavelengths and
weather conditions.

A trial and error method for determining \SOLINT is to vector average
the amplitudes of
the \uvdata for a number of averaging times.  A reasonable
value for \SOLINT is the averaging time for which the vector average
of the data is half the scalar average.

The default value for \SOLINT is half the observation time,
up to a maximum of 5 minutes.
After the first two self-calibration executions, \SOLINT
is decreased.
On the final phase self calibration,
\SOLINT is one quarter of the original \SOLINT value.
Comments and suggestions are welcomed on this topic.
\myitem{\CLIP} If the \uvdata are not compressed,
the data will be clipped to eliminate spurious high points.
The upper limit to the clipping flux is estimated based
on the average amplitude of the \uvdata at the shortest
spacings, and the RMS noise of the \uvdata.
\myitem{\CCFND} In order to self-calibrate \uvdata,
a source model is needed.
The task \APEIN{CCFND} selects ``significant'' clean components
for the source model.
The significant clean clean components are those brighter
than twice the brightness of the first negative clean component.
For Amplitude and Phase self calibration, all CCs brighter than
the first negative clean components are used.
\myitem{\UVPRM} After the source model has been found,
the \uvdata are self-calibrated.
However, self-calibration will only succeed if the source
model well represents the \uvdata.
Typically, with the \MAPIT algorithm the shortest \uvdata
antenna separations are not well represented in the first
models.  The task \APEIN{UVPRM} determines what \uvdata
spacings are represented by the source model.
\myitem{\CALIB} The \AIPS self-calibration task
has many inputs and a few are described here.  \CALIB
calculates a model for the \uvdata based on the input
image, and calculates {\it antenna based} corrections
based on a fit of the \uvdata to the model.
\MAPIT uses solution type, \APEIN{SOLTYP=L1}; this
is fit which depends linearly on the difference between
the model and the data.  This solution type is less
sensitive to wild data points than the more common least
squares fit.
No data are flagged in the \MAPIT executions of \CALIB,
by setting \APEIN{APARM(9)=1}.  The data with a
signal to noise ratio less than 3 are excluded from the
\CALIB solution (\APEIN{APARM(7)=3}).
On all but the 75 \% of the passes,
only the antenna phases are calibrated.
On the final passes, the antenna amplitudes are also calibrated.
\myitem{\sc MAPIT\_MX} The \MX adverbs not modified by
\MAPIT are listed in by \APEIN{INPUT MAPIT\_MX}.
These are also inputs to \MAPIT, but are not as commonly
modified by the novice user.
\myitem{\sc BATCH} The \MAPIT procedures have been tested
in the \AIPS batch system.
To reduce un-needed printer output, the batch file
should include the verb \APEIN{CLRMSG} on the last line.
\end{description}

\centerline{{\bf Appendices}}

This document includes appendices showing the \MAPIT inputs,
and the images for successive passes of self-calibration.
Also a listing of the \MAPIT procedures is included along
with \AIPS general help.

\vskip .25in
Please send comments to Glen Langston, NRAO C'ville.
E-mail address: glangsto@nrao.edu

\clearpage
\centerline{Appendix A: \MAPIT inputs and results}
Inputs for the \MAPIT procedures used to create images
of Einstein Ring \MG
(Langston \etal 1990, {\it Nature}, {\bf 344}:43)
are listed below.
The \uvdata consists of a VLA A-array and B-array
snapshots.
The observations at 3.6 cm of this source are a good
example of the importance of self-calibration
on images of extended sources.

\MAPIT produces an number of diagnostic messages and plots.
A selection of these messages are also given below.

%\input{mapitlog.tex}
% mapit execution log
% last editted by glen langston
% last editted on 1991 May 9
\tablestyle

\begin{verbatim}
>run mapit
>indi=2; getn 8; in2di=2; get2n 4; outdi=1
>niter=5000; baddi=2,3,4,5,6,0
>zerosp=.15,4,4,0,1
>flux=0.25; doall=1
>input mapit
AIPS      MAPIT:  Procedure to CLEAN and Self-Calibrate UVDATA
AIPS      Adverbs         Values            Comments
AIPS      ----------------------------------------------------------------
AIPS      INNAME     '1654        '          Input UV data (name)
AIPS      INCLASS    'DBCON '                Input UV data (class)
AIPS      INSEQ         1                    Input UV data (seq. #)
AIPS      INDISK        2                    Input UV data disk drive #
AIPS      IN2NAME    '            '          Point Source UV data (name)
AIPS      IN2CLASS   '      '                Point Source UV data (class)
AIPS      IN2SEQ        0                    Point Source UV data (seq. #)
AIPS      IN2DISK       1                    Point Source UV disk drive #
AIPS      OUTDISK       1                    Output image disk drive #
AIPS      CELLSIZE      0           0        (X,Y) size of grid in asec
AIPS      IMSIZE        0           0        Image size
AIPS      NITER      5000                    Number of clean iterations
AIPS      REFANT        0                    Reference ant. for Self-cal.
AIPS      SOLINT        0                    Solution interval (min)
AIPS      NMAPS         0                    Number of Map-Selfcal loops
AIPS      DOPOL         0                    >0: Produce Polarization maps
AIPS      DOCENTER     -1                    >0: Move Source to map center
AIPS      DOALL         1                    >0: Do amplitude self-cal
AIPS      FLUX           .25                 Clip Flux Limit. <0: No Clip
AIPS      UVTAPER       0           0        Taper to apply to UV data
AIPS      UVRANGE       0           0        Range of UV data to include
AIPS      UVWTFN     '  '                    Weighting function for data
AIPS      GAIN          0                    Clean Gain
AIPS      NBOXES        3                    Number of boxes for CLEAN
AIPS      BOX         243         217        Four coordinates for each box
AIPS                  296         276         202         343
AIPS                  210         357         223         269
AIPS                  233         288        *rest 0
AIPS      BMAJ          0                    FWHM(asec) maj. axis beam
AIPS      BMIN          0                    FWHM(asec) min. axis beam
AIPS      BPA           0                    CLEAN beam position angle
AIPS      BADDISK       2           3        Disks to avoid for scratch.
AIPS                    4           5           6        *rest 0

>inp mapit_mx

AIPS      MAPIT_MX: MX Adverbs not changed by MAPIT
AIPS      Adverbs         Values            Comments
AIPS      ----------------------------------------------------------------
AIPS      BCHAN         1                    Low freq. channel 0 for cont.
AIPS      ECHAN         0                    Highest freq channel
AIPS      CHANNEL       0                    Restart channel number
AIPS      NPOINTS       1                    Number of chan. to average.
AIPS      CHINC         1                    Channel incr. between maps.
AIPS      BIF           0                    First IF in average.
AIPS      EIF           0                    Last IF in average.
AIPS      NFIELD        1                    Number of fields (max. 16)
AIPS      FLDSIZE    *all 0                  Size of each field.
AIPS      RASHIFT    *all 0                  RA shift per field (asec)
AIPS      DECSHIFT   *all 0                  DEC shift per field (asec)
AIPS      ZEROSP         .15        4        0-spacing flux and weights
AIPS                    4           0           1
AIPS      XTYPE         5                    Conv. function type in x
AIPS      YTYPE         5                    Conv. function type in y
AIPS      MINPATCH     51                    Min. BEAM halfwidth in AP.
AIPS      PHAT          0                    Prussian hat height.
AIPS      DOTV          1                    >0 => display residual field
AIPS      CMETHOD    '    '                  Modeling method:'DFT','GRID'

\end{verbatim}

\begin{verbatim}
>mapit
AIPS      #####################################################
AIPS      #    CHECKING INPUT
AIPS      #####################################################
AIPS      #####################################################
AIPS      #    MIN AND MAX UV-RANGE
AIPS      #####################################################
UVPRM     Task UVPRM  (release of 15JUL91) begins
UVPRM     Average Flux < 2.500E-01 Jy at  1.211E+04 lambdas
UVPRM     Reference Antenna  =   4, RMS =  1.995E-02 Jy
UVPRM     Source Flux  = 8.642E-02  +/-    4.061E-04 Jy
UVPRM     FNDUV:      15293 Points Examined
AIPS      #####################################################
AIPS      # DURATION OF OBSERVATION  (MIN):        24         #
AIPS      # MAXIMUM UV RANGE (KILO-LAMBDA):       970         #
AIPS      # PIXEL SIZE       (ARC SECONDS):          .0531    #
AIPS      # VLA PRIMARY BEAM (FWHM PIXELS):      6039         #
AIPS      # IMAGE SIZE            (PIXELS):       512         #
AIPS      #####################################################
AIPS      #####################################################
AIPS      # CLIPPING POINTS BRIGHTER THAN            .25      #
AIPS      #####################################################
CLIP      Create 1654        .UVCLIP.   1 (UV)  on disk 1 cno   14
CLIP      IF  1 Ch   1 Corr 1 Pass    .0000 to    .2500 # Flagged        2
CLIP      IF  1 Ch   1 Corr 2 Pass    .0000 to    .2500 # Flagged        4
CLIP      IF  1 Ch   1 Corr 3 Pass    .0000 to    .2250 # Flagged        6
CLIP      IF  1 Ch   1 Corr 4 Pass    .0000 to    .2250 # Flagged        6
AIPS      #####################################################
AIPS      #    PLOTTING UV-DATA
AIPS      #####################################################
...
UVPLT     PLTUV:       1911 Points plotted
...
TXPL                 Amplitude vs UV dist for 1654.UVCLIP.1   Source:16528
TXPL                 Antennas  * - *     Stokes I    IF#  1
TXPL                 |++-------+--------+--------+--------+--------+
TXPL                 |||                                           |
TXPL              100|++                                          -+
TXPL            M    ||+                                           |
TXPL            i    ||+                                           |
TXPL            l  80|++                                          -+
TXPL            l    ||+-.                                         |
TXPL            i    |`++|                                         |
TXPL            J    |++O|+|                                      -+
TXPL            a  60| |O+*|                                       |
TXPL            n    | `@+++|.                                     |
TXPL            s    |  @U#|++--                                   |
TXPL            k  40|- @U#|+*.+|   |                             -+
TXPL            y    |  +@#|#++++|  +..  .    .                    |
TXPL            s    |  .++++##+#+-.+||.  .  |` .   +              |
TXPL               20|-  ++++@@#*+=.#|=+-++ |++ +: .   -  -  +`   ++
TXPL                 |   +++|@++ @#|@##++++ +#+++. #+  *. + .+. ++-|
TXPL                 |   |++|#++ +@|#+++++* ++*@#| #+  *  + |#| +++|
TXPL                0|=---+-+=+=-+++++-++++--+++++-+---+--+--+----++
TXPL                 .0       .2       .4       .6       .8
TXPL                                  Mega Wavlngth
UVPLT     PLTUV:       1911 Points plotted
TXPL                 Amplitude vs Time hrs for 1654.UVCLIP.1   Source:1658
TXPL                 Antennas  * - *     Stokes I    IF#  1
TXPL                 |------+------+------+------+-----+------+---++
TXPL                 |                                            ||
TXPL              100|-                                           ++
TXPL            M    |                                            ||
TXPL            i    |                                            ||
TXPL            l  80|-                                           ++
TXPL            l    |       +                                    ||
TXPL            i    |       +                                    ||
TXPL            J    |-      +                                    ++
TXPL            a  60|       +                                    ||
TXPL            n    |       +                                    ||
TXPL            s    |       +                                    ||
TXPL            k  40|-      +                                    ++
TXPL            y    |       +                                    ||
TXPL            s    |       +                                    ||
TXPL               20|-      +                                    ++
TXPL                 |       +                                    ||
TXPL                 |       +                                    ||
TXPL                0|=-----++-----+------+------+-----+------+---++
TXPL                00     20   116    212    308    404    500
TXPL                                   IAT (HOURS)
...
AIPS      #####################################################
AIPS      #    GET REFERENCE ANTENNA
AIPS      #####################################################
UVPRM     Average Flux < 2.500E-01 Jy at  1.211E+04 lambdas
UVPRM     Reference Antenna  =   4, RMS =  1.995E-02 Jy
UVPRM     Source Flux  = 8.642E-02  +/-    4.061E-04 Jy
UVPRM     FNDUV:      15293 Points Examined
AIPS      #####################################################
AIPS      #    DE-CONVOLVING
AIPS      #####################################################
AIPS      Image=1652+138  (UV)         Filename=1654        .UVCLIP.   1
AIPS      # visibilities     15293     Sort order  TB
AIPS      --------------------------------------------------------------
AIPS      Type    Pixels   Coord value  at Pixel    Coord incr   Rotat
AIPS      COMPLEX      3    1.000000E+00       1    1.0000E+00     .00
AIPS      STOKES       4    RR                 1       -1.0000     .00
AIPS      FREQ         1    8.414900E+09       1    5.0000E+07     .00
AIPS      RA           1    16 52 23.790       1       .000000     .00
AIPS      DEC          1    13 51 08.360       1       .000000     .00
AIPS      --------------------------------------------------------------
MX        MXIN  : Sort ='TB' not 'X*', Using Un-sorted gridding
MX        Create 1654        .IBEAM .   1 (MA)  on disk 1 cno   17
MX        Create 1654        .ICLN  .   1 (MA)  on disk 1 cno   29
MX        Create 1654        .UVWORK.   1 (UV)  on disk 1 cno   42
MX        Using all     15293 Visibilities
MX        Got data     Time= 10:25:25 CPU time=      2.85
MX        UVTBUN: Weighting grid =   512 X   512, Box = 0
MX        UVGRTB: All   132 Rows in 1280k AP (  263 Rows Max)
MX        UVGRTB: Max U Baseline      935133. lambda (=  125 cells)
MX        UVGRTB: Frequency 8.414900E+09 Hz
MX        UVZRWT: Zero spacing  1.000E-01, Weight  5.000E-01
MX        UVZRWT: Maj, Min Ax.  4.000E+00", 4.000E+00", Angle     .0 Deg
...
AIPS      #####################################################
AIPS      #    FINDING RMS NOISE IN IMAGE
AIPS      #####################################################
...
AIPS      #####################################################
AIPS      # SOURCE     1654            , RMS =      .00014    #
AIPS      #####################################################
AIPS      #####################################################
AIPS      # LOOP            1          OF           3         #
AIPS      #####################################################
AIPS      #####################################################
AIPS      #    SELECT CLEAN COMPONENTS
AIPS      #####################################################
...
CCMRG     Wrote       551 CLEAN components to CC file version  1
CCFND     Component       468 has Flux      .000022 >       .000021 Jy.
CCFND     Sum up to       468 is  Flux      .076856 Jy.
UVPRM     Average Flux < 7.686E-02 Jy at  3.234E+04 lambdas
...


AIPS      #####################################################
AIPS      #    SELF-CAL UV DATA
AIPS      #####################################################
AIPS      # NUM CLEAN COMPONENTS      468
AIPS      # REFERENCE ANTENNA           4
AIPS      # UV MINIMUM (K-LAMBDA)      48.4687
AIPS      # SOLUTION INTERVAL           5
AIPS      # SOLUTION MODE            P
AIPS      #####################################################
...
CALIB     CALIB USING 1654         . UVCLIP .   1 DISK=  1 USID=1256
CALIB     Warning: failed solutions replaced by (1,0)
CALIB     L1 Solution type
...
CALIB                Previously flagged   Flagged by gain         Kept
CALIB     Partially                   64                   0        64
CALIB     Fully                        0                   0     15229

SNPLT     SUMPLT:       106 Gain amp     points plotted
SNPLT     SUMPLT:       106 Gain phs     points plotted
...
TXPL                  Extrema vs IAT time for 1654.UVCLIP.1 SN  *pol IF *
TXPL              1.10+--+------+-------+------+------+------+-------+|
TXPL                  +-                                             -|
TXPL          G   1.05|                                               |
TXPL          a       |                                               |
TXPL          i   1.00+-  =                                      |+  -|
TXPL          n       |                                               |
TXPL               .95+-                                             -|
TXPL                  |  .      .       .      .      .      .       .|
TXPL               .90+--+=-----+-------+------+------+------+-------+|
TXPL          D     40+-  @                                          -|
TXPL          e     20+-  @                                          -|
TXPL          g       |   @                                      .-   |
TXPL          r      0+-  @                                      |+  -|
TXPL          e       |   @                                      |+   |
TXPL          e    -20+-  @                                          -|
TXPL          s    -40+-  @                                          -|
TXPL                  |   @                                           |
TXPL               -60++-+=-----+-------+------+------+------+-------+|
TXPL                    20    116    212    308     404    500    520
TXPL                                    IAT (HOURS)
...
AIPS      #####################################################
AIPS      #    DE-CONVOLVING
AIPS      #####################################################
...
AIPS      #####################################################
AIPS      #    FINDING RMS NOISE IN IMAGE
AIPS      #####################################################
...
AIPS      #####################################################
AIPS      # SOURCE     1654            , RMS =     .000099    #
AIPS      #####################################################
\end{verbatim}
\clearpage
\begin{verbatim}
AIPS      #####################################################
AIPS      #    SOLUTION IMPROVED, DELETING PREVIOUS
AIPS      #####################################################
AIPS      #####################################################
AIPS      # LOOP            2          OF           3         #
AIPS      #####################################################
...
AIPS      #####################################################
AIPS      # LOOP            3          OF           3         #
AIPS      #####################################################
...
TXPL                  Extrema vs IAT time for 1654.SCAL.2 SN  *pol IF *
TXPL                  +--+------+-------+------+------+------+-------+|
TXPL                  +-  =                                          -|
TXPL              1.10|   =                                           |
TXPL          G   1.05+-  @                                      `+  -|
TXPL          a       |   I                                      `-   |
TXPL          i   1.00+-  =                                      `+  -|
TXPL          n       |   +                                      .+   |
TXPL               .95+-  +                                      .+  -|
TXPL                  |                                          |+   |
TXPL               .90+- .      .       .      .      .      .   .+  +|
TXPL                  +--+=-----+-------+------+------+------+-------+|
TXPL          D      2+-  +                                      `-  -|
TXPL          e      1+-  +                                      `+  -|
TXPL          g      0+-  +                                      .+  -|
TXPL          r     -1+-  @                                      |+  -|
TXPL          e       |   =                                      |*   |
TXPL          e     -2+-  +                                      |+  -|
TXPL          s     -3+-  @                                      .+  -|
TXPL                -4+-  +                                      `-  -|
TXPL                -5++-+=-----+-------+------+------+------+-------=|
TXPL                    20    116    212    308     404    500    520
TXPL                                    IAT (HOURS)
...
AIPS      #####################################################
AIPS      #    DONE WITH SOURCE ==>1654
AIPS      #####################################################
\end{verbatim}

\normalstyle
Eventually the final amplitude self-calibrated map is
produced with signal to noise ratio much better than
was possible for the un-self calibrated \uvdata.

The task \APEIN{SNPLT} plots the extrema of the antenna
phase and amplitude corrections.  Notice that by
the third self-calibration the phase corrections are small.
The amplitude corrections will only be successful if the
phase errors have been significantly reduced.

%\end{document}
\clearpage

%\input{mapitfig.tex}
% mapit figures
% last editted by glen langston
% last editted on 1991 May 4
\clearpage

\begin{figure}[t]
\vskip 3in

{\hfill RIGHT ASCENSION \hfill }

{\it \hskip 1in a) \hfill b) \hfill c) \hskip 1in}

{\bf Figure 3:}
{\it a)} Fourier Transformed image (Dirty Map), {\it b)} Cleaned image
of a 3.6 cm VLA snap shot of \MG.
The \UV-data are not self-calibrated.
In {\it c)} the \UV-data were self-calibrated based on a
source model from image {\it b)}.
The image quality is measured
by the RMS signal in a box away from the source.
For {\it a)} the RMS noise is 0.45 mJy/beam.
For {\it b)} the RMS noise is 0.13 mJy/beam.
For {\it c)} the RMS noise is 0.10 mJy/beam.
\end{figure}


\tablestyle
\begin{figure}[t]
\vskip 3in

{\hfill RIGHT ASCENSION \hfill }

{\it \hskip 1.5in d) \hfill e) \hskip 1.5in}

{\bf Figure 3 cont'd:}
{\it d)} Cleaned image after self-calibration of original \UV-data
based on source model {\it c)}.
The final map is shown in figure {\it 3)}, produced from \UV-data
which was both amplitude and phase self-calibrated.
For {\it d)} the RMS noise is 0.09 mJy/beam.
For {\it e)} the RMS noise is 0.09 mJy/beam.
There were apparently few amplitude errors in the \UV-data,
and further iterations of self-calibration did not
improve the RMS noise.
\end{figure}

\clearpage

%\input{mapithlp.tex}

% mapit general AIPS help
% last editted by glen langston
% last editted on 1991 May 4

\tablestyle
\AIPS has online help which is available at three
levels of detail.
\beddes
\myitem{INPUTS} ~~~Lists the a very short summary of the
function of a task, verb or adverb.
\myitem{HELP} ~~~Gives an expanded description of the
adverbs for a task.
\myitem{EXPLAIN} ~~~Gives detailed explaination of a task
functions, what the adverbs are used for and references
to the mathmatical methodes used by the task.
\end{description}
Typing \APEIN{HELP HELP} gives the summary of \AIPS commands.
\begin{verbatim}
   HELP ADVERB      The nature and use of adverbs
   HELP ADVERBS     does HELP REALS, HELP ARRAYS, and HELP STRINGS
   HELP ARRAY       The nature and use of arrays
   HELP ARRAYS      lists all arrays in the symbol table
   HELP BATCHJOB    Operations to prepare, submit and monitor batch jobs
   HELP DOTASK      Information used in executing tasks
   HELP NEWTASK     Writing and incorporating a new task into AIPS
   HELP PANIC       Solution to common problems
   HELP PROC        The nature and use of procedures
   HELP PROCEDUR    The nature and use of procedures
   HELP PROCS       lists all procedures in the symbol table
   HELP PSEUDO      The nature and use of pseudo verbs
   HELP REALS       lists all real, non-array adverbs in the symbol table
   HELP ROAM        Using the ROAM capability on the TV
   HELP RUN         The nature and use of run files
   HELP STRINGS     lists all characters string adverbs in the symbol table
   HELP TASKS       lists all tasks which are started by GO
   HELP VERB        The nature and use of verbs
   HELP VERBS       lists all verbs in the symbol table
                    followed by all pseudoverb
   HELP WHATSNEW    Major changes in AIPS since the last update

The following HELPers give lists of verbs & tasks grouped in general classes.

   HELP INDEX       Lists all tasks, verbs, pseudoverbs and
                    built-in procedures in alphabetical order
   HELP ANALYSIS    Image processing, analysis and combination
   HELP APTASKS     Tasks which use the Array Processor
   HELP CATINFO     Dealing with the image catalog
   HELP CUBE        Data cube (spectral line) processing
   HELP CURSOR      Interactive use of cursor on TV and TEK
   HELP DELETE      Deleting files
   HELP GENERAL     General AIPS utilities
   HELP MAPETC      Mapping, Cleaning and Self-Calibration
   HELP PL2D        Two-dimensional displays and plot files
   HELP POPSYM      Symbols used in POPS interpretive language
   HELP SL1D        One-dimensional displays and analysis
   HELP TAPU        Reading from, writing on and moving tapes
   HELP TVCOLOR     Using color on the TV
   HELP TVGEN       General TV function for loading and display
   HELP TVINTER     Interactive use of the TV display
   HELP UVPR        UV processing
   HELP VLBI        Software dealing specifically with VLB data
\end{verbatim}
\normalstyle

%\end{description}
\end{document}

% insert MAPIT.001 in postscript here
