| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

test_rand.py

Go to the documentation of this file.
00001 #!/usr/bin/python
00002 
00003 from numpy import histogram, random
00004 
00005 import sys
00006 try:
00007     mean = float(sys.argv[1])
00008 except IndexError:
00009     print 'usage: test_rand.py mean [number]'
00010     sys.exit(1)
00011 
00012 try:
00013     number = int(sys.argv[2])
00014 except IndexError:
00015     number = 1000
00016 
00017 import math
00018 nbins=int(mean*3*math.sqrt(mean))
00019 ph = histogram(random.poisson(mean,number),nbins,(0,nbins+1),False)
00020 
00021 import matplotlib.pyplot as plt
00022 plt.plot(ph[1],ph[0])
00023 plt.show()
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 21:01:08 2011 for GenDecay by doxygen 1.4.7