Generalised the index calculation
Merge branch 'master' of https://github.com/UCL/LatBo.jl