Pyroelectric sensor for electromagnetic radiation