This module defines the class for spectral line detection and identification.
The AdmitLineFinder class inherits from the asap linefinder class. It takes a spectrum (list, CubeSpectrum_BDP, or CubeStats_BDP) and turns it into a scantable. The scantable is then search for spectral lines, with the given parameters.
Parameters: | nchan : int
name : string
spec : various
vlsr : float
|
---|
Attributes
nchan | (int) Number of spectral channels |
name | (string) Name of the temporary scantable |
spectrum | (list) Spectrum to be analyzed |
freq | (list) Frequency axis (one entry per channel) |
lines_merged | (list) Merged list of overlapping lines. |
tb | (casa table) Casa table that is converted to a scantable. |
bdp | (BDP) Input spectrum BDP. |
Methods
find([merge]) | Method to do the actual searching |
find_lines([nRow, mask, edge]) | Search for spectral lines in the scan assigned in set_scan. |
findpeak(ranges) | Method to find the spectral peak in a given range |
get_mask([invert]) | Get the mask to mask out all lines that have been found (default) |
get_merged_ranges() | Get a list of merged line ranges. |
get_ranges([defunits]) | Get ranges (start and end channels or velocities) for all spectral lines found. |
getfwhm(ch, peak) | Method to determine the FMHW (roughly) of a spectral line |
getspec() | Method to get the frequency based spectrum |
init() | Create dummy scantable to work with linefinder, should not be directly called. |
makepairs(inp) | Method to turn a list into a list of pairs |
merge_lines(lines[, frac]) | Merge lines if those are close enough. |
set_data(spectrum) | Set the ‘data’ (spectrum) to work with Parameters: a method to allow linefinder work without setting scantable for the purpose of using linefinder inside some method in scantable class. |
set_options([threshold, min_nchan, ...]) | Set the options for the linefinding algorithm. |
set_scan(scan) | Set the ‘data’ (scantable) to work with. |
set_spectrum(spec[, vlsr]) | Set the spectrum you want to search for lines. |
Method to do the actual searching
Parameters: | merge : Boolean
|
---|---|
Returns: | tuple containing the frequency ranges, channel ranges, and rms |
Method to find the spectral peak in a given range
Parameters: | ranges : list
|
---|---|
Returns: | Tuple, containing the peak intensity and the frequency of the peak. |
Get a list of merged line ranges.
Parameters: | None |
---|---|
Returns: | List of merged lines |
Method to determine the FMHW (roughly) of a spectral line
Parameters: | ch : list
peak : float
|
---|---|
Returns: | Float of the rough FWHM in km/s |
Method to get the frequency based spectrum
Parameters: | None |
---|---|
Returns: | Typle of lists, frequency and spectrum of all channels |
Create dummy scantable to work with linefinder, should not be directly called.
Parameters: | None |
---|---|
Returns: | None |
Method to turn a list into a list of pairs
Parameters: | inp : list
|
---|---|
Returns: | List of pairs. |
Merge lines if those are close enough.
Parameters: | lines: list
frac: float
|
---|---|
Returns: | The new number of lines |
Set the options for the linefinding algorithm.
Parameters: | threshold : float
min_chan : int
avg_limit : int
box_size : float
noise_box : string/float
noise_stat : string
|
---|---|
Returns: | None |
Set the spectrum you want to search for lines. If the input spectrum was passed to the constructor there is no need to call this routine.
Parameters: | spec : list or BDP
vlsr : float
|
---|---|
Returns: | None |