sdbaseline – Fit/subtract a spectral baseline – single dish task
Description
Task sdbaseline fits and/or subtracts baseline from single-dish spectra. Given baseline parameters (baseline type, order, etc.), sdbaseline computes the best-fit baseline for each spectrum by least-square fitting method and, if you want, subtracts it. The best-fit baseline parameters (including baseline type, coefficients of basis functions, etc.) and other values such as residual rms can be saved in various formats including ascii text (in human-readable format or CSV format) or baseline table (a CASA table). Sdbaseline has another mode to ‘apply’ a baseline table to a MS data; for each spectrum in MS, the best-fit baseline is reproduced from the baseline parameters stored in the given baseline table and subtracted. Putting ‘fit’ and ‘subtract’ into separate processes can be useful for pipeline processing for huge dataset.
Parameters
Parameter |
Default |
Description |
|---|---|---|
infile |
|
|
datacolumn |
|
|
antenna |
|
|
field |
|
|
spw |
|
|
timerange |
|
|
scan |
|
|
pol |
|
|
intent |
|
|
maskmode |
|
mode of setting additional channel masks |
thresh |
|
|
avg_limit |
|
|
minwidth |
|
|
edge |
|
|
blmode |
|
|
dosubtract |
|
|
blformat |
|
format(s) of file(s) in which best-fit parameters are written |
bloutput |
|
|
bltable |
|
|
blfunc |
|
baseline model function |
order |
|
|
npiece |
|
|
applyfft |
|
|
fftmethod |
|
method for automatically set wave numbers of sinusoids [“fft”] |
fftthresh |
|
|
addwn |
|
|
rejwn |
|
|
clipthresh |
|
|
clipniter |
|
|
blparam |
|
|
verbose |
|
output fitting parameters to logger [True, False] |
showprogress |
|
(NOT SUPPORTED YET) show progress status for large data [True, False] (NOT SUPPORTED YET) |
minnrow |
|
|
outfile |
|
|
overwrite |
|
overwrite the output file if already exists [True, False] |
Parameter Explanations
infile
''
name of input SD dataset
datacolumn
'data'
name of data column to be used [“data”, “float_data”, or “corrected”]
antenna
''
select data by antenna name or ID, e.g. “PM03”
field
''
select data by field IDs and names, e.g. “3C2*” (“”=all)
spw
''
select data by IF IDs (spectral windows), e.g. “3,5,7” (“”=all)
timerange
''
select data by time range, e.g. “09:14:0~09:54:0” (“”=all) (see examples in help)
scan
''
select data by scan numbers, e.g. “21~23” (“”=all)
pol
''
select data by polarization IDs, e.g. “XX,YY” (“”=all)
intent
''
select data by observational intent, e.g. “ON_SOURCE” (“”=all)
maskmode
'list'
mode of setting additional channel masks. “list” and “auto” are available now.
thresh
float(5.0)
S/N threshold for linefinder
avg_limit
int(4)
channel averaging for broad lines
minwidth
int(4)
the minimum channel width to detect as a line
edge
numpy.array( [ int(0),int(0) ] )
channels to drop at beginning and end of spectrum
blmode
'fit'
baselining mode [“fit” or “apply”]
dosubtract
True
subtract baseline from input data [True, False]
blformat
'text'
format(s) of file(s) in which best-fit parameters are written [“text”, “csv”, “table” or “”]
bloutput
''
name(s) of file(s) in which best-fit parameters are written
bltable
''
name of baseline table to apply
blfunc
'poly'
baseline model function [“poly”, “chebyshev”, “cspline”, “sinusoid”, or “variable”(expert mode)]
order
int(5)
order of baseline model function
npiece
int(2)
number of element polynomials for cubic spline curve
applyfft
True
automatically set wave numbers of sinusoids
fftmethod
'fft'
method for automatically set wave numbers of sinusoids
fftthresh
float(3.0)
threshold to select wave numbers of sinusoids
addwn
*UNKNOWN*
additional wave numbers to use
rejwn
*UNKNOWN*
wave numbers NOT to use
clipthresh
float(3.0)
clipping threshold for iterative fitting
clipniter
int(0)
maximum iteration number for iterative fitting
blparam
''
text file that stores per spectrum fit parameters
verbose
False
output fitting parameters to logger
showprogress
False
(NOT SUPPORTED YET) show progress status for large data
minnrow
int(1000)
(NOT SUPPORTED YET) minimum number of input spectra to show progress status
outfile
''
name of output file
overwrite
False
overwrite the output file if already exists