casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
Functions
sdscale Namespace Reference

Functions

def sdscale

Function Documentation

def sdscale.sdscale (   infile = '',
  antenna = 0,
  factor = 1.0,
  scaletsys = True,
  outfile = '',
  overwrite = False 
)
ASAP SD task: scale the sd spectra
Keyword arguments:
infile -- name of input SD dataset
antenna -- antenna name or id (only effective for MS input). 
factor -- scaling factor. float or one- or two-dimensional float list.
          default: 1 (no scaling)
scaletsys -- scaling of associated Tsys
            default: True
outfile -- output file name 
           outfile='' will write the data to a file named,
           <infile>_scaled<factor>
           default: ''
overwrite -- overwrite the output file if already exists
        options: (bool) True,False
        default: False


DESCRIPTION:

Task sdscale performs scaling of single-dish spectra.
By setting scaletsys = True, associated Tsys is also scaled.
Tsys informations are written in the casalogger and they are 
automatically stored in 'casapy.log'. 
The infile can be any of ASAP, MS, SDFITS, or RPFITS format.
If outfile name is given or outfile=''(default), the scaled data 
is written to a new file with the same format as the input data 
(Note: in case of the RPFITS format input data, it will be written 
to SDFITS format).

The scaling factor, factor, accepts both scalar type and list 
type value. The list must be one or two dimensional. If factor is 
one dimensional, its length must coincide with a number of spectral 
channel. If factor is two dimensional, its shape must be 
(n, 1) or (n, m), where n is a number of spectrum, while m is a 
number of channel for each spcetum. m can be variable for each 
spectrum. In addition, the factor can be an ASCII filename that 
stores a space-separated list of scaling factor consisting of 
adequate number of rows and columns. For example, if the contents 
of input ASCII file is shown as, 

   0.5 0.3 0.2
   1.0 0.2 0.9

it is interpreted as a list [[0.5, 0.3, 0.2],[1.0, 0.2, 0.9]]. 

WARNING for the GBT raw SDFITS format data as input:
SDtasks are able to handle GBT raw SDFITS format data since the 
data filler is available. However, the functionality is not well 
tested yet, so that there may be unknown bugs.  

Definition at line 13 of file sdscale.py.