An algorithm using spectral methods to solve the phase retrieval problem in ptychographic reconstructions.