# casa.init.py.src
#
# Copy this to or insert this into ~/.casa/init.py
# to allow access to GILDAS utilities inside CASA
#
# This version is through an "execfile"
# Could not get the "import" version working
#
# Distinguish Development from Executable area
gagsrc = os.getenv("gagsrcdir", default="none")
if gagsrc=="none" :
  gagpath = os.environ["GAG_EXEC_DIR"] 
else:
  gagsys = os.getenv("GAG_EXEC_SYSTEM", default="none")
  gagpath = gagsrc+"/integ/"+gagsys

# Add Gildas Python path to CASA (could be useful)
gagpython = gagpath+"/python"
sys.path.append(gagpython)
#
# execute Casa to Gildas starting file
gagpython = gagpython+"/casa2gildas.py"
execfile(gagpython)
print " "
print "Defining Casa to Gildas tools"
print "   Use casagildas() method for automatic conversion of MS to UVFITS"

