Measurement of refractive index change with temperature using thermal self-phase modulation