A method comprising: directing an incoming electromagnetic wave on a device (200"); wherein the device comprises: a first part (101") comprising a first material having a first refractive index n1, wherein the first material is a liquid; a second part comprising a second material having a second refractive index n2 higher than n1, wherein the first part is disposed inside a container formed by the second part; at least one contact area (110") between the first part and the second part, wherein the at least one contact area radiates the outgoing electromagnetic wave when the device is illuminated by an incoming electromagnetic wave, wherein the at least one contact area extends along a direction of propagation of the incoming electromagnetic wave and has a non-vanishing height (h) along said direction lower than 1.2 times a critical height (hc) equal to a wavelength in vacuum of the incoming electromagnetic wave divided by the difference between the second refractive index n2 and the first refractive index n1; measuring at least one characteristic of the outgoing electromagnetic wave; and estimating the first refractive index n1 based on the at least one characteristic. directing an incoming electromagnetic wave on a device (200"); wherein the device comprises: a first part (101") comprising a first material having a first refractive index n1, wherein the first material is a liquid; a second part comprising a second material having a second refractive index n2 higher than n1, wherein the first part is disposed inside a container formed by the second part; at least one contact area (110") between the first part and the second part, wherein the at least one contact area radiates the outgoing electromagnetic wave when the device is illuminated by an incoming electromagnetic wave, wherein the at least one contact area extends along a direction of propagation of the incoming electromagnetic wave and has a non-vanishing height (h) along said direction lower than 1.2 times a critical height (hc) equal to a wavelength in vacuum of the incoming electromagnetic wave divided by the difference between the second refractive index n2 and the first refractive index n1; a first part (101") comprising a first material having a first refractive index n1, wherein the first material is a liquid; a second part comprising a second material having a second refractive index n2 higher than n1, wherein the first part is disposed inside a container formed by the second part; at least one contact area (110") between the first part and the second part, wherein the at least one contact area radiates the outgoing electromagnetic wave when the device is illuminated by an incoming electromagnetic wave, wherein the at least one contact area extends along a direction of propagation of the incoming electromagnetic wave and has a non-vanishing height (h) along said direction lower than 1.2 times a critical height (hc) equal to a wavelength in vacuum of the incoming electromagnetic wave divided by the difference between the second refractive index n2 and the first refractive index n1; measuring at least one characteristic of the outgoing electromagnetic wave; and estimating the first refractive index n1 based on the at least one characteristic.