In this article, we describe two examples of how to use the pupil (aperture) function option available in the Gaussian beam source. In the first example, we define a half-circle aperture using a scalar pupil function while in the second one we create beams with radial and azimuthal polarizations using a vectorial pupil function.
The associated files script files show how to construct and apply a pupil (aperture) function to a Gaussian beam source with the thin lens option:
- The pupil function is defined in direction cosine space by constructing a mesh grid for ux and uy within the maximum beam numerical aperture (NA). Note that it is not necessary to cover the entire k-space up to NA=1, as the maximum NA used will be the maximum NA where the pupil function is not zero.
- The scripts import the matrix datasets with the pupil function directly in the Gaussian beam source. These datasets are also saved in MATLAB files that can be imported into the source using the "load pupil function" button in the "Beam options" tab of the source settings.
Open pupil_function_beam.fsp and run the script files. After setting up and applying the pupil function, the associated scripts will run the simulations and plot the fields recorded by a monitor in front of the source. The normalized reflected power measured by a monitor behind the source is of the order of 1e-6, indicating that there are very small injection errors.
Near-field and far-field fields for x-polarized beam with a half-circle aperture, incident at theta and phi angles of 20 and 30 degrees, respectively.
Near-field and far-field fields for radially-polarized beam with circular aperture at normal incidence. Only the radial component of the near field is shown here; as expected, the azimuthal component is negligible.