Return to Snippet

Revision: 67099
at August 11, 2014 22:20 by aturlapaty


Initial Code
# -*- coding: utf-8 -*-
"""
Created on Sun Aug 10 16:27:16 2014

@author: Anish
"""
#Spyder Editor


# Importing libraries 
import os
os.system('cls')
import numpy as np
import matplotlib.pyplot as plt

#clf()
Nlim = 100

a = 1 
b = 2
l = 10
x = 0

s = np.random.poisson(l, 1)
plt.plot(x,s,'-r')
plt.show()                         # redraw the canvas
plt.xlabel('Time Lapsed (ms)')
plt.ylabel('Particle Counts')
# for loop for recursive plotting of poisson process 
while x < Nlim:
    x = x+1
    s = np.random.poisson(l, 1)
    plt.plot(x,s,'or')
    plt.show()                         # redraw the canvas
    pause(.2)

Initial URL
Poisson Process: Counting

Initial Description
A simple algorithm for counting particles emitted by radio active matter assumed to be described by a Poisson process

Initial Title
Particle count in Poisson process

Initial Tags


Initial Language
Python