Spot shift calculation bug fixed and integrated in demo script