Email Record: Theory and computation of electromagnetic fields in layered media /