Temperature measurement by extended X-ray absorption fine structure: A new theoretical development