Abstract: We have developed a guided ptychography iterative engine (gPIE) algorithm that applies the concept of optimization to the conventional ePIE (extended ptychography iterative engine) approach.