NRAO Home > CASA > CASA Toolkit Reference Manual
sd.scantable.poly_baseline - Function

5.1.2 Perform a baseline subtraction using polynomial function
Description

Return a scan which has been baselined (all rows) by a polynomial.

If insitu is True, or insitu is None and sd.rcParams[’insitu’] is True, the method will not return the result, but apply operation on this scantable.

You can verify and decide whether you apply the fit result or not, if plot argument is True. In that case, you have to answer ’y’ or ’n’ for each spectra so that setting True is not recommended for large dataset.

This is an newer version of ??. The only difference between them is its performance. For larger dataset, it is recommended to use this method.

Arguments





Inputs

mask

An optional mask

allowed:

bool array

Default:

None

order

The order of the polynomial

allowed:

integer

Default:

0

insitu

If False a new scantable is returned

allowed:

bool

Default:

None (use default value)

plot

Plot the fit and the residual

allowed:

bool

Default:

False

getresidual

If False, return best-fit value instead of residual

allowed:

bool

Default:

True

showprogress

Show progress status for large data

allowed:

bool

Default:

True

minnrow

Minimum number of spectra to show progress status

allowed:

integer

Default:

1000

outlog

Output the coefficients of the best-fit function to logger

allowed:

bool

Default:

False

blfile

Name of text file in which the best-fit parameter values to be written

allowed:

string

Default:





Returns
scantable

Example

        scan = sd.scantable(’OrionS_rawACSmod_cal’)  
        # return a scan baselined by a third order polynomial,  
        # not using a mask  
        bscan = scan.poly_baseline(order=3)


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