Fiber Bragg grating based notch filter for bit-rate-transparent NRZ to PRZ format conversion with two-degree-of-freedom optimization