Commit c495b3a423df07c2675009d1c94e6ed858770aab

Authored by Jürgen Knödlseder
1 parent 5303e49b

Re-arrange (possibly obsolete) test scripts

inst/lat/test/binned_integration.py renamed to inst/lat/test/dev/binned_integration.py
inst/lat/test/test_python.py renamed to inst/lat/test/dev/test_python.py
... ... @@ -40,8 +40,8 @@ def analyse_unbinned(xmlname):
40 40  
41 41 # Load LAT observation
42 42 lat = GLATObservation()
43   - lat.load_unbinned("data/p7v6/ft1.fits", "data/p7v6/ft2.fits", "data/p7v6/ltcube.fits")
44   - lat.response("P7SOURCE_V6", "../caldb")
  43 + lat.load_unbinned("../data/p7v6/ft1.fits", "../data/p7v6/ft2.fits", "../data/p7v6/ltcube.fits")
  44 + lat.response("P7SOURCE_V6")
45 45  
46 46 # Setup ROI covered by data
47 47 instDir = GSkyDir()
... ... @@ -82,8 +82,8 @@ def analyse_binned(xmlname):
82 82  
83 83 # Load LAT observation
84 84 lat = GLATObservation()
85   - lat.load_binned("data/p7v6/srcmap.fits", "data/p7v6/binned_expmap.fits", "data/p7v6/ltcube.fits")
86   - lat.response("P7SOURCE_V6", "../caldb")
  85 + lat.load_binned("../data/p7v6/srcmap.fits", "../data/p7v6/binned_expmap.fits", "../data/p7v6/ltcube.fits")
  86 + lat.response("P7SOURCE_V6")
87 87 lat.response().force_mean(True)
88 88  
89 89 # Append LAT observation to container
... ... @@ -180,9 +180,7 @@ def plot_residuals(obs):
180 180 # Main routine entry point #
181 181 #==========================#
182 182 if __name__ == '__main__':
183   - """
184   - Perform testing.
185   - """
  183 +
186 184 # Dump result
187 185 print("")
188 186 print("**************************************")
... ... @@ -190,5 +188,5 @@ if __name__ == '__main__':
190 188 print("**************************************")
191 189  
192 190 # Analyse data
193   -# analyse_unbinned("data/p7v6/crab_model.xml")
194   - analyse_binned("data/p7v6/crab_model.xml")
  191 +# analyse_unbinned("../data/p7v6/crab_model.xml")
  192 + analyse_binned("../data/p7v6/crab_model.xml")
... ...
inst/mwl/test/test_python.py renamed to inst/mwl/test/dev/test_python.py
... ... @@ -103,9 +103,7 @@ def fit_spectrum(filename, xmlname):
103 103 # Main routine entry point #
104 104 #==========================#
105 105 if __name__ == '__main__':
106   - """
107   - Perform testing.
108   - """
  106 +
109 107 # Dump result
110 108 print("")
111 109 print("****************************")
... ... @@ -123,10 +121,10 @@ if __name__ == '__main__':
123 121 plt.title('GammaLib fit of the Crab PWN')
124 122  
125 123 # Extract data from FITS file
126   - extract_data("data/crab_mwl.fits")
  124 + extract_data("../data/crab_mwl.fits")
127 125  
128 126 # Fit spectrum
129   - fit_spectrum("data/crab_mwl.fits", "data/crab_mwl2.xml")
  127 + fit_spectrum("../data/crab_mwl.fits", "../data/crab_mwl2.xml")
130 128  
131 129 # Show spectrum
132 130 plt.show()
... ...
testall.sh
... ... @@ -56,20 +56,20 @@ cd inst/cta/test/dev
56 56 cd $base
57 57  
58 58  
59   -# inst/lat/test
60   -# =============
  59 +# inst/lat/test/dev
  60 +# =================
61 61 echo
62   -echo "=====> inst/lat/test"
63   -cd inst/lat/test
64   -./test_python.py
  62 +echo "=====> inst/lat/test/dev"
  63 +cd inst/lat/test/dev
  64 +#./test_python.py
65 65 cd $base
66 66  
67 67  
68   -# inst/mwl/test
69   -# =============
  68 +# inst/mwl/test/dev
  69 +# =================
70 70 echo
71   -echo "=====> inst/mwl/test"
72   -cd inst/mwl/test
  71 +echo "=====> inst/mwl/test/dev"
  72 +cd inst/mwl/test/dev
73 73 ./test_python.py
74 74 cd $base
75 75  
... ...