nraonrao
 
NRAO Home > CASA > TaskRef

0.1.55 sdcal

Requires:

Synopsis ASAP SD task: do sdaverage, sdsmooth, and sdbaseline in one task Description

ASAP SD calibration task (based on the ALMATST5 recommendations):

Combine sdaverage, sdsmooth, and sdbaseline to do standard single dish calibration in a single task.

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:

string

Default:

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:

calmode

SD calibration mode (ps,nod,fs,fsotf,none)

allowed:

string

Default:

none

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:

channelrange

channel range selection (e.g. [0,5000])

allowed:

intArray

Default:

average

data averaging (True,False)

allowed:

bool

Default:

False

scanaverage

average integs within scans (True,False)

allowed:

bool

Default:

False

timeaverage

average scans over time (True,False)

allowed:

bool

Default:

False

tweight

weighting for time averaging

allowed:

string

Default:

none

averageall

set True only when averaging spectra with different spectral resolutions

allowed:

bool

Default:

False

polaverage

average over polarizations (True,False)

allowed:

bool

Default:

False

pweight

allowed:

string

Default:

none

tau

atmospheric optical depth for correction

allowed:

double

Default:

0.0

kernel

type of spectral smoothing

allowed:

string

Default:

none

kwidth

width of spectral kernel in channels

allowed:

int

Default:

5

blmode

mode for baseline fitting

allowed:

string

Default:

none

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  
        fluxunit -- units for line flux  
                options: ’K’,’Jy’,’’  
                default: ’’ (keep current fluxunit)  
                WARNING: For GBT data, see description below.  
            >>> fluxunit expandable parameter  
                 telescopeparm -- the telescope characteristics  
                        options: (str) name or (list) list of gain info  
                        default: ’’ (none set)  
                        example: if telescopeparm=’’, it tries to get the telescope  
                                 name from the data.  
                                 Full antenna parameters (diameter,ap.eff.) known  
                                 to ASAP are  
                                 ’ATPKSMB’, ’ATPKSHOH’, ’ATMOPRA’, ’DSS-43’,  
                                 ’CEDUNA’,’HOBART’. For GBT, it fixes default fluxunit  
                                 to ’K’ first then convert to a new fluxunit.  
                                 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  
 
        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  
        calmode -- calibration mode  
                options: ’ps’,’nod’,’fs’,’fsotf’,’quotient’,’none’  
                default: ’none’  
                example: choose mode ’none’ if you have  
                         already calibrated and want to  
                         try baselines or averaging  
        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  
        channelrange -- channel range selection  
                default: [] (use all channel)  
                example: [0,5000]  
                         Note that specified values are recognized as  
                         ’channel’ regardless of the value of specunit  
        average -- averaging on spectral data  
                options: (bool) True,False  
                default: False  
                >>>average expandable parameter  
                 scanaverage -- average integrations within scans  
                         options: (bool) True,False  
                         default: False  
                         example: if True, this happens in read-in  
                         For GBT, set False!  
                 timeaverage -- average times for multiple scan cycles  
                         options: (bool) True,False  
                         default: False  
                         example: if True, this happens after calibration  
                 tweight -- weighting for time average  
                         options: ’none’  
                                  ’var’   (1/var(spec) weighted)  
                                  ’tsys’  (1/Tsys**2 weighted)  
                                  ’tint’  (integration time weighted)  
                                  ’tintsys’  (Tint/Tsys**2)  
                                  ’median’  ( median averaging)  
                         default: ’none’  
                 averageall -- average multi-resolution spectra  
                               spectra are averaged by referring  
                               their frequency coverage  
                         default: False  
                 polaverage -- average polarizations  
                         options: (bool) True,False  
                         default: False  
                 pweight -- weighting for polarization average  
                         options: ’none’  
                                  ’var’  (1/var(spec) weighted)  
                                  ’tsys’ (1/Tsys**2 weighted)  
        tau -- atmospheric optical depth  
                default: 0.0 (no correction)  
        kernel -- type of spectral smoothing  
                options: ’none’,’hanning’,’gaussian’,’boxcar’  
                default: ’none’  
                >>>kernel expandable parameter  
                 kwidth -- width of spectral smoothing kernel  
                         options: (int) in channels  
                         default: 5  
                         example: 5 or 10 seem to be popular for boxcar  
                                  ignored for hanning (fixed at 5 chans)  
                                  (0 will turn off gaussian or boxcar)  
        blmode -- mode for baseline fitting  
                options: (str) ’none’,’auto’,’list’,’interact’  
                default: ’none’  
                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>_cal)  
        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>_calspec.eps)  
                WARNING: be careful plotting in fsotf mode!  
 
 
        DESCRIPTION:  
 
        Task sdcal performs data selection, calibration, and/or spectral  
        baseline fitting for single-dish spectra. This task internally calls the  
        tasks, sdaverage, sdsmooth, and sdbaseline and it can be used to run all the  
        three steps in one task execution.  
        By setting calmode=’none’  
        one can run sdcal on already calibrated data, for further selection  
        , averaging and atmospheric optical depth correction.  
 
        If you give multiple IFs in iflist, then your scantable will have  
        multiple IFs.  This can be handled, but there can be funny interactions  
        later on.  We recommend you split each IF out into separate files  
        by re-running sdcal with each IF in turn.  
 
        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), by leaving  
        the sub-parameter telescopeparm unset (telescopeparm=’’),  
        it will use internal telescope parameters for  
        flux conversion for the data from AT telescopes and it will use an  
        approximate aperture efficiency conversion for the GBT data.  
        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 sdcal 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.