Thermal expansion and index of refraction variation in barium fluoride