|NRAO Home > CASA > CASA Toolkit Reference Manual||
Line finder tool for single-dish spectrum
The linefinder performs automated spectral line search. The algorithm involves a simple threshold criterion. The line is considered to be detected if a specified number of consecutive channels (default is 3) is brighter (with respect to the current baseline estimate) than the threshold times the noise level. This criterion is applied in the iterative procedure updating baseline estimate and trying reduced spectral resolutions to detect broad lines as well. The off-line noise level is determined at each iteration as an average of 80% of the lowest variances across the spectrum (i.e. histogram equalization is used to avoid missing weak lines if strong ones are present). For bad baseline shapes it is recommended to increase the threshold and possibly switch the averaging option off (see set_options) to detect strong lines only, fit a high order baseline and repeat the line search.
There are six parameters for the algorithm. These can be set by set_options method of this object.
A single channel S/N ratio above which the channel is considered to be a detection. Default is sqrt(3), which together with min_nchan=3 gives a 3-sigma criterion
A minimal number of consequtive channels, which should satisfy a threshold criterion to be a detection. Default is 3.
A number of consequtive channels not greater than this parameter can be averaged to search for broad lines. Default is 8.
A running mean/median box size specified as a fraction of the total spectrum length. Default is 1/5
Area of the spectrum used to estimate noise stats. Both string values and numbers are allowed Allowed string values are ’all’ that use all the spectrum (default), and ’box’ means noise box is the same as running mean/median box. Numeric values are defined as a fraction from the spectrum size. Values should be positive. (noise_box == box_size has the same effect as noise_box = ’box’)
Statistics used to estimate noise. Allowed values are ’mean80’ that use the 80% of the lowest deviations in the noise box (default) and ’median’ means median of deviations in the noise box.
The constructor doesn’t take any arguments. It creates linefinder object without any settings for line finding.
# set data
# set linefinder options
# search lines
# get range of lines found
print "Found ",nlines," spectral lines"
print "No lines found!"
# baseline subtraction using masks provided by linefinder
|find_lines||Search for spectral lines in the scan|
|get_mask||Get the mask to mask all lines that have been found|
|get_ranges||Get ranges for all spectral lines found|
|set_data||Set the data as an array|
|set_options||Set the parameters of the line finding algorithm|
|set_scan||Set the data as a scantable|
sd.linefinder.get_mask - Function
sd.linefinder.get_ranges - Function
sd.linefinder.set_data - Function
sd.linefinder.set_options - Function
sd.linefinder.set_scan - Function
More information about CASA may be found at the CASA web page
Copyright © 2016 Associated Universities Inc., Washington, D.C.