Example #1
0
 def AddAskapPackage(pkgname=None, tag=None,
                     libs=None, libdir=None, incdir=None):
     dep = Dependency()
     if env.has_key("update") and env["update"]:
         dep.selfupdate = True
     dep.add_package(pkgname, tag, libs, libdir, incdir)
     env.AppendUnique(CPPPATH=dep.get_includedirs())
     localld = os.path.join(os.path.abspath(os.curdir), "install", "lib")
     env["ASKAP_LIBRARY_PATH"] += \
             os.path.pathsep.join(('', localld, dep.get_ld_library_path()))
     ldvar = sys.platform == "darwin" and "DYLD_LIBRARY_PATH" or \
         "LD_LIBRARY_PATH"
     env["ENV"][ldvar] = env["ASKAP_LIBRARY_PATH"]
     for k,v in dep.get_env().iteritems():
         # make platform specific
         if k.find("LD_LIBRARY_PATH") > -1:
             k = ldvar
         env.PrependENVPath(k, v)
     env.PrependENVPath("PATH", dep.get_path())
     env["ASKAP_BIN_PATH"] = dep.get_path()
     env.AppendUnique(LIBPATH=dep.get_librarydirs())
     env.Append(LIBS=dep.get_libs())
     try:
         ice = dep.get_install_path("ice")
         env["ICE_HOME"] = ice
         env["INTERFACE_HOME"] = \
             os.path.join(dep.ASKAPROOT, dep.get_dep_path("interfaces"))
     except KeyError:
         pass
     env.AppendUnique(CPPFLAGS=dep.get_cppflags())
     env.Append(DOXYTAGS=dep.get_tagfiles())
Example #2
0
import os
import time
from askapdev.rbuild.dependencies import Dependency

# main()
origdir = os.path.abspath(os.curdir)
os.chdir("../..")
dep = Dependency()
dep.add_package()
os.chdir(origdir)

import IcePy
import sys, traceback, Ice
import askap

# Import interfaces
from askap.slice import CommonTypes
from askap.slice import CP

status = 0
ic = None
try:
    ic = Ice.initialize(sys.argv)

    # Execute a batch job
    base = ic.stringToProxy("CentralProcessorService@CentralProcessorAdapter")
    if not base:
        raise RuntimeError("CentralProcessorService proxy not found")
    svc = askap.interfaces.cp.ICPObsServicePrx.checkedCast(base)
    if not svc:
        raise RuntimeError("Invalid CPObsService proxy")
Example #3
0
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA.
#
# @author Malte Marquarding <*****@*****.**>
#
import os, re
import sys

from askapdev.rbuild.dependencies import Dependency
from askapdev.rbuild.debian import *
from askapdev.rbuild.utils import q_print

if __name__ == "__main__":
    rdir = os.path.abspath(os.curdir)
    if not os.path.exists("build.py"):
        raise OSError("Can only be run from within package directory")
    a_root = os.getenv('ASKAP_ROOT')
    myself = os.path.relpath(rdir, a_root)
    deps = Dependency()
    deps.add_package()
    dep_list = [os.path.relpath(rdir, a_root) for rdir in deps.get_rootdirs()]
    for dep in dep_list+[myself]:
        nodeb = os.path.join(a_root, dep, "NO_DEBIAN")
        if os.path.exists(nodeb):
            q_print("Ignoring package '{0}' which set to NO_DEBIAN".format(dep))
            continue
        add_debian(dep)
    
Example #4
0
# regression tests of calibrator
# some fixed parameters are given in calibratortest_template.in

from synthprogrunner import *

from askapdev.rbuild import setup
from askapdev.rbuild.dependencies import Dependency

dep = Dependency(silent=False)
dep.DEPFILE = "../../dependencies"
dep.add_package()

#import askap.parset


def analyseResult(spr):
    '''
      spr - synthesis program runner (to run imageStats)

      throws exceptions if something is wrong, otherwise just
      returns
   '''
    src_offset = 0.004 / math.pi * 180.
    psf_peak = [-172.5, -45]
    true_peak = sinProjection(psf_peak, src_offset, src_offset)
    stats = spr.imageStats('image.field1.restored')
    print "Statistics for restored image: ", stats
    disterr = getDistance(stats, true_peak[0], true_peak[1]) * 3600.
    if disterr > 8:
        raise RuntimeError, "Offset between true and expected position exceeds 1 cell size (8 arcsec), d=%f, true_peak=%s" % (
            disterr, true_peak)
Example #5
0
 def _init_dependencies(self):
     self.dep = Dependency()
     self.dep.add_package()