NRAO Home > CASA > CASA Toolkit Reference Manual

5.1.4 sd.fitter - Tool

General fitting tool
Description

The fitter is an object to fit data. This contains both baseline fitting and spectral line fitting. For baseline fitting, simple polynomial fitting with arbitrary order is available. For spectral line fitting, Gaussian and Lorentzian fitting are supported. It allows fitting of multiple lines, but it doesn’t support hyperfine fitting, i.e. multiple line fitting under some constraints.

The constructor doesn’t take any arguments. It just creates a fitter object that no state is set.

Example

        s = sd.scantable(’myscan.asap’)  
        s.set_cursor(thepol=1)        # select second pol  
        f = sd.fitter()               # create fitter object  
        f.set_scan(s)  
        f.set_function(poly=0)  
        f.fit(row=0)                  # fit first row

Methods

auto_fit Return a scan where the function is applied to all rows
commit Return a new scan where the fits have been subtracted
fit Execute actual fitting process
get_area Return the area under the fitted gaussian/lorentzian component
get_chi2 Return χ2 value
get_errors Return the errors in parameters
get_estimate Return the parameter estimates
get_fit Return the fitted ordinate values
get_parameters Return the fit parameters
get_residual Return the residual of the fit
plot Plot fit
set_data Set the abcissa and ordinate for the fit
set_function Set the function to be fitted
set_gauss_parameters Set the parameters of Gaussian component
set_lorentz_parameters Set the parameters of Lorentzian component
set_parameters Set the parameters to be fitted
set_scan Set the data as a scantable
set_sinusoid_parametersSet the parameters of Sinusoidal component
store_fit Save fit parameters

    sd.fitter.auto_fit - Function
    sd.fitter.commit - Function
    sd.fitter.fit - Function
    sd.fitter.get_area - Function
    sd.fitter.get_chi2 - Function
    sd.fitter.get_errors - Function
    sd.fitter.get_estimate - Function
    sd.fitter.get_fit - Function
    sd.fitter.get_parameters - Function
    sd.fitter.get_residual - Function
    sd.fitter.plot - Function
    sd.fitter.set_data - Function
    sd.fitter.set_function - Function
    sd.fitter.set_gauss_parameters - Function
    sd.fitter.set_lorentz_parameters - Function
    sd.fitter.set_parameters - Function
    sd.fitter.set_sinusoid_parameters - Function
    sd.fitter.set_scan - Function
    sd.fitter.store_fit - Function


More information about CASA may be found at the CASA web page

Copyright © 2016 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