nraonrao
 
NRAO Home > CASA > TaskRef

0.1.54 sdbaseline

Requires:

Synopsis ASAP SD task: fit/remove a spectral baseline Description

ASAP SD calibration task (based on the ALMATST5 recommendations): fit/remove a spectral baseline

Modified (rename parameter interactive to verify) 2008-11-20 KS Modified (+interactive mask) 2008-08-20 KS Task Version 2008-01-28 TT split and modified from Task Version 2007-03-04 STM

Arguments





Inputs

sdfile

name of input SD dataset

allowed:

string

Default:

fluxunit

units for line flux (K,Jy) (”=current)

allowed:

string

Default:

telescopeparm

param of telescope for flux conversion

allowed:

any

Default:

variant

specunit

units for spectral axis (channel,km/s,GHz)

allowed:

string

Default:

frame

frequency reference frame, e.g. LSRK (”=current)

allowed:

string

Default:

doppler

doppler convention, e.g. RADIO (”=current)

allowed:

string

Default:

scanlist

list of scans to use (e.g. [1,2,3,4])

allowed:

intArray

Default:

field

string for selection by source name

allowed:

string

Default:

iflist

list of IF ids to select (e.g. [0,1])

allowed:

intArray

Default:

pollist

list of polarization ids to select (e.g. [0,1])

allowed:

intArray

Default:

tau

atmospheric optical depth for correction

allowed:

double

Default:

0.0

blmode

mode for baseline fitting

allowed:

string

Default:

blpoly

order of baseline polynomial

allowed:

int

Default:

5

verify

verify the results of baseline fitting

allowed:

bool

Default:

False

masklist

list of mask regions to INCLUDE in BASELINE fit

allowed:

intArray

Default:

thresh

S/N threshold for linefinder

allowed:

double

Default:

5.0

avg_limit

channel averaging for broad lines

allowed:

int

Default:

4

edge

channels to drop at beginning and end of spectrum

allowed:

intArray

Default:

0

outfile

output file name

allowed:

string

Default:

outform

output file format (ASCII,MS,SDFITS,ASAP)

allowed:

string

Default:

ASAP

overwrite

overwrite the output file if already exists

allowed:

bool

Default:

False

plotlevel

plot results (0=none,1+=some,¡0=hardcopy)

allowed:

int

Default:

0

Returns
void

Example

 
        Keyword arguments:  
        sdfile -- name of input SD dataset  
        telescopeparm -- the telescope name or characteristics  
                options: (str) name or (list) list of gain info  
                default: ’’ (none set)  
                example: telescopeparm=’’ if GBT or AT telescopes  
                         telescopeparm=[104.9,0.43] diameter(m), ap.eff.  
                         telescopeparm=[0.743] gain in Jy/K  
                         telescopeparm=’FIX’ to change default fluxunit  
                         see description below  
        fluxunit -- units for line flux  
                options: ’K’,’Jy’,’’  
                default: ’’ (keep current fluxunit)  
                WARNING: For GBT data, see description below.  
        specunit -- units for spectral axis  
                options: (str) ’channel’,’km/s’,’GHz’,’MHz’,’kHz’,’Hz’  
                default: ’’ (=current)  
                example: this will be the units for masklist  
        frame -- frequency frame for spectral axis  
                options: (str) ’LSRK’,’REST’,’TOPO’,’LSRD’,’BARY’,  
                         ’GEO’,’GALACTO’,’LGROUP’,’CMB’  
                default: currently set frame in scantable  
                WARNING: frame=’REST’ not yet implemented  
        doppler -- doppler mode  
                options: (str) ’RADIO’,’OPTICAL’,’Z’,’BETA’,’GAMMA’  
                default: currently set doppler in scantable  
        scanlist -- list of scan numbers to process  
                default: [] (use all scans)  
                example: [21,22,23,24]  
                         this selection is in addition to field,  
                         iflist, and pollist  
        field -- selection string for selecting scans by name  
                default: ’’ (no name selection)  
                example: ’FLS3a*’  
                         this selection is in addition to scanlist,  
                         iflist, and pollist  
        iflist -- list of IF id numbers to select  
                default: [] (use all IFs)  
                example: [15]  
                         this selection is in addition to scanlist,  
                         field, and pollist  
        pollist -- list of polarization id numbers to select  
                default: [] (use all polarizations)  
                example: [1]  
                this selection is in addition to scanlist,  
                field, and iflist  
        tau -- atmospheric optical depth  
                default: 0.0 (no correction)  
        blmode -- mode for baseline fitting  
                options: (str) ’auto’,’list’,’interact’  
                default: ’auto’  
                example: blmode=’auto’ uses expandable parameters  
                         in addition to blpoly to run linefinder  
                         to determine line-free regions  
                         USE WITH CARE! May need to tweak the parameters,  
                         thresh, avg_limit, and edge.  
                         blmode=’interact’ allows adding and deleting mask  
                         regions by drawing rectangles on the plot with mouse.  
                         Draw a rectangle with LEFT-mouse to ADD the region to  
                         the mask and with RIGHT-mouse to DELETE the region.  
 
            >>> blmode expandable parameters  
                 thresh -- S/N threshold for linefinder  
                         default: 5  
                         example: a single channel S/N ratio above which the channel is  
                                  considered to be a detection  
                 avg_limit -- channel averaging for broad lines  
                         default: 4  
                         example: a number of consecutive channels not greater than  
                                  this parameter can be averaged to search for broad lines  
                 edge -- channels to drop at beginning and end of spectrum  
                         default: 0  
                         example: [1000] drops 1000 channels at beginning AND end  
                                  [1000,500] drops 1000 from beginning and 500 from end  
 
                 Note: For bad baselines threshold should be increased,  
                 and avg_limit decreased (or even switched off completely by  
                 setting this parameter to 1) to avoid detecting baseline  
                 undulations instead of real lines.  
 
        blpoly -- order of baseline polynomial  
                options: (int) (<0 turns off baseline fitting)  
                default: 5  
                example: typically in range 2-9 (higher values  
                         seem to be needed for GBT)  
        verify -- verify the results of baseline fitting  
                options: (bool) True,False  
                default: False  
                WARNING: Currently this just asks whether you accept  
                         the displayed fit and if not, continues  
                         without doing any baseline fit.  
        masklist -- list of mask regions to INCLUDE in BASELINE fit  
                default: [] (entire spectrum)  
                example: [[1000,3000],[5000,7000]]  
                         if blmode=’auto’ then this mask will be applied  
                         before fitting  
        outfile -- Name of output file  
                default: ’’ (<sdfile>_bs)  
        outform -- format of output file  
                options: ’ASCII’,’SDFITS’,’MS’,’ASAP’  
                default: ’ASAP’  
                example: the ASAP format is easiest for further sd  
                         processing; use MS for CASA imaging.  
                         If ASCII, then will append some stuff to  
                         the outfile name  
        overwrite -- overwrite the output file if already exists  
                options: (bool) True,False  
                default: False  
                WARNING: if outform=’ASCII’, this parameter is ignored  
        plotlevel -- control for plotting of results  
                options: (int) 0=none, 1=some, 2=more, <0=hardcopy  
                default: 0 (no plotting)  
                example: plotlevel<0 as abs(plotlevel), e.g.  
                         -1 => hardcopy of final plot (will be named  
                        <outfile>_bspec.eps)  
                WARNING: be careful plotting in fsotf mode!  
 
 
 
        DESCRIPTION:  
 
        Task sdbaseline performs baseline fitting/removal for single-dish spectra.  
        The fit parameters, terms and rms of base-line are saved to an ascii  
        file, ’<outfile>_blparam.txt’.  
 
        ASAP recognizes the data of the "AT" telescopes, but currently  
        does not know about the GBT or any other telescope. This task  
        does know about GBT. Telescope name is obtained from the data.  
        If you wish to change the fluxunit (see below), and telescopeparm=’’,  
        for the AT telescopes it will use internal telescope parameters for  
        flux conversion. For GBT, it will use an approximate aperture  
        efficiency conversion.  If you give telescopeparm a list ,  
        then if the list has a single float it is assumed to  
        be the gain in Jy/K, if two or more elements they are assumed  
        to be telescope diameter (m) and aperture efficiency  
        respectively.  
 
        Note that sdbaseline assumes that the fluxunit is set correctly in  
        the data already.  If not, then set telescopeparm=’FIX’ and it  
        will set the default units to fluxunit without conversion.  
        NOTE: If the data in sdfile is an ms from GBT and the default flux  
        unit is missing and this task automatically fixes the default fluxunit  
        to ’K’ before the conversion.  
 

Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu

Copyright © 2008 Associated Universities Inc., Washington, D.C.

This code is available under the terms of the GNU General Public Lincense


Home | Contact Us | Directories | Site Map | Help | Privacy Policy | Search

Updated daily during alpha development.