Generation of high-energy rectangular pulses in a nonlinear polarization rotation mode-locked ring fiber laser.