Retrieving Optical Pulse Profiles Using a Nonlinear Optical Loop Mirror