polarization_vectors¶
- marxs.math.polarization.polarization_vectors(dir_array, angles)[source] [edit on github]¶
Converts polarization angles to vectors in the direction of polarization.
Follows convention: Vector perpendicular to photon direction and closest to +y axis is angle 0 for polarization direction, unless photon direction is parallel to the y axis, in which case the vector closest to the +x axis is angle 0.
- Parameters:
- dir_arraynx4 np.array
each row is the homogeneous coordinates for a photon’s direction vector
- anglesnp.array
1D array with the polarization angles