Manpage of gaufit2
Section: User Commands (1)
Return to Main Contents
gaufit2 - Fits gaussians to profiles
GAUFIT2 fits gaussians to a profile and can write the output to
a miriad dataset, a logfile or the terminal.
If an input velocity image is given, it is used as an initial
estimate of the velocity centroid, and the peak of the profile is
used as an estimate of the amplitude. Otherwise the user must
give a set of initial estimates that is used for all fits.
NOTE: GAUFIT2 is the old BIMA-SONG version of gaufit. The two
programs are close in operation but need some different keyword.
Merging the two codes is sufficiently complex to made us decide
to call this version GAUFIT2.
This is the standard name for an input dataset -- usually
an image, though sometimes either an image or visibility dataset
or some foreign dataset format. Some tasks support multiple
input datasets at a time (with wildcard supported) whereas
others can handle only a single one at a time. There is
generally no default input name.
This selects a subregion of an image. Multiple subregions can be
selected, which are "ored" together. The following subcommands are
recognized (each of which can be abbreviated to uniqueness).
Select image planes z1 to z2 inclusive. z2 defaults to z1.
Select the inner quarter of the image planes z1 to z2 inclusive.
If both z1 and z2 are missing, then all planes are selected. If
only z2 is omitted, z2 defaults to z1.
Select the pixels within a box with corners xmin,ymin,xmax,ymax.
z1 and z2 are the same as in the "image" subcommand. If z1 and z2
are omitted, all planes are selected.
Select the pixels within the polygon defined by the list of vertices.
z1 and z2 are the same as in the "image" subcommand. If z1 and z2 are
missing, all planes are selected. If only z2 is omitted, it defaults
Select pixels according to the mask given in the file.
The units of the numbers given in the above commands are, in
general, absolute pixels. But this can be changed (and rechanged)
by using one of the following subcommands.
Coordinates are interpreted as absolute pixel values, the default.
Coordinates are relative to the reference pixel of the map.
Coordinates are relative to the central pixel of the map,
(defined as (naxis1/2+1,naxis2/2+1)).
Coordinates are in arcseconds, relative to the reference pixel.
Coordinates in the third dimension are in km/s.
Note: the region=mask option is not implemented. The mask of the
input dataset is used however. If there is one, the profile value
at masked datapoints is set to zero before doing the fit.
Optional input dataset, a velocity image produced from the datacube
(or equivalent model cube) by the MOMENT task. This is used as a
1st guess for the velocity at each pixel. If a pixel is blanked, the
program will default to the value given in estim. NO CHECKING
is done to see if the input cube and the velocity image have the same
size and RA/DEC reference (they should).
Optional output dataset, to which theoretical (described by fit)
profiles can be written.
Optional output dataset, to which the difference between the profile
and the fit can be written
Optional output dataset to which the fit parameters can be written.
For each fitted component six planes are written, one with the
amplitude (or integral), one with the position and one with the fwhm
(or dispersion), and three more with the errors. The planes with
errors come after the planes with all fit results. A final plane
which contains the rms of the residual is added.
Unfortunately, because MIRIAD very-deep-down disallows opening an
existing dataset for writing, it is not possible to add new fits to
an existing parameter set. So you have to refit the whole cube if
one profile is not to your liking! Or do some fiddling with adding
two cubes. It'll be complex anyway you do it.
This determines along which axis profiles are taken. The default is
the velocity ('vel') axis. Other possible answers are 'x', 'y', 'z',
Number of gaussian components to fit (maximum 10, default 1).
Controls the output. Possible options are:
noprint: do not print the fit results on the terminal
supbad: suppress results for fits outside ranges given by
cutoff, crange and wrange and results for bad fits.
wrprof: write out a file with the data and the fit so that it
at least is possible to use plotting programs to
compare them; a kludge until gaufit itself can plot.
integral: write out integral of gaussian instead of amplitude
(also interpret input for cutoff and estim keywords
dispersion: write out dispersion of gaussian instead of fwhm
(also interpret input for wrange and estim keywords
pixels: write center and width in pixels, not in units along
(also interpret input for cutoff, vrange, wrange and
estim keywords as pixels)
average: first make an average profile of the selected region
and then fit one single gaussian to this profile
summed: first make a summed profile of the selected region
and then fit one single gaussian to this profile
relax: don't exclude fits that are rejected because MRQMIN
cannot reduce chisq. Sometimes good fits are rejected
this way, but use with caution.
fixvelo: fix the velocities to the initial estimate during fit
fixwidth: fix the width to the initial estimate while fitting
(fixvelo and fixwidth can be combined)
Give a cutoff for the amplitude/integral: fits that give as result an
absolute value of the amplitude/integral below the given cutoff are
not written out.
Default: cut off amplitudes below 1 times the rms.
Give a range (in units along the profile) between which the center
should lie. Fits that result in centers outside this range are not
Default: cut off centers outside profile range.
Give 1 or 2 values: a lower limit or a range for the width (fwhm or
dispersion). Fits giving widths outside this range are not written out.
Default: cut off dispersions less than 0.5 pixel and larger than the
length of the profile.
Initial estimates for the amplitude, velocity and fwhm for each
component (for options=integral, pixels or dispersion, give integral
instead of amplitude etc.). Zero values have the following meaning:
amp : use the peak value in the profile
vel : use the velocity of the peak value
fwhm: use ratio of the integrated profile to the peak value
NOTE: 1. if a 'velest' image is given, it is used as the velocity
estimate for the first Gaussian for all unblanked pixels.
2. If you want the velocity estimate to really be 0, use
something like 0.1.
Default: 0,0,0 (but you must give values if ngauss>1).
Give a value for the rms of the profile. Used by the fitting
If the name of a file is given, the results of the fitting are written
to this file instead of to the terminal
Usually a new model, residual or params dataset is opened. By setting
continue to yes, one can add to an existing output dataset. Only
fits in the region specified by the region keyword will be overwritten,
the rest remains as it was. (NOTE: this option doesn't seem to work).
- PERSON RESPONSIBLE
This document was created by
using the manual pages.
Time: 18:35:38 GMT, July 05, 2011