fixing bug in sampling
Merge branch 'master' of github.com:chinchliff/physcripts