#!/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")