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

Functions

def __taskinit_setlogfile
def __taskinit_casa
def gentools
def write_history
def selectfield
def selectantenna
def readboxfile
def getimaxes
def announce_async_task
def write_task_obit
def array2string
def recursivermdir

Variables

tuple casa
 casa state...
 casaglobals
 allow globals for taskby default
 imager
 imtool
 calibrater
 cbtool
 mstool
 tptool
tuple tp
 mptool
tuple mp
 pmtool
tuple pm
 cptool
tuple cp
 qatool
tuple qa
 tbtool
 fgtool
 aftool
tuple af
 metool
 iatool
 potool
 smtool
 cltool
 coordsystool
 rgtool
 sltool
 dctool
 vptool
 msmdtool
 fitool
 fntool
 utilstool
tuple cu
tuple vftask
 vlafiller
tuple casalog
tuple at
tuple ca
tuple ving
 done with common tools
 vi
dictionary defaultsdir

Function Documentation

def taskinit.__taskinit_casa ( ) [private]

Definition at line 26 of file taskinit.py.

def taskinit.__taskinit_setlogfile (   logger) [private]

Definition at line 10 of file taskinit.py.

def taskinit.announce_async_task (   taskname)
Use the logger to herald the beginning of an asynchronous task.

Definition at line 391 of file taskinit.py.

def taskinit.array2string (   array)

Definition at line 409 of file taskinit.py.

def taskinit.gentools (   tools = None)
def taskinit.getimaxes (   imagename)
Open an image file, looking at its coordinate system information
to determine which axes are directional, linear, spectral, and
the stokes axies.

The return list or lists contains the axis numbers and names in
the following order:
     1. Directional or Linear
     2. Directional or Linear
     3. Spectral
     4. Stokes

Note that if an axis type is not found an empty list is returned
for that axis.

Definition at line 330 of file taskinit.py.

Referenced by task_immoments._immoments_parse_axis(), task_imcontsub.imcontsub(), task_imhead.imhead(), and task_imval.imval().

def taskinit.readboxfile (   boxfile)
Read a file containing clean boxes (compliant with AIPS BOXFILE)

Format is:
#FIELDID BLC-X BLC-Y TRC-X TRC-Y
0       110   110   150   150 
or
0       hh:mm:ss.s dd.mm.ss.s hh:mm:ss.s dd.mm.ss.s

Note all lines beginning with '#' are ignored.

Definition at line 275 of file taskinit.py.

def taskinit.recursivermdir (   top = '')

Definition at line 420 of file taskinit.py.

def taskinit.selectantenna (   vis,
  minstring 
)
Derive the antennaid from matched string(s): 

Definition at line 253 of file taskinit.py.

References tests.test_imcontsub.list.

def taskinit.selectfield (   vis,
  minstring 
)
Derive the fieldid from  minimum matched string(s): 

Definition at line 227 of file taskinit.py.

References tests.test_imcontsub.list.

def taskinit.write_history (   myms,
  vis,
  tname,
  param_names,
  param_vals,
  myclog = None,
  debug = False 
)
Update vis with the parameters that task tname was called with.

myms - an ms tool instance
vis  - the MS to write to.
tname - name of the calling task.
param_names - list of parameter names.
param_vals - list of parameter values (in the same order as param_names).
myclog - a casalog instance (optional)
debug - Turns on debugging print statements on errors if True.

Example:
The end of split does
param_names = split.func_code.co_varnames[:split.func_code.co_argcount]
param_vals = [eval(p) for p in param_names]  # Must be done in the task.
write_history(myms, outputvis, 'split', param_names, param_vals,
              casalog),
which appends, e.g.,

vis = 'TWHydra_CO3_2.ms'
outputvis   = 'scan9.ms'
datacolumn  = 'data'
field       = ''
spw         = ''
width       = 1
antenna     = ''
timebin     = '0s'
timerange   = ''
scan        = '9'
intent      = ''
array       = ''
uvrange     = ''
correlation = ''
keepflags   = True
async       = False

to the HISTORY of outputvis.

Definition at line 115 of file taskinit.py.

Referenced by task_applycal.applycal(), task_fixvis.fixvis(), task_flagdata.flagdata(), task_fluxscale.fluxscale(), task_importfitsidi.importfitsidi(), task_importgmrt.importgmrt(), task_importuvfits.importuvfits(), task_importvla.importvla(), task_partition.partition(), task_setjy.setjy_core(), task_split.split_core(), task_statwt.statwt(), task_uvcontsub.uvcontsub(), task_uvcontsub2.uvcontsub2(), and task_uvcontsub3.uvcontsub3().

def taskinit.write_task_obit (   taskname)
Eulogize the task in the logger.

Definition at line 402 of file taskinit.py.


Variable Documentation

tuple taskinit.af

Definition at line 66 of file taskinit.py.

Definition at line 65 of file taskinit.py.

Referenced by flaghelper.backupFlags().

tuple taskinit.at

Definition at line 87 of file taskinit.py.

tuple taskinit.ca

Definition at line 88 of file taskinit.py.

Definition at line 50 of file taskinit.py.

casa state...

Definition at line 42 of file taskinit.py.

allow globals for taskby default

Definition at line 46 of file taskinit.py.

Definition at line 84 of file taskinit.py.

Definition at line 72 of file taskinit.py.

tuple taskinit.cp

Definition at line 60 of file taskinit.py.

Definition at line 59 of file taskinit.py.

tuple taskinit.cu

Definition at line 81 of file taskinit.py.

Definition at line 75 of file taskinit.py.

Definition at line 222 of file taskinit.py.

Definition at line 64 of file taskinit.py.

Definition at line 78 of file taskinit.py.

Definition at line 79 of file taskinit.py.

Definition at line 68 of file taskinit.py.

Referenced by task_immath.__check_stokes(), task_immath._doPolA(), task_immath._doPolI(), task_immath._immath_createPolMask(), task_imval._imval_getregion(), tests.test_impbcor.impbcor_test._testit(), task_boxit.boxit(), tests.test_imfit.check_image(), tests.test_imcollapse.imcollapse_test.checkImage(), tests.test_impbcor.impbcor_test.checkImage(), tests.test_specfit.specfit_test.checkImage(), task_exportfits.exportfits(), task_imcollapse.imcollapse(), task_imcontsub.imcontsub(), task_imfit.imfit(), task_imhead.imhead(), task_immath.immath(), task_immoments.immoments(), task_impbcor.impbcor(), task_imregrid.imregrid(), task_imsmooth.imsmooth(), task_imstat.imstat(), task_imsubimage.imsubimage(), task_imtrans.imtrans(), task_imval.imval(), tests.test_imcollapse.run_collapse(), tests.test_imsmooth.run_convolve2d(), tests.test_specfit.run_fitprofile(), tests.test_rg_frombcs.run_frombcs(), tests.test_impbcor.run_pbcor(), tests.test_imtrans.run_transpose(), task_specfit.specfit(), tests.test_imstat.imstat_test.test001(), tests.test_imstat.imstat_test.test002(), tests.test_imstat.imstat_test.test003(), tests.test_imstat.imstat_test.test004(), tests.test_imstat.imstat_test.test005(), tests.test_imstat.imstat_test.test006(), tests.test_imstat.imstat_test.test008(), tests.test_imstat.imstat_test.test009(), tests.test_imstat.imstat_test.test010(), tests.test_specfit.specfit_test.test_14(), tests.test_imcollapse.imcollapse_test.test_8(), tests.test_imcollapse.imcollapse_test.test_beams(), tests.test_immath.immath_test3.test_CAS2120(), tests.test_immoments.immoment_test2.test_CAS2943(), tests.test_immath.immath_test3.test_CAS2943(), tests.test_imhead.imhead_test.test_CAS4355(), tests.test_immoments.immoment_test2.test_CAS4526(), tests.test_imfit.imfit_test.test_CAS_1233(), tests.test_immath.immath_test2.test_CAS_1830_fix(), tests.test_imfit.imfit_test.test_CAS_2318(), tests.test_imtrans.imtrans_test.test_cas_2364(), tests.test_imfit.imfit_test.test_CAS_2595(), tests.test_imfit.imfit_test.test_CAS_2633(), tests.test_coordsys.coordsys_test.test_CAS_2724(), tests.test_imfit.imfit_test.test_CAS_2999(), tests.test_imcollapse.imcollapse_test.test_CAS_3418(), tests.test_immoments.immoment_test2.test_CAS_4400(), tests.test_imval.imval_test.test_coord_return(), tests.test_immath.immath_test2.test_expr1(), tests.test_immath.immath_test2.test_expr2(), tests.test_immath.immath_test2.test_expr3(), tests.test_imfit.imfit_test.test_fit_using_box(), tests.test_imfit.imfit_test.test_fit_using_estimates(), tests.test_imfit.imfit_test.test_fit_using_full_image(), tests.test_imfit.imfit_test.test_fit_using_range(), tests.test_imfit.imfit_test.test_fix_zero_level(), tests.test_imfit.imfit_test.test_logfile(), tests.test_immath.immath_test2.test_many_images(), tests.test_immoments.immoment_test2.test_moments(), tests.test_ia_tofits.ia_tofits_test.test_multibeam(), tests.test_imfit.imfit_test.test_multibeam(), tests.test_imfit.imfit_test.test_newestimates(), tests.test_imfit.imfit_test.test_non_zero_channel(), tests.test_imfit.imfit_test.test_nonconvergence(), tests.test_imfit.imfit_test.test_polarization_image(), tests.test_imfit.imfit_test.test_position_errors(), tests.test_rg_frombcs.rg_frombcs_test.test_region_record(), tests.test_imfit.imfit_test.test_residual_and_model(), tests.test_imtrans.imtrans_test.test_straight_copy(), tests.test_imfit.imfit_test.test_strange_units(), tests.test_ia_rebin.ia_rebin_test.test_stretch(), tests.test_ia_histograms.ia_histograms_test.test_stretch(), tests.test_imstat.imstat_test.test_stretch(), tests.test_impbcor.impbcor_test.test_stretch(), tests.test_imcollapse.imcollapse_test.test_stretch(), tests.test_specfit.specfit_test.test_stretch(), tests.test_imsmooth.imsmooth_test.test_stretch(), tests.test_imfit.imfit_test.test_stretch(), tests.test_imsmooth.imsmooth_test.test_targetres(), tests.test_imtrans.imtrans_test.test_transpose(), tests.test_imfit.imfit_test.test_xx_fit(), and tests.test_imfit.imfit_test.test_zero_level().

Definition at line 48 of file taskinit.py.

Definition at line 67 of file taskinit.py.

Referenced by plotcomp.plotcomp(), and task_predictcomp.predictcomp().

tuple taskinit.mp

Definition at line 56 of file taskinit.py.

Definition at line 55 of file taskinit.py.

Definition at line 77 of file taskinit.py.

tuple taskinit.pm

Definition at line 58 of file taskinit.py.

Definition at line 57 of file taskinit.py.

Definition at line 69 of file taskinit.py.

tuple taskinit.qa

Definition at line 62 of file taskinit.py.

Definition at line 61 of file taskinit.py.

Referenced by task_clean.clean(), and task_ft.ft().

Definition at line 73 of file taskinit.py.

Referenced by tests.test_rg_frombcs.run_frombcs().

Definition at line 70 of file taskinit.py.

Referenced by plotcomp.plotcomp().

Definition at line 63 of file taskinit.py.

Referenced by tests.test_sdsave.sdsave_test6._compare(), tests.test_sdsave.sdsave_test6._pointingKeywordExists(), tests.test_slsearch.slsearch_test._testit(), task_browsetable.browsetable(), tests.test_testconcat.checktable(), task_concat.concat(), task_fixplanets.fixplanets(), tests.test_setjy.SetjyUnitTestBase.get_last_history_line(), partitionhelper.getSubtables(), partitionhelper.makeMMS(), task_setjy.nselrows(), plotcomp.plotcomp(), parallel.parallel_task_helper.ParallelTaskHelper.restoreSubtableAgreement(), task_setjy.setjy(), task_split.split(), task_split.split_core(), task_statwt.statwt(), tests.test_setjy.test_MultipleObservations.test1_MultipleObservationOldModel(), tests.test_simplecluster.test_setjy_mms.test1_setjy_scratchless_mode_single_model(), tests.test_setjy.test_SingleObservation.test1_SingleObservationOldModel(), tests.test_setjy.test_MultipleObservations.test2_MultipleObservationOldModel(), tests.test_simplecluster.test_setjy_mms.test2_setjy_scratchless_mode_multiple_model(), tests.test_setjy.test_SingleObservation.test2_SingleObservationSelectByChan(), tests.test_simplecluster.test_setjy_mms.test3_setjy_scratch_mode_single_model(), tests.test_setjy.test_SingleObservation.test3_SingleObservationNewModel(), tests.test_simplecluster.test_setjy_mms.test4_setjy_scratch_mode_multiple_model(), tests.test_immath.immath_test3.test_CAS2120(), tests.test_splattotable.splattotable_test.test_good_list(), task_testconcat.testconcat(), recipes.almahelpers.tsysspwmap(), task_uvcontsub3.uvcontsub3(), and task_virtualconcat.virtualconcat().

tuple taskinit.tp

Definition at line 54 of file taskinit.py.

Definition at line 53 of file taskinit.py.

Definition at line 80 of file taskinit.py.

Definition at line 82 of file taskinit.py.

tuple taskinit.vi

Definition at line 216 of file taskinit.py.

done with common tools

Definition at line 214 of file taskinit.py.

Definition at line 83 of file taskinit.py.

Referenced by importarchive.importarchive(), and task_importvla.importvla().

Definition at line 76 of file taskinit.py.