Nyquist Sampling and Degrees of Freedom of Electromagnetic Fields