changing the order of the loop to have the points sorted in radial_velocity.dat