[Numpy-discussion] how to get an array with "varying" poisson distribution

Sebastian Haase haase at msg.ucsf.edu
Mon Jul 24 15:31:46 EDT 2006


Hi,
Essentially I'm looking  for the equivalent of what was in numarray:
    from numarray import random_array
    random_array.poisson(arr)

That is: if for example arr is a 256x256 array of positive integers, then this 
returns a new array of random numbers than are drawn according to the poisson 
statistics  where arr's value at coordinate y,x  determines the mean of the 
poisson distribution used  to generate  a new value for y,x. 

[[This is needed e.g. to simulate quantum noise in CCD images. Each pixel has 
different amount of noise depending of what it's (noise-free) "input" value 
was.]]

Thanks,
Sebastian Haase




More information about the NumPy-Discussion mailing list