An integrated, waveguide based, spectrometer implemented in an integrated photonics circuit, the spectrometer comprising - a divider configured to allow a propagating multi-wavelength radiation into a sensing channel and a reference channel, - a sensing region configured for allowing the propagating multi-wavelength radiation from the sensing channel to interact with a sample to be characterized in the sensing region , - a wavelength demultiplexing element arranged for capturing said multi-wavelength radiation after interaction with the sample to be characterized and for providing a plurality of wavelength demultiplexed radiation outputs or a plurality of different groups of wavelength demultiplexed radiation outputs, - a modulator for differently modulating the different demultiplexed radiation outputs or different groups of demultiplexed radiation outputs, - a multiplexer element for multiplexing the differently modulated demultiplexed radiation outputs or the differently modulated grouped demultiplexed radiation outputs into a single output, - a reference region receiving a propagating multi-wavelength radiation from the reference channel, a wavelength demultiplexing element and a modulator configured for generating corresponding modulated demultiplexed reference output signals or corresponding grouped modulated demultiplexed reference output signals to be sent to said multiplexer , and - a single detector , for detecting the multiplexed single output of the differently modulated demultiplexed radiation outputs or the differently modulated grouped demultiplexed radiation outputs and the differently modulated demultiplexed reference radiation outputs and the differently modulated grouped demultiplexed reference radiation outputs. - a divider configured to allow a propagating multi-wavelength radiation into a sensing channel and a reference channel, - a sensing region configured for allowing the propagating multi-wavelength radiation from the sensing channel to interact with a sample to be characterized in the sensing region , - a wavelength demultiplexing element arranged for capturing said multi-wavelength radiation after interaction with the sample to be characterized and for providing a plurality of wavelength demultiplexed radiation outputs or a plurality of different groups of wavelength demultiplexed radiation outputs, - a modulator for differently modulating the different demultiplexed radiation outputs or different groups of demultiplexed radiation outputs, - a multiplexer element for multiplexing the differently modulated demultiplexed radiation outputs or the differently modulated grouped demultiplexed radiation outputs into a single output, - a reference region receiving a propagating multi-wavelength radiation from the reference channel, a wavelength demultiplexing element and a modulator configured for generating corresponding modulated demultiplexed reference output signals or corresponding grouped modulated demultiplexed reference output signals to be sent to said multiplexer , and - a single detector , for detecting the multiplexed single output of the differently modulated demultiplexed radiation outputs or the differently modulated grouped demultiplexed radiation outputs and the differently modulated demultiplexed reference radiation outputs and the differently modulated grouped demultiplexed reference radiation outputs. <EOS>