blob: bb10ba4b7e5c1f30fba172cd119410055e73ab7c (
plain)
1
2
3
4
5
6
7
8
9
10
|
import numpy as np
def get_1D_gauss(n,m,s):
"return a 1D histogram for a gaussian distribution (n bins, mean m and std s) "
x=np.arange(n,dtype=np.float64)
h=np.exp(-(x-m)**2/(2*s^2))
return h/h.sum()
|