Device to measure electromagnetic radiation