Development of active gratings for the spectral selection of ultrafast pulses