Mario Figueiredo <mar...@gmail.com> wrote: >Other than replacing the random module with the probability density >function for the exponential distribution, do you have a suggestion of >how I could smooth the curve?
Moving average. Try: def movingaverage(interval, window_size): window= numpy.ones(int(window_size))/float(window_size) return numpy.convolve(interval, window, 'same') y_av = movingaverage(y,10) Note that you'd get problems at the start and end of the curve if it's non-zero there, which is difficult to avoid with noise-reduction. -- https://mail.python.org/mailman/listinfo/python-list