A device, comprising: an input port adapted to receive an input microwave or RF signal; a laser adapted to produce a continuous-wave laser beam; a first optical path adapted to receive a first portion of the laser beam without optical modulation; a second optical path adapted to receive a second portion of the laser beam, the second optical path comprising: an optical modulator adapted to modulate the second portion in response to the input microwave or RF signal to produce a modulated optical beam that carries the spectral components in the input microwave or RF signal, and a tunable optical filter adapted to filter the modulated optical beam to select at least one spectral component in the input microwave or RF signal while rejecting other spectral components and to output a filtered modulated optical beam that carries the at least one selected spectral component, the tunable optical filter comprising two optical resonators (310, 320; 510, 520; 710, 720; 810, 820) that are optically coupled to produce a filter function of at least a second order; a tuning control unit adapted to tune at least one of the two optical resonators to change a frequency of the at least one selected spectral component; and an optical detector adapted to combine the first portion from the first optical path and the filtered modulated optical beam from the second optical path and to produce a filtered output signal comprising the at least one selected spectral component. an input port adapted to receive an input microwave or RF signal; a laser adapted to produce a continuous-wave laser beam; a first optical path adapted to receive a first portion of the laser beam without optical modulation; a second optical path adapted to receive a second portion of the laser beam, the second optical path comprising: an optical modulator adapted to modulate the second portion in response to the input microwave or RF signal to produce a modulated optical beam that carries the spectral components in the input microwave or RF signal, and a tunable optical filter adapted to filter the modulated optical beam to select at least one spectral component in the input microwave or RF signal while rejecting other spectral components and to output a filtered modulated optical beam that carries the at least one selected spectral component, the tunable optical filter comprising two optical resonators (310, 320; 510, 520; 710, 720; 810, 820) that are optically coupled to produce a filter function of at least a second order; a tuning control unit adapted to tune at least one of the two optical resonators to change a frequency of the at least one selected spectral component; and an optical detector adapted to combine the first portion from the first optical path and the filtered modulated optical beam from the second optical path and to produce a filtered output signal comprising the at least one selected spectral component. an optical modulator adapted to modulate the second portion in response to the input microwave or RF signal to produce a modulated optical beam that carries the spectral components in the input microwave or RF signal, and a tunable optical filter adapted to filter the modulated optical beam to select at least one spectral component in the input microwave or RF signal while rejecting other spectral components and to output a filtered modulated optical beam that carries the at least one selected spectral component, the tunable optical filter comprising two optical resonators (310, 320; 510, 520; 710, 720; 810, 820) that are optically coupled to produce a filter function of at least a second order; a tuning control unit adapted to tune at least one of the two optical resonators to change a frequency of the at least one selected spectral component; and an optical detector adapted to combine the first portion from the first optical path and the filtered modulated optical beam from the second optical path and to produce a filtered output signal comprising the at least one selected spectral component.