Temperature-independent refractive index measurement based on