Oxygen isotope cosmothermometer