Beam characterization by phase retrieval solving the transport-of-intensity-equation.