A method of selectively detecting the presence of an analyte vapour, the method comprising: providing at least one waveguide, the waveguide having a core comprising porous material; absorbing an analyte vapour sample into said porous material of said core such that said analyte vapour sample is held within pores of said core; waveguiding radiation along said at least one waveguide to an output to provide output radiation; measuring spectral features of said absorbed analyte vapour sample in said output radiation due to absorption of said waveguided radiation by said absorbed analyte vapour sample, wherein said measuring comprises waveguiding multiband radiation along said waveguide and measuring a spectrum of said output radiation selectively identifying the presence of a target analyte vapour in said analyte vapour sample from said spectral features; wherein an average minimum lateral dimension, measured on the surface, of the pores in said core of porous material is at least ten times smaller than a wavelength of the waveguided radiation; wherein molecular absorption spectroscopy is performed on said analyte vapour sample; and wherein the method further comprises: providing said waveguide on a substrate bearing a cladding layer and a core layer, defining the core of the waveguide, over said cladding layer, wherein the core layer is exposed, wherein both the cladding layer and the core layer are porous, and wherein the cladding layer has a higher porosity than said core layer; wherein said spectral features are enhanced by capillary condensation. providing at least one waveguide, the waveguide having a core comprising porous material; absorbing an analyte vapour sample into said porous material of said core such that said analyte vapour sample is held within pores of said core; waveguiding radiation along said at least one waveguide to an output to provide output radiation; measuring spectral features of said absorbed analyte vapour sample in said output radiation due to absorption of said waveguided radiation by said absorbed analyte vapour sample, wherein said measuring comprises waveguiding multiband radiation along said waveguide and measuring a spectrum of said output radiation selectively identifying the presence of a target analyte vapour in said analyte vapour sample from said spectral features; wherein an average minimum lateral dimension, measured on the surface, of the pores in said core of porous material is at least ten times smaller than a wavelength of the waveguided radiation; wherein molecular absorption spectroscopy is performed on said analyte vapour sample; and wherein the method further comprises: providing said waveguide on a substrate bearing a cladding layer and a core layer, defining the core of the waveguide, over said cladding layer, wherein the core layer is exposed, wherein both the cladding layer and the core layer are porous, and wherein the cladding layer has a higher porosity than said core layer; wherein said spectral features are enhanced by capillary condensation. providing said waveguide on a substrate bearing a cladding layer and a core layer, defining the core of the waveguide, over said cladding layer, wherein the core layer is exposed, wherein both the cladding layer and the core layer are porous, and wherein the cladding layer has a higher porosity than said core layer; wherein said spectral features are enhanced by capillary condensation.