Code for analysing the peculiar velocities of halos from snapshots