A method for adapting a system for analysing a sample comprising a layer having a first interface and a second interface, the system comprising a sensor, the sensor comprising a pulsed source of terahertz radiation adapted to irradiate the sample with a pulse of terahertz radiation, said pulse a plurality of frequencies in the range from 0.01 THz to 10 THz, a detector for detecting reflected radiation, and an optical element,
- the method comprising:
- obtaining an estimate of the refractive index of the layer;
- obtaining an estimate of the thickness of the layer;
- and
- determining a f-number of the optical element such that the confocal parameter, scaled by the estimate of the refractive index, is greater than the estimate of the thickness of the layer.