New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better support for functions that use random numbers #41

Merged
merged 4 commits into from Aug 12, 2013

Conversation

Projects
None yet
1 participant
@leouieda
Member

leouieda commented Aug 9, 2013

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.

@leouieda

This comment has been minimized.

Member

leouieda commented Aug 9, 2013

@birocoles you were right, utils.contaminate was using noise that had the mean a bit shifted. I now subtract the mean from the noise before adding it to the data. Thanks

leouieda added a commit that referenced this pull request Aug 12, 2013

Merge pull request #41 from leouieda/random
Better support for functions that use random numbers

@leouieda leouieda merged commit a610c66 into master Aug 12, 2013

1 check passed

default The Travis CI build passed
Details

@leouieda leouieda deleted the random branch Aug 12, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment