casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
task_caltabconvert.py
Go to the documentation of this file.
00001 import os
00002 from taskinit import *
00003 from caltab_convert2 import *
00004 
00005 def caltabconvert( caltabold=None, vis=None, ptype=None, caltabnew=None ):
00006 
00007         """
00008         This task converts old-style caltables into new-style caltables.  It is
00009         provided as a convenience and is strictly temporary.  The information
00010         transferred should be enough for most calibration purposes.  BPOLY and
00011         GSPLINE versions are not supported.  Only simple bugs will be fixed.  If
00012         there are other issues, it is suggested that a new-style caltable be
00013         created.
00014 
00015         Arguments:
00016 
00017         caltabold -- Name of the old-style caltable
00018                 default: none
00019                 example: caltabold='gronk.g0'
00020 
00021         vis -- Name of the visibility file (MS) associated with the old-style caltable
00022                 default: none
00023                 example: vis='blurp.ms'
00024 
00025         ptype -- Type of data in the new-format caltable
00026                 default: "complex"; allowed values: "complex" or "float"
00027                 example: ptype="complex"
00028 
00029                 NB: The old-style caltables do not have this information, so it is
00030                 imperative that users get it correct.  "complex" refers to caltables
00031                 that have complex gains (e.g., produced by gaincal, bpcal, etc.).
00032                 "float" referes to caltables that real numbers such as delays (e.g.,
00033                 produced by gencal).
00034 
00035         caltabnew -- Name of the new-style caltable.
00036                 default: "" --> the suffix ".new" is appended to the name of the old-style caltable
00037                 example: caltabold='gronk_new.g0'
00038         """
00039 
00040         try:
00041                 success = caltab_convert2( caltabold=caltabold, ms=vis,
00042                     pType=ptype, caltabnew=caltabnew )
00043                 return success
00044         except Exception, instance:
00045                 print '*** Error ***', instance
00046                 raise Exception, instance