leouieda/fatiando — pull request #41 by leouieda (2013-08-09 20:03:01+00:00)
Title: Better support for functions that use random numbers

I added options to set the random number seed in functions like `utils.contaminate` and `gridder.scatter`.
This way it is now possible to fix the data so that it won't change every time you run the script. Things like `seismic.srtomo` that rely on random points for their data can now be a bit saner.

Also, now it is guaranteed that `utils.contaminate` uses normal errors with zero mean. This wasn't happening before and could introduce a systematic shift in the data, not just random errors.

All this is tested in the script `tests/test_random.py`.