singledishms¶
-
class
singledishms
[source]¶ New single dish tool interface to process an MS
Methods Summary
Apply baseline table to MS.
Offline atmospheric correction of calibrated data
Close the sdms tool, with data written on disk, keeping sdms running for future use
Close the sdms tool
Invoke line fitting
Import ASAP Scantable to MS.
Import NOSTAR data to MS.
Provide the name of the attached MeasurementSet
Open a new MeasurementSet for processing after closing current MeasurementSet
Select Measurementset to process
Construct singledishms tool
Smooth data with arbitrary smoothing kernel
Invoke baseline subtraction
Invoke baseline subtraction
Invoke baseline subtraction
Invoke baseline subtraction by parameters stored in a file.
-
apply_baseline_table
(bltable='', datacolumn='data', spw='', updateweight=False, sigmavalue='stddev', outfile='')[source]¶ Apply baseline table to MS.
For each row of given baseline table, read baseline parameters, construct baseline, then subtract it from the corresponding spectrum in the MS.
Parameters
bltable (string='')
- The name of input Baseline Tabledatacolumn (string='data')
- The name of data column to process (‘data’, ‘float_data’, or ‘corrected’)spw (variant='')
- Spectral Window Ids (0 relative) to select; -1 interpreted as allupdateweight (bool=False)
- Update weight based on sigmavalue of residual datasigmavalue (string='stddev')
- sigma value for computing weightoutfile (string='')
- The name of output MeasurementSet
-
atmcor
(config='', datacolumn='data', outfile='')[source]¶ Offline atmospheric correction of calibrated data
Parameters
config (record='')
- Configuration for atmospheric correctiondatacolumn (string='data')
- The name of data column to process (‘data’, ‘float_data’, or ‘corrected’)outfile (string='')
- The name of output MeasurementSet
-
close
()[source]¶ Close the sdms tool, with data written on disk, keeping sdms running for future use
This is used to close sdms tools. Note that the data is written to disk and detached from sdms tool. This is a synonym for done.
-
done
()[source]¶ Close the sdms tool
This is used to close and sdms tools. Note that the data is written to disk and detached from sdms tool. This is a synonym for close.
-
fit_line
(datacolumn='data', spw='', pol='', timebin='', timespan='', polaverage='', fitfunc='gaussian', nfit='0', linefinding=False, threshold=5.0, avg_limit=4, minwidth=4, edge=[0, 0], tempfile='', tempoutfile='')[source]¶ Invoke line fitting
Fit line profile to selected spectra and obtain the best-fit parameter values
Parameters
datacolumn (string='data')
- The name of data column to process (‘data’, ‘float_data’, or ‘corrected’)spw (variant='')
- Spectral Window Ids (0 relative) to select; -1 interpreted as allpol (variant='')
- Select data by polarization(s)timebin (string='')
- Bin width for time averagingtimespan (string='')
- Span the timebin across ‘scan’, ‘state’, ‘field’, or a combination of them (e.g., ‘scan,state’)polaverage (string='')
- polarization averaging mode (‘’, ‘stokes’, or ‘geometric’)fitfunc (string='gaussian')
- Function of line profilenfit (string='0')
- Comma-separated numbers of gaussian/lorentzian lines to fit in maskline region. ignored when linefinding=true.linefinding (bool=False)
- do line findingthreshold (float=5.0)
- S/N threshold for line finderavg_limit (int=4)
- channel averaging for broad lines in line findingminwidth (int=4)
- the minimum channel width to detect as a line by line finderedge (intArray=[0, 0])
- channels to drop at beginning and end of spectrum in line findingtempfile (string='')
- The name of temporary file to keep fitting resultstempoutfile (string='')
- The name of temporary ms file
-
importasap
(infile='', outfile='', parallel=False)[source]¶ Import ASAP Scantable to MS.
Import ASAP Scantable data to MeasurementSet.
Parameters
infile (string='')
- The name of input ASAP Scantableoutfile (string='')
- The name of output MeasurementSetparallel (bool=False)
- Turn on parallel execution
-
importnro
(infile='', outfile='', parallel=False)[source]¶ Import NOSTAR data to MS.
Import NOSTAR data to MeasurementSet.
Parameters
infile (string='')
- The name of input NOSTAR dataoutfile (string='')
- The name of output MeasurementSetparallel (bool=False)
- Turn on parallel execution
-
name
()[source]¶ Provide the name of the attached MeasurementSet
Returns the name of the attached MeasurementSet.
-
open
()[source]¶ Open a new MeasurementSet for processing after closing current MeasurementSet
Close the current MeasurementSet and open a new MeasurementSet instead. The current state of sdms is retained, except for the data selection.
Parameters
ms_name (string='')
- New MeasurementSet to be processed
-
set_selection
(spw='', field='', antenna='', timerange='', scan='', observation='', polarization='', beam='', intent='', feed='', taql='', reindex=True)[source]¶ Select Measurementset to process
Parameters
spw (variant='')
- Spectral Window Ids (0 relative) to select; -1 interpreted as allfield (variant='')
- Field Ids (0 relative) or Field names (msselection syntax and wilcards are used) to selectantenna (variant='')
- Antenna Ids (0 relative) or Antenna names (msselection syntax and wilcards are used) to selecttimerange (variant='')
- Limit data selected to be within a given time range. Syntax is defined in the msselection linkscan (variant='')
- Limit data selected on scan numbers. Syntax is defined in the msselection linkobservation (variant='')
- Select data by observation ID(s). Syntax is the same as for scan numbers.polarization (variant='')
- Select data by polarization(s)beam (variant='')
- Beam Ids (0 relative) to select; CURRENTLY NOT AVAILABLE!!!intent (any='')
- Select data by intent(s)feed (any='')
- Select data by feed(s)taql (string='')
- For the TAQL experts, flexible data selection using the TAQL syntaxreindex (bool=True)
- Re-index indices in subtables based on data selection
-
singledishms
()[source]¶ Construct singledishms tool
This is used to construct a singledishms tool instance. The created instance is just like the default one (‘sdms’) but physically independent from it. This is useful when users want to create their own tool instance inside scripts/modules to avoid possible conflicts that may happen when using the default tool instance from various places.
-
smooth
(type='gaussian', width=0.0, datacolumn='data', outfile='')[source]¶ Smooth data with arbitrary smoothing kernel
NOTE: currently only Gaussian kernel is supported.
Parameters
type (string='gaussian')
- Smoothing kernel typewidth (float=0.0)
- Smoothing kernel widthdatacolumn (string='data')
- The name of data column to process (‘data’, ‘float_data’, or ‘corrected’)outfile (string='')
- The name of output MeasurementSet
-
subtract_baseline
(datacolumn='data', outfile='', bloutput='', dosubtract=True, spw='', updateweight=False, sigmavalue='stddev', blfunc='poly', order=5, clip_threshold_sigma=3.0, num_fitting_max=1, linefinding=False, threshold=5.0, avg_limit=4, minwidth=4, edge=[0, 0])[source]¶ Invoke baseline subtraction
Fit baseline and subtract it from selected spectra
Parameters
datacolumn (string='data')
- The name of data column to process (‘data’, ‘float_data’, or ‘corrected’)outfile (string='')
- The name of output MeasurementSetbloutput (string='')
- The name(s) of Baseline to be outputdosubtract (bool=True)
- Execute baseline subtraction from the input dataspw (variant='')
- Spectral Window Ids (0 relative) to select; -1 interpreted as allupdateweight (bool=False)
- Update weight based on sigmavalue of residual datasigmavalue (string='stddev')
- sigma value for computing weightblfunc (string='poly')
- baseline functionorder (int=5)
- polynomial orderclip_threshold_sigma (float=3.0)
- threshold for clipping in unit of sigmanum_fitting_max (int=1)
- maximum number of recursive clippinglinefinding (bool=False)
- do line findingthreshold (float=5.0)
- S/N threshold for line finderavg_limit (int=4)
- channel averaging for broad lines in line findingminwidth (int=4)
- the minimum channel width to detect as a line by line finderedge (intArray=[0, 0])
- channels to drop at beginning and end of spectrum in line finding
-
subtract_baseline_cspline
(datacolumn='data', outfile='', bloutput='', dosubtract=True, spw='', updateweight=False, sigmavalue='stddev', npiece=5, clip_threshold_sigma=3.0, num_fitting_max=1, linefinding=False, threshold=5.0, avg_limit=4, minwidth=4, edge=[0, 0])[source]¶ Invoke baseline subtraction
Fit baseline and subtract it from selected spectra
Parameters
datacolumn (string='data')
- The name of data column to process (‘data’, ‘float_data’, or ‘corrected’)outfile (string='')
- The name of output MeasurementSetbloutput (string='')
- The name(s) of Baseline to be outputdosubtract (bool=True)
- Execute baseline subtraction from the input dataspw (variant='')
- Spectral Window Ids (0 relative) to select; -1 interpreted as allupdateweight (bool=False)
- Update weight based on sigmavalue of residual datasigmavalue (string='stddev')
- sigma value for computing weightnpiece (int=5)
- cspline npiececlip_threshold_sigma (float=3.0)
- threshold for clipping in unit of sigmanum_fitting_max (int=1)
- maximum number of recursive clippinglinefinding (bool=False)
- do line findingthreshold (float=5.0)
- S/N threshold for line finderavg_limit (int=4)
- channel averaging for broad lines in line findingminwidth (int=4)
- the minimum channel width to detect as a line by line finderedge (intArray=[0, 0])
- channels to drop at beginning and end of spectrum in line finding
-
subtract_baseline_sinusoid
(datacolumn='data', outfile='', bloutput='', dosubtract=True, spw='', updateweight=False, sigmavalue='stddev', addwn='0', rejwn='', applyfft=False, fftmethod='fft', fftthresh='3.0', clip_threshold_sigma=3.0, num_fitting_max=1, linefinding=False, threshold=5.0, avg_limit=4, minwidth=4, edge=[0, 0])[source]¶ Invoke baseline subtraction
Fit baseline and subtract it from selected spectra
Parameters
datacolumn (string='data')
- The name of data column to process (‘data’, ‘float_data’, or ‘corrected’)outfile (string='')
- The name of output MeasurementSetbloutput (string='')
- The name(s) of Baseline to be outputdosubtract (bool=True)
- Execute baseline subtraction from the input dataspw (variant='')
- Spectral Window Ids (0 relative) to select; -1 interpreted as allupdateweight (bool=False)
- Update weight based on sigmavalue of residual datasigmavalue (string='stddev')
- sigma value for computing weightaddwn (string='0')
- additional wave numbers to userejwn (string='')
- reject specified wave numbersapplyfft (bool=False)
- automatically set wave numbers of sinusoidsfftmethod (string='fft')
- method to automatically set wave numbers of sinusoids [‘fft’]fftthresh (variant='3.0')
- threshold to select wave numbers of sinusoidsclip_threshold_sigma (float=3.0)
- threshold for clipping in unit of sigmanum_fitting_max (int=1)
- maximum number of recursive clippinglinefinding (bool=False)
- do line findingthreshold (float=5.0)
- S/N threshold for line finderavg_limit (int=4)
- channel averaging for broad lines in line findingminwidth (int=4)
- the minimum channel width to detect as a line by line finderedge (intArray=[0, 0])
- channels to drop at beginning and end of spectrum in line finding
-
subtract_baseline_variable
(datacolumn='data', outfile='', bloutput='', dosubtract=True, spw='', updateweight=False, sigmavalue='stddev', verbose=False)[source]¶ Invoke baseline subtraction by parameters stored in a file.
Fit baseline and subtract it from selected spectra. Fit parameters for each spectrum are obtained from a text file.
Parameters
datacolumn (string='data')
- The name of data column to process (‘data’, ‘float_data’, or ‘corrected’)outfile (string='')
- The name of output MeasurementSetbloutput (string='')
- The name(s) of Baseline to be outputdosubtract (bool=True)
- Execute baseline subtraction from the input dataspw (variant='')
- Spectral Window Ids (0 relative) to select; -1 interpreted as allupdateweight (bool=False)
- Update weight based on sigmavalue of residual datasigmavalue (string='stddev')
- sigma value for computing weightblparam (string='')
- The name of text file that stores fit parameters for each spectrum of selected MSverbose (bool=False)
- Print fitting parameters of each spectrum to logger
-