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

Title

Parameter

Default

Description

infile

''

datacolumn

'data'

antenna

''

field

''

spw

''

timerange

''

scan

''

pol

''

intent

''

reindex

True

Re-index indices in subtables based on data selection

maskmode

'list'

mode of setting additional channel masks

thresh

float(5.0)

avg_limit

int(4)

minwidth

int(4)

edge

numpy.array( [ int(0),int(0) ] )

blmode

'fit'

dosubtract

True

blformat

'text'

format(s) of file(s) in which best-fit parameters are written

bloutput

''

bltable

''

blfunc

'poly'

baseline model function

order

int(5)

npiece

int(2)

applyfft

True

fftmethod

'fft'

method for automatically set wave numbers of sinusoids [“fft”]

fftthresh

float(3.0)

addwn

*UNKNOWN*

rejwn

*UNKNOWN*

clipthresh

float(3.0)

clipniter

int(0)

blparam

''

verbose

False

output fitting parameters to logger [True, False]

showprogress

False

(NOT SUPPORTED YET) show progress status for large data [True, False] (NOT SUPPORTED YET)

minnrow

int(1000)

outfile

''

overwrite

False

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)

reindex

True

Re-index indices in subtables based on data selection. Ignored when blmode=’apply’.

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