This version of the code is for the published version of our paper, which was published with Nature Communications in November 2018 here: https://www.nature.com/articles/s41467-018-07210-0. This is distinguished from v1.0 (which corresponds to our pre-print from 2017) and any later changes (2019+) to make the code easier to use.