A resonant waveguide grating, defining a first side and a second side opposite to said first side, said resonant waveguide grating comprising: - a substrate layer defining a first substrate surface and a second substrate surface facing said first substrate surface; - a waveguiding layer, having a first waveguiding surface and a second waveguiding surface, arranged on said substrate layer, and having a predetermined permittivity function defined in the direction perpendicular to said first waveguiding surface, - a plurality of subwavelength structures, wherein: - said waveguiding layer is configured to guide at most ten wave-guided light modes in a predetermined wavelength range; - said plurality of subwavelength structures comprises at least two adjacent grooves (30, 31) defining each a groove center (30a, 31a) and comprises at least two adjacent ridges (40, 41) defining each a ridge center (40a, 41a), said two adjacent grooves (30, 31) having a subwavelength distance between their centers (30a, 31a) being different from the subwavelength distance between the centers of said two adjacent ridges (40, 41); - said plurality of subwavelength structures are arranged to be in optical communication through said waveguiding layer which permittivity function and the dimension and orientation of said plurality of subwavelength structures are chosen so that the plurality of subwavelength structures couples resonantly, by diffraction, into said waveguiding layer at least an incoupled portion of an incident light beam, provided by a light emitter into at least one of said at most ten wave-guided modes of the waveguiding layer, - said waveguiding layer comprising at least two sets of a plurality of adjacent subwavelength structures having a spatial Fourier transform containing at least two distinct effective spatial frequency components, - a portion of said waveguiding layer comprising at least two sets of a plurality of adjacent subwavelength structures having a local spatial periodicity, this local periodicity being defined in that the lateral and vertical dimensions of said at least two sets of a plurality of adjacent subwavelength structures does not vary by more than 10% in said portion, - said plurality of subwavelength structures are configured to couple out of said waveguiding layer resonantly by diffraction, an outcoupled fraction of said at least an incoupled portion; - said outcoupled fraction of said at least incoupled portion has a predetermined central wavelength λ 0 in said predetermined wavelength range and has a predetermined spectral width Δλ, said outcoupled fraction being a diffracted part of the incident light beam. - a substrate layer defining a first substrate surface and a second substrate surface facing said first substrate surface; - a waveguiding layer, having a first waveguiding surface and a second waveguiding surface, arranged on said substrate layer, and having a predetermined permittivity function defined in the direction perpendicular to said first waveguiding surface, - a plurality of subwavelength structures, - said waveguiding layer is configured to guide at most ten wave-guided light modes in a predetermined wavelength range; - said plurality of subwavelength structures comprises at least two adjacent grooves (30, 31) defining each a groove center (30a, 31a) and comprises at least two adjacent ridges (40, 41) defining each a ridge center (40a, 41a), said two adjacent grooves (30, 31) having a subwavelength distance between their centers (30a, 31a) being different from the subwavelength distance between the centers of said two adjacent ridges (40, 41); - said plurality of subwavelength structures are arranged to be in optical communication through said waveguiding layer which permittivity function and the dimension and orientation of said plurality of subwavelength structures are chosen so that the plurality of subwavelength structures couples resonantly, by diffraction, into said waveguiding layer at least an incoupled portion of an incident light beam, provided by a light emitter into at least one of said at most ten wave-guided modes of the waveguiding layer, - said waveguiding layer comprising at least two sets of a plurality of adjacent subwavelength structures having a spatial Fourier transform containing at least two distinct effective spatial frequency components, - a portion of said waveguiding layer comprising at least two sets of a plurality of adjacent subwavelength structures having a local spatial periodicity, this local periodicity being defined in that the lateral and vertical dimensions of said at least two sets of a plurality of adjacent subwavelength structures does not vary by more than 10% in said portion, - said plurality of subwavelength structures are configured to couple out of said waveguiding layer resonantly by diffraction, an outcoupled fraction of said at least an incoupled portion; - said outcoupled fraction of said at least incoupled portion has a predetermined central wavelength λ 0 in said predetermined wavelength range and has a predetermined spectral width Δλ, said outcoupled fraction being a diffracted part of the incident light beam.