AMPHI
This program is now obsolete: use DIFMAP instead.
AMPHI corrects the visibilities in the input merge-file by comparison
with the predictions of an input model. Both MERGE-formats 1 and 2 are
accepted. It uses the method of Cornwell & Wilkinson (MNRAS 1981,
196, 1067) to minimize the differences between observed and model
visibilities. The observed closure quantities are preserved by allowing
only corrections which vary the complex gain at each station. A map may
be made from the output merge-file by running INVERT. Lists of error
estimates (GAINERR and PHSERR, see below) control how much the observed
visibilities may be changed.
AMPHI cannot process a file containing data from more than 20 stations,
or more than 2000 sections of data, and it cannot use a model
comprising more than 10000 components.
WARNING: AMPHI uses the phases in the input data file, rather than
the closure phases. If the data have been averaged, the phases will be
inconsistent with the closure phases; to correct the phases, run
program PHASE (any input model will do).
The amplitudes and phases output by AMPHI can be examined using the
program LIST (specify "AMP" and "PHASE" in the control parameters).
AMPHI output does not require closure phases in the input file, but they
are retained if present. The running time of AMPHI is proportional to
the number of baselines, the number of records in input MERGE file and
the number of components in the model; the time can be reduced with the
NUMBER option, or by running AVERAGE (and PHASE) on the data before
AMPHI.
Example
% amphi
INPUT = "81FEB345.CAL"
OUTPUT = "HYB345.AMP"
MODFILE = "3C345.MOD"
LISTFILE = "AMPHI.LIS"
LONG = 1
NCPRINT = 5
NUMBER = 200
CGNUM = 5 XCG = 0.0 YCG = -4.0
CLAMP
TIMESCALE = 360,30,240,0,120
GAINERR = 0.02,0.03,0.02,0.05,0.02
/
Parameters
Control parameters are normally specified immediately after the AMPHI
command in the command-file. Parameter names can be abbreviated, usually
to three letters.
- INPUT name of input merge-file (default "FROM")
- OUTPUT name of output merge file for INVERT (default "TO")
- MODFILE name of input model-file (default "MODEL")
- LISTFILE name of output listing file (default "amphi.lis")
- These file names are up to 40 characters.
- MAXS
- MAXSECS
- These two parameters are obsolete and are ignored by AMPHI (Version 8.3
or later).
- CGNUM, XCG and YCG (default no shifting)
-
If CGNUM is specified, the centroid of the first CGNUM components of the model
is found, and the model is shifted so that the centroid lies at
(XCG,YCG) milliarcsec. Note that x increases to the East (left) and y
increases to the North (up), so increasing XCG moves the source to the
East and increasing YCG moves it to the North relative to the
map-center.
- NCPRINT = m
- Maximum number of model components to list (default is to list the first 10).
- NUMBER = n
- Select only the first n model components for calculating model
visibilities (default is to use the entire input model, up to a maximum
of 10000 components).
- LONG (no value)
- List changes made to the station gains for each UT section in the data.
If omitted, the program does not list any corrections. The listed
station-gain factors multiply the amplitudes on every baseline to the
given station. Where no data involving a particular station are found, the
listing shows an asterisk.
LONG=1 lists changes to station phases (in degrees) as well; for each UT
section, the listing indicates which station phase the program has
(arbitrarily) set to zero.
- CLAMP and SCALE (no values)
- One of these options should be selected if changes in the observed
amplitudes are required. CLAMP changes the station sensitivities for
each UT section independently (see TIMESCALE option below). SCALE allows
only a constant correction to the sensitivity of each station, derived
using all the input data. The magnitudes of the corrections are
controlled by the GAINERR list (see below). CLAMP is ignored if SCALE is
selected.
- GAINERR = e1,e2,e3,...
- A list of estimated fractional errors in the sensitivity of each station
in the data. Station gains can only be changed if either the CLAMP or
SCALE option is set. If the GAINERR list is omitted the default (large)
values assume that the amplitudes are uncalibrated, and thus make full
use of the closure amplitudes.
- TIMESCALE = t1,t2,t3,... (default 0,0,0...)
- CUTOFF = x (default 0.1)
- A list of timescales (in minutes) over which station gains may vary.
This list implies the CLAMP option, but is ignored if SCALE is selected.
The default TIMESCALE list is zero, giving corrections which are
independent for each UT section. A truncated Gaussian is used as the
smoothing function, with FWMH = TIMESCALE and truncated at a level
CUTOFF of the peak. TIMESCALE applies to amplitudes only, not phases.
- PHSERR = p1,p2,p3,...
- A list of estimated errors (in degrees) in the visibility phase at each
station. The default list (large values) corresponds to the usual VLBI
case of uncalibrated phases, and thus PHSERR is normally omitted.
- FLOATGAIN (no value)
- This option suppresses the application of an overall scaling factor to
corrections derived by the SCALE or CLAMP options. Normally, FLOATGAIN
is omitted,
and AMPHI computes an adjustment to the overall flux scale of the data, such
that the mean correction factor (weighted by GAINERR**-2) is unity.
If CLAMP is selected, the corrections are time-averaged before calculating the
scale factor.
Thus maps made with and without FLOATGAIN will differ only by a constant
factor.
Omission of FLOATGAIN is recommended to prevent drifts in the flux
scale, although this normally results in a larger agreement factor.
NOTE: in program versions earlier than V 7.2, the operation of FLOATGAIN
with the CLAMP option was different.
- NOLOOKUP (no value)
- Use standard subroutines for sin and cos in the model visibility
calculation, instead of a lookup table. By default, a 4096-point
table is used, saving about 50% in cpu time (for large model files,
this step dominates the total running time). The rms error in sin/cos
from the table is 0.00044, and it has a negligible effect on the
accuracy of the gain solution. If the model contains Gaussian or other
component types (disk, sphere, ring or line), the visibility is
correctly calculated, but the lookup table is not used.
- UCUT, UVRATIO (defaults 0.0, 1.0)
-
These parameters select data inside an ellipse in the u,v plane with semi-axes
U = UCUT, V = UCUT*UVRATIO (in units of millions of wavelengths) to be
excluded from the gain and phase solutions. No actual editing of the input
or output MERGE file is performed. UVRATIO may be omitted, in which case the
selected area is circular. Specifying a negative UCUT excludes data from
outside, rather than inside, the given area. UCUT and UVRATIO may be used
in the case where the input model is a poor fit on the short baselines (as
might happen with a limited number of CLEAN components); excluding these
baselines should avoid biassing the solutions derived from longer baselines.
- FLAGFAIL
- Occasionally, AMPHI finds the data ill-conditioned for a reliable gain
solution, in which case its default action (FLAGFAIL omitted) is to issue a
warning and apply no corrections. Specifying FLAGFAIL makes AMPHI edit out the
bad section, so that INVERT and other programs will ignore it; this editing
can only be reversed using the RESTORE option in VLBEDIT.
History
Version 5.0: 1982 Nov 5 - Dynamic allocation of data arrays; improve
LONG listing; redefine center-of-gravity shifting (S .C. Unwin).
Version 7.1: 1983 Aug 12 - Extend to include MERGE-format 2 and orbiting
VLBI stations; save space by reading closure phases only when writing
output data file (D. L. Meier).
Version 7.2: 1984 Jun 17 - Introduce UCUT, UVRATIO; change meaning of
FLOATGAIN (SCU).
Version 7.4: 1984 Aug 9 - Introduce FLAGFAIL; improve internal accuracy
(SCU).
Version 7.5: 1985 Jun 15 - Improve debug output (LONG=3) (SCU).
Version 7.6: 1986 Aug 28 - Increase maximum number of stations to 20
(SCU).
Version 8.0: 1988 Apr 8 - all input by parameters; eliminate
command qualifiers; test on Convex (TJP).
Version 8.1: 1988 Aug 2: remove BASERR parameter; add execution
summary (TJP).
Version 8.2: 1989 Jun 26: record method in output history (TJP).
Version 8.3: 1989 Dec 2: read the file to determine MAXS and MAXSECS;
ignore user input (TJP).
Version 8.4: 1990 Jan 16: changes for Sun: remove illegal use of
SCALEX as common block name and INT as
variable (DLM/TJP).
Version 9.0: 1992 Feb 12: correct bug in closure-phase assignment
(TJP).
Version 9.1: 1992 Jun 18: correct bug in phase cycling (TJP).
Tim Pearson, California Institute of Technology
tjp·astro.caltech.edu