Dynamic temperature measurements with embedded optical sensors