New method enables real-time monitoring of materials during irradiation