An apparatus comprising: a first coupler operable to separate an optical pulse into a first optical pulse portion and a second optical pulse portion; and a second coupler for recombining the first optical pulse portion and the second optical pulse portion; a first optical path coupled to the first coupler to carry the first optical pulse portion, the first optical path comprising a waveguide or optical fiber formed of a nonlinear optical medium, characterised in that the first optical pulse portion undergoes self-modulation comprising a light-induced phase change due to the intensity-dependent refractive index of the nonlinear optical medium; and that the apparatus further comprises: a second optical path coupled to the first coupler operable to carry the second optical pulse portion, the second optical path comprising a waveguide or optical fiber formed of a different optical medium from the medium of the first optical path; a first output waveguide coupled to the second coupler, wherein the first output waveguide is coupled to receive a high intensity main pulse portion of the optical pulse after recombination in the second coupler; and a second output waveguide coupled to the second coupler, wherein the second output waveguide is coupled to receive low intensity wings of the optical pulse after recombination in the second coupler. a first coupler operable to separate an optical pulse into a first optical pulse portion and a second optical pulse portion; and a second coupler for recombining the first optical pulse portion and the second optical pulse portion; a first optical path coupled to the first coupler to carry the first optical pulse portion, the first optical path comprising a waveguide or optical fiber formed of a nonlinear optical medium, characterised in that the first optical pulse portion undergoes self-modulation comprising a light-induced phase change due to the intensity-dependent refractive index of the nonlinear optical medium; and that the apparatus further comprises: a second optical path coupled to the first coupler operable to carry the second optical pulse portion, the second optical path comprising a waveguide or optical fiber formed of a different optical medium from the medium of the first optical path; a first output waveguide coupled to the second coupler, wherein the first output waveguide is coupled to receive a high intensity main pulse portion of the optical pulse after recombination in the second coupler; and a second output waveguide coupled to the second coupler, wherein the second output waveguide is coupled to receive low intensity wings of the optical pulse after recombination in the second coupler. a second optical path coupled to the first coupler operable to carry the second optical pulse portion, the second optical path comprising a waveguide or optical fiber formed of a different optical medium from the medium of the first optical path; a first output waveguide coupled to the second coupler, wherein the first output waveguide is coupled to receive a high intensity main pulse portion of the optical pulse after recombination in the second coupler; and a second output waveguide coupled to the second coupler, wherein the second output waveguide is coupled to receive low intensity wings of the optical pulse after recombination in the second coupler.