Position Correction in Ptychography and Its Applications