Commit ed6b9d012880259ab54815ca070e1afbe813e2fd

Authored by Jürgen Knödlseder
1 parent 85d85794

Still experimental ctbin test.

Showing 1 changed file with 6 additions and 7 deletions
test/test_ctbin.py
@@ -69,21 +69,20 @@ class Test(gammalib.GPythonTestSuite): @@ -69,21 +69,20 @@ class Test(gammalib.GPythonTestSuite):
69 Test ctbin on the command line. 69 Test ctbin on the command line.
70 """ 70 """
71 # Set ctbin tool 71 # Set ctbin tool
72 - noout = " &>/dev/null"  
73 ctbin = "../src/ctbin/ctbin" 72 ctbin = "../src/ctbin/ctbin"
74 - if os.system("type "+ctbin+noout) != 0: 73 + if os.system("type "+ctbin+" &>/dev/null") != 0:
75 ctbin = "ctbin" 74 ctbin = "ctbin"
76 - 75 +
77 # Setup ctbin command 76 # Setup ctbin command
78 cmd = ctbin+' inobs="'+self._events_name+'"'+ \ 77 cmd = ctbin+' inobs="'+self._events_name+'"'+ \
79 ' outcube="cntmap_cmd1.fits"'+\ 78 ' outcube="cntmap_cmd1.fits"'+\
80 ' emin=0.1 emax=100.0 enumbins=20 ebinalg="LOG"'+ \ 79 ' emin=0.1 emax=100.0 enumbins=20 ebinalg="LOG"'+ \
81 ' nxpix=200 nypix=200 binsz=0.02 coordsys="CEL"'+ \ 80 ' nxpix=200 nypix=200 binsz=0.02 coordsys="CEL"'+ \
82 - ' xref=83.63 yref=22.01 proj="CAR"'+noout 81 + ' xref=83.63 yref=22.01 proj="CAR"'
83 82
84 # Execute ctbin, make sure we catch any exception 83 # Execute ctbin, make sure we catch any exception
85 try: 84 try:
86 - rc = os.system(cmd) 85 + rc = os.system(cmd+" >/dev/null")
87 except: 86 except:
88 pass 87 pass
89 88
@@ -100,11 +99,11 @@ class Test(gammalib.GPythonTestSuite): @@ -100,11 +99,11 @@ class Test(gammalib.GPythonTestSuite):
100 ' outcube="cntmap_cmd2.fits"'+\ 99 ' outcube="cntmap_cmd2.fits"'+\
101 ' emin=0.1 emax=100.0 enumbins=20 ebinalg="LOG"'+ \ 100 ' emin=0.1 emax=100.0 enumbins=20 ebinalg="LOG"'+ \
102 ' nxpix=200 nypix=200 binsz=0.02 coordsys="CEL"'+ \ 101 ' nxpix=200 nypix=200 binsz=0.02 coordsys="CEL"'+ \
103 - ' xref=83.63 yref=22.01 proj="CAR"'+noout 102 + ' xref=83.63 yref=22.01 proj="CAR"'
104 103
105 # Execute ctbin, make sure we catch any exception 104 # Execute ctbin, make sure we catch any exception
106 try: 105 try:
107 - rc = os.system(cmd) 106 + rc = os.system(cmd+" >/dev/null")
108 except: 107 except:
109 pass 108 pass
110 109