Electromagnetic-field sensor