NRAO Home > CASA > CASA Toolkit Reference Manual
sd.fitter.store_fit - Function

5.1.4 Save fit parameters
Description

Save the fit parameters.

If filename is specified, the method saves the result in an ASCII file. Otherwise, the result will be stored in the scantable. More specifically, the result will be stored in FIT subtable in the scantable.

It works both for spectral line fitting (gaussian or lorentzian fitting) and polynomial fitting although it is not sure if the latter is useful or not.

Arguments





Inputs

filename

If specified, save as an ASCII table

allowed:

string

Default:

None (store result in the scantable)





Returns

Example

   f=sd.fitter()  
   s=sd.scantable(’OrionS_rawACSmod_cal’,average=False)  
   f.set_scan(s)  
   # set fit function as gaussian  
   f.set_function(gauss=1)  
   # set gaussian parameter with centre fixed  
   f.set_gauss_parameters(peak=0.5,centre=4100,fwhm=200,centrefixed=1)  
   f.fit()  
   # store fit in the scantable  
   f.store_fit()  
   # store fit in an ASCII file  
   f.store_fit(filename=’fitresult.txt’)


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