def poisson(x,K):
'''Poisson distribution function.
K is average photon counts
In case of low intensity, the beam behavors like particle and
the probability density of photon, P(x), satify this poisson function.
'''
K = float(K)
Pk = np.exp(-K)*power(K,x)/gamma(x+1)
return Pk
评论列表
文章目录