Example 1

This is one of the simplest examples. To fit and remove a Chebyshev polynomial function (default is 5th order) from the data 'sd_data.ms', using only spectral window 0, and fitting channels 100-800 and 1200-2000 (to avoid, for example, band-pass roll off at the edges, and perhaps an emission line that might occur over channels 800-1200).

sdbaseline(infile='sd_data.ms', spw='0:100~800;1200~2000',blfunc='chebyshev',outfile='sd_data.ms.bl',overwrite =True)  

 Example 2

This example shows fitting and subtracting a sinusoidal baseline. To fit and remove a sinusoid from the data 'sd_data.ms', using spectral window 0 and scan number 0. Wave numbers of sinusoids are set autmatically in the fft method. 


 Example 3

In this example, the user specifies different fitting parameters per spectrum, using blfunc='variable' and specifying the fit parameters using a text file.

sdbaseline(infile='sd_data.ms',blfunc='variable',blparam='blparam.txt',outfile='sd_data.ms.bl',overwrite =True)

 Here is the text file "blparam.txt" used in the above example.