Text this: Spectral filtering effect of diffraction gratings with a lens coupling to optical fibers