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

Classes

class  casaDocHelper

Functions

def casalogger
def go
def selectfield
def selectantenna
def readboxfile
def inp
def update_params
def print_params_col
 function to print inputs with coloring colorparam 'blue'=> non-default, colorcomment 'green'=> can have sub params 'blue' => is a sub-parameter blue = [94m bold = [1m red = [91m cyan = [96m green= [92m normal = [0m underline= [04m reverse = [7m highlight with black = [40s
def __set_default_parameters
def tput
def saveinputs
def default
def taskparamgui
def exit

Variables

tuple ppid
 tweak path...
tuple homedir
dictionary casa
list __casapath__
 
set up casa root

list exelist
 
setup helper paths...
list entry
 dd
 
next search through $PATH for executables

list a
string __ipython_colors
 get a copy from goofy python
tuple c
 strip out 2 element ipython flags (which we recognize) here...
list casa_path
 we join multi-arg parameters here
tuple argv_0_path
 
ensure default initialization occurs before this point...
tuple dbus_path
 dbus_conf
list args
 close standard input to avoid terminal interrupts
tuple dbus_address
list ipythonenv
list ipythonpath
list logpid
 showconsole
string thelogfile
 deploylogger
int vwrpid
 setup file catalog
 true
 CAS-951: matplotlib unresponsive on some 64bit systems.
 T
 false
 F
list ipython
list home
string fullpath
 

string ipythonlog
tuple ipshell
 assume casa['flags']['-c'] is a file to execute...

Function Documentation

def casapy.__set_default_parameters (   b) [private]

Definition at line 912 of file casapy.py.

References asap.asapmath.keys.

def casapy.casalogger (   logfile = '')
Spawn a new casalogger using logfile as the filename.
You should only call this if the casalogger dies or you close it
and restart it again.

Note: if you changed the name of the log file using casalog.setlogfile
you will need to respawn casalogger with the new log filename. Eventually,
we will figure out how to signal the casalogger with the new name but not
for a while.

Definition at line 396 of file casapy.py.

def casapy.default (   taskname = None)
reset given task to its default values :

taskname -- Name of task

Definition at line 1038 of file casapy.py.

def casapy.exit ( )
def casapy.go (   taskname = None)
Execute taskname: 

Definition at line 488 of file casapy.py.

References parameter_check.parameter_checktype().

def casapy.inp (   taskname = None)

Definition at line 593 of file casapy.py.

References parameter_check.parameter_checktype(), and update_params().

def casapy.print_params_col (   param = None,
  value = None,
  comment = '',
  colorparam = None,
  colorcomment = None,
  noerrorval = True 
)

function to print inputs with coloring colorparam 'blue'=> non-default, colorcomment 'green'=> can have sub params 'blue' => is a sub-parameter blue = [94m bold = [1m red = [91m cyan = [96m green= [92m normal = [0m underline= [04m reverse = [7m highlight with black = [40s

Definition at line 818 of file casapy.py.

Referenced by update_params().

def casapy.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 557 of file casapy.py.

def casapy.saveinputs (   taskname = None,
  outfile = '',
  myparams = None,
  ipython_globals = None,
  scriptstr = [''] 
)
Save current input values to file on disk for a specified task:

taskname -- Name of task
    default: <unset>; example: taskname='bandpass'
    <Options: type tasklist() for the complete list>
outfile -- Output file for the task inputs
    default: taskname.saved; example: outfile=taskname.orion

Definition at line 949 of file casapy.py.

References parameter_check.parameter_checktype().

Referenced by tput().

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

Definition at line 535 of file casapy.py.

References tests.test_imcontsub.list.

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

Definition at line 509 of file casapy.py.

References tests.test_imcontsub.list.

def casapy.taskparamgui (   useGlobals = True)
    Show a parameter-setting GUI for all available tasks.

Definition at line 1069 of file casapy.py.

def casapy.tput (   taskname = None,
  outfile = '' 
)

Definition at line 940 of file casapy.py.

References saveinputs().

def casapy.update_params (   func,
  printtext = True,
  ipython_globals = None 
)

Definition at line 631 of file casapy.py.

References accum_pg.defaults(), asap.asapmath.keys, and print_params_col().

Referenced by inp().


Variable Documentation


set up casa root

Definition at line 137 of file casapy.py.

get a copy from goofy python

Definition at line 211 of file casapy.py.

list casapy.a

Definition at line 209 of file casapy.py.

close standard input to avoid terminal interrupts

Definition at line 341 of file casapy.py.


ensure default initialization occurs before this point...

 prelude.py  =>  setup/modification of casa settings
 init.py     =>  user setup (with task access)


on linux set up a dbus-daemon for casa because each x-server (e.g. Xvfb) gets its own dbus session...

Definition at line 319 of file casapy.py.

tuple casapy.c

strip out 2 element ipython flags (which we recognize) here...

strip out single element ipython flags (which we recognize) here...

Definition at line 213 of file casapy.py.

Referenced by testwrapper.UnitTest.getUnitTest().

dictionary casapy.casa

Definition at line 102 of file casapy.py.

we join multi-arg parameters here

user specifies a log file user indicates no log file

Definition at line 280 of file casapy.py.

Definition at line 351 of file casapy.py.

Definition at line 321 of file casapy.py.

Definition at line 320 of file casapy.py.


next search through $PATH for executables

Definition at line 187 of file casapy.py.

Definition at line 441 of file casapy.py.

Definition at line 177 of file casapy.py.


setup helper paths...



try to set casapyinfo path...

first try to find executables using casapyinfo... (since system area versions may be incompatible)... next try likely system areas...

note: hosts which have dbus-daemon-1 but not dbus-daemon seem to have a broken dbus-daemon-1...

Definition at line 176 of file casapy.py.

Definition at line 1111 of file casapy.py.

Definition at line 1110 of file casapy.py.


 prelude.py  =>  setup/modification of casa settings (above)
 init.py     =>  user setup (with task access)

Definition at line 1159 of file casapy.py.

Referenced by parallel.pimager.pimager.pcont(), and parallel.pimager.pimager.pcontmt().

Definition at line 1135 of file casapy.py.

Definition at line 95 of file casapy.py.

assume casa['flags']['-c'] is a file to execute...

assume casa['flags']['-c'] is a python command...

Definition at line 1202 of file casapy.py.

Definition at line 1114 of file casapy.py.

Definition at line 359 of file casapy.py.

Definition at line 1183 of file casapy.py.

Definition at line 360 of file casapy.py.

Definition at line 394 of file casapy.py.

tuple casapy.ppid

tweak path...

where necessary...

path_addition = [ ] for p in sys.path : if p.startswith(sys.prefix):

According to

http://www.debian.org/doc/packaging-manuals/python-policy/ch-python.html

"Python modules not handled by python-central or python-support must

be installed in the system Python modules directory,

/usr/lib/pythonX.Y/dist-packages for python2.6 and later, and

/usr/lib/pythonX.Y/site-packages for python2.5 and earlier."

I am not sure if this is general Python policy, or just Debian policy.

In any case, dist-packages is a more honestly named site-packages, since

nominally site stuff goes in /usr/local or /opt.

for wanted in ['lib-tk', 'dist-packages']: newpath = p + os.sep + wanted if os.path.isdir(newpath): path_addition.append(newpath) watchdog... which is not in the casapy process group close standard input to avoid terminal interrupts

Definition at line 53 of file casapy.py.

Definition at line 431 of file casapy.py.

Definition at line 1109 of file casapy.py.

Definition at line 433 of file casapy.py.

CAS-951: matplotlib unresponsive on some 64bit systems.

Definition at line 1108 of file casapy.py.

setup file catalog

Definition at line 481 of file casapy.py.