A waveguide that is operative to produce a reflected optical signal having
a spectral profile corresponding to a product of a spectral profile of an
input optical signal and a predetermined complex-valued spectral filtering
function wherein the waveguide includes a plurality of spatially distinct
subgratings each possessing a periodic array of diffraction elements. The
subgratings are situated and configured based on the predetermined
complex-valued spectral filtering function.