|
|||
NRAO Home > CASA > CASA Cookbook and User Reference Manual |
|
6.13 Spectral Line fitting with specfit
specfit is a powerful task to perform spectral line fits in data cubes. Three types of fitting functions are currently supported, polynomials, Gaussians, and Lorentians. specfit can fit these functions in two ways: over data that were averaged across a region (multifit=False) or on a pixel by pixel basis (multifit=True).
imagename = ’’ # Name of the input image
box = ’’ # Rectangular box in direction coordinate
# blc, trc. Default: entire image ("").
region = ’’ # Region of interest. See help par.region
# for possible specifications. Default: Do
# not use a region.
chans = ’’ # Channels to use. Channels must be
# contiguous. Default: all channels ("").
stokes = ’’ # Stokes planes to use. Planes must be
# contiguous. Default: all stokes ("").
axis = -1 # The profile axis. Default: use the
# spectral axis if one exists, axis 0
# otherwise (<0).
mask = ’’ # Mask to use. See help par.mask. Default is
# none..
poly = -1 # Order of polynomial element. Default: do
# not fit a polynomial (<0).
estimates = ’’ # Name of file containing initial estimates.
# Default: No initial estimates ("").
ngauss = 1 # Number of Gaussian elements. Default: 1.
pampest = ’’ # Initial estimate of PCF profile (gaussian
# or lorentzian) amplitudes.
pcenterest = ’’ # Initial estimate PCF profile centers, in
# pixels.
pfwhmest = ’’ # Initial estimate PCF profile FWHMs, in
# pixels.
pfix = ’’ # PCF profile parameters to fix during fit.
pfunc = ’’ # PCF singlet functions to fit. "gaussian"
# or "lorentzian" (minimal match
# supported). Unspecified means all
# gaussians.
minpts = 0 # Minimum number of unmasked points
# necessary to attempt fit.
multifit = True # If true, fit a profile along the desired
# axis at each pixel in the specified
# region. If false, average the non-fit
# axis pixels and do a single fit to that
# average profile. Default False.
amp = ’’ # Name of amplitude solution image. Default:
# do not write the image ("").
amperr = ’’ # Name of amplitude solution error image.
# Default: do not write the image ("").
center = ’’ # Name of center solution image. Default: do
# not write the image ("").
centererr = ’’ # Name of center solution error image.
# Default: do not write the image ("").
fwhm = ’’ # Name of fwhm solution image. Default: do
# not write the image ("").
fwhmerr = ’’ # Name of fwhm solution error image.
# Default: do not write the image ("").
integral = ’’ # Prefix of ame of integral solution image.
# Name of image will have gaussian
# component number appended. Default: do
# not write the image ("").
integralerr = ’’ # Prefix of name of integral error solution
# image. Name of image will have gaussian
# component number appended. Default: do
# not write the image ("").
model = ’’ # Name of model image. Default: do not write
# the model image ("").
residual = ’’ # Name of residual image. Default: do not
# write the residual image ("").
wantreturn = True # Should a record summarizing the results be
# returned?
logresults = True # Output results to logger?
gmncomps = 0 # Number of components in each gaussian
# multiplet to fit
gmampcon = ’’ # The amplitude ratio constraints for non-
# reference components to reference
# component in gaussian multiplets.
gmcentercon = ’’ # The center offset constraints (in pixels)
# for non-reference components to reference
# component in gaussian multiplets.
gmfwhmcon = ’’ # The FWHM ratio constraints for non-
# reference components to reference
# component in gaussian multiplets.
gmampest = [0.0] # Initial estimate of individual gaussian
# amplitudes in gaussian multiplets.
gmcenterest = [0.0] # Initial estimate of individual gaussian
# centers in gaussian multiplets, in
# pixels.
gmfwhmest = [0.0] # Initial estimate of individual gaussian
# FWHMss in gaussian multiplets, in pixels.
gmfix = ’’ # Parameters of individual gaussians in
# gaussian multiplets to fix during fit.
logfile = ’’ # File in which to log results. Default is
# not to write a logfile.
goodamprange = [0.0] # Acceptable amplitude solution range. [0.0]
# => all amplitude solutions are
# acceptable.
goodcenterrange = [0.0] # Acceptable center solution range in pixels
# relative to region start. [0.0] => all
# center solutions are acceptable.
goodfwhmrange = [0.0] # Acceptable FWHM solution range in pixels.
# [0.0] => all FWHM solutions are
# acceptable.
sigma = ’’ # Standard deviation array or image name.
async = False # If true the taskname must be started using
# specfit(...)
6.13.2 Lorentzian and Gaussian Fits
6.13.2.1 One or more single Gaussian/Lorentzian
6.13.2.2 Gaussian Multiplets
6.13.3 Pixel-by-pixel fits
More information about CASA may be found at the
CASA web page
Copyright © 2010 Associated Universities Inc., Washington, D.C.
This code is available under the terms of the GNU General Public Lincense
Home |
Contact Us |
Directories |
Site Map |
Help |
Privacy Policy |
Search