Saturday, January 20, 2007

What is your wavelength?

"One small step for man, one giant leap for mankind."
--Neil Armstrong

"One small bug for programmer, one giant error for results."

After getting unexpected results from my c/c++ pseudo-generalized implementation of Richard's and Wolf's vector diffraction integral (Electromagnetic diffraction in optical systems II), I finally found out what causes the problem (although I still don't know exactly why).
With my work with a spatial light modulator (SLM), I consider that each square SLM pixel has a side of 2mm/768. Then I scale the wavelength to pixel units, so 1 wavelength = 0.02433846153846153846 pixels.

I tried it for different numerical apertures and topological charges. The numerical aperture had to be too small (.0001) before getting expected far field results. Usual values (0.1 order of magnitude) result in what looks like symmetric noisy data. But the results resemble that of Richards and Wolf's when I blow up the image to sub pixel dimensions, thus I thought it was just brought about by simplifications (neglecting the lens's phase contribution, putting the object field at the lens,etc...).

As it turns out, the wavelength assumed seems to be small with respect to the pixels. I learned from FDTD simulations that the discretization of space voxels should be at most 1/10 of the wavelength (1/20 recommended). This avoids the error caused by truncating higher order terms when numerically differentiating with Maxwell's equations. I didn't expect that to be the case for diffraction integrals too. Thus I set 1 wavelength = 20 pixels.

So far it works.

(a) (b)
(c) (d)

Figure 1. Calculated electric fields for an aperture radius of 32 in the center of a 128x128 computational array. Shown are the resulting image field intensities for different topological charges of the object field (1 for a and c, 0 for b and d) and numerical apertures of the lens (0.1 for a and b, 0.999 for c and d).
The modulus of the Ex Ey and Ez components are encoded to the Red Green and Blue channels respectively. It can be seen that the fields are predominantly linearly polarized along the x-axis for low NA values.

No comments: