Self-referenced technology for refractive index measurement under mechanical vibration and temperature fluctuation.