Optical characterization of thin films by guided waves