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

5.1.4 Set the parameters of Lorentzian component
Description

Set the Parameters of a ’Lorentzian’ component, set with set_function.

Three arguments, peak, centre, and fwhm, are mandatory to be set. They specifies an initial model of Lorentzian component.

The peakfixed, centrefixed, and fwhmfixed are optional parameters to indicate if the paramters should be held fixed during the fitting process. The default is to keep all parameters flexible. If you want to fix one of those parameters, you can do it by setting corresponding arguments (peakfixed, centrefixed, and fwhmfixed) to 1.

The component argument is only effective for multi-component Lorentzian fitting. It specifies the number of the component to set the specified parameters.

Arguments





Inputs

peak

The lorentzian parameters (peak intensity)

allowed:

float

Default:

centre

The lorentzian parameters (line center)

allowed:

float

Default:

fwhm

The lorentzian parameters (FWHM)

allowed:

float

Default:

peakfixed

Optional parameters to indicate if peak should be held fixed during the fitting process

allowed:

integer

Default:

0 (flexible)

centrefixed

Optional parameters to indicate if centre should be held fixed during the fitting process

allowed:

integer

Default:

0 (flexible)

fwhmfixed

Optional parameters to indicate if fwhm should be held fixed during the fitting process

allowed:

integer

Default:

0 (flexible)

component

The number of the component

allowed:

integer

Default:

0





Returns

Example

   f=sd.fitter()  
   s=sd.scantable(’OrionS_rawACSmod_cal’,average=False)  
   f.set_scan(s)  
   # set fit function as lorentzian  
   f.set_function(lorentz=1)  
   # set lorentzian parameter with centre fixed  
   f.set_lorentz_parameters(peak=0.5,centre=4100,fwhm=200,centrefixed=1)  
   f.fit()


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