beams#
Functions related to beam profiles to be used as sources.
Copyright (c) Meta Platforms, Inc. and affiliates.
- fmmax.beams.shifted_rotated_fields(field_fn: Callable[[Array, Array, Array], Tuple[Tuple[Array, Array, Array], Tuple[Array, Array, Array]]], x: Array, y: Array, z: Array, beam_origin_x: Array, beam_origin_y: Array, beam_origin_z: Array, polar_angle: Array, azimuthal_angle: Array, polarization_angle: Array) Tuple[Tuple[Array, Array, Array], Tuple[Array, Array, Array]] [source]#
Computes the fields on a rotated coordinate system.
Given fields_fn(xf, yf, zf) -> (exf, eyf, ezf), (hxf, hyf, hzf) which returns the fields in the field coordinate system, returns the fields at coordinates (x, y, z), which are rotated from (xf, yf, zf), by the specified polar_angle, azimuthal_angle, and polarization_angle.
A beam propagating in the zf direction, polarized in the xf direction will be propagating in the direction specified by polar_angle and azimuthal_angle, with polarization rotated about the propagation direction by polarization_angle.
- Parameters:
field_fn – Function which returns the fields in the field coordinate system. The fields should be for a beam propagating in the zf direction, i.e. in the z-direction of the beam coordinate system.
x – x-coordinates of the desired output fields.
y – y-coordinates of the desired output fields.
z – z-coordinates of the desired output fields.
beam_origin_x – The x-origin of the beam coordinate system in the (x, y, z) unit system.
beam_origin_y – The y-origin of the beam coordinate system.
beam_origin_z – The z-origin of the beam coordinate system.
polar_angle – The rotation angle about the y-axis.
azimuthal_angle – The rotation angle about the z-axis.
polarization_angle – The rotation angle about the propagation axis.
- Returns:
The fields ((ex, ey, ez), (hx, hy, hz)) at the specified coordinates.