Analysis.py
1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/python
from sys import argv
from numpy import shape
from Modules.Spectrum import drawSpectrum, drawSpectrum_normaLepton
from Modules.Angle import drawAngle, drawRadial
from Modules.Timing import drawTiming
from Modules.Generation import drawGeneration
from Modules.Map import drawMap
def error(error_type):
print error_type
print "Give at least 2 arguments"
print "first argument could be:"
print " - spectrum (flux versus energy)"
print " - angle (angle versus energy)"
print " - radial (angular distribution)"
print " - timing (time distribution)"
print " - generation (generation histogram)"
print " - maphisto"
print " - map"
print "others arguments are the folders files to plot"
exit()
if shape(argv)[0] < 3:
error("not enough argument")
elif argv[1] == "spectrum":
drawSpectrum(argv[2:],PlotAnalytic=True)
elif argv[1] == "spectrumLept":
drawSpectrum_normaLepton(argv[2:])
elif argv[1] == "angle":
drawAngle(argv[2:])
elif argv[1] == "radial":
drawRadial(argv[2:])
elif argv[1] == "timing":
drawTiming(argv[2:])
elif argv[1] == "generation":
drawGeneration(argv[2:])
elif argv[1] == "map":
drawMap(argv[2:])
else:
error("bad 1st argument")