Measurement of temperature with optical fibers