newest version of the splitting_densityGrid.py script