Fixed cell index calculations (sim now works until PSM is filled)
Merge branch 'master' of github.com:JackHolland/sogen-deterministic