Diffraction method measures refractive indices of liquids