Iterative least-squares solver for generalized maximum-likelihood ptychography | Synapse