Diffraction analysis for periodic nano-scale apertures, scatterers and absorbers