prysm.x.polarization#
Jones and Mueller Calculus
- prysm.x.polarization.jones_rotation_matrix(theta, shape=None)#
A rotation matrix for rotating the coordinate system transverse to propagation. source: https://en.wikipedia.org/wiki/Rotation_matrix.
- Parameters:
theta (float) – angle in radians to rotate the jones matrix with respect to the x-axis.
shape (list) – shape to prepend to the jones matrix array. shape = [32,32] returns an array of shape [32,32,2,2] where the matrix is assumed to be in the last indices. Defaults to None, which returns a 2x2 array.
- Returns:
2D rotation matrix
- Return type:
numpy.ndarray
- prysm.x.polarization.linear_retarder(retardance, theta=0, shape=None)#
Generates a homogenous linear retarder jones matrix.
- Parameters:
retardance (float) – phase delay experienced by the slow state in radians.
theta (float) – angle in radians the linear retarder is rotated with respect to the x-axis. Defaults to 0.
shape (list) – shape to prepend to the jones matrix array. shape = [32,32] returns an array of shape [32,32,2,2] where the matrix is assumed to be in the last indices. Defaults to None, which returns a 2x2 array.
- Returns:
retarder – numpy array containing the retarder matrices
- Return type:
numpy.ndarray
- prysm.x.polarization.linear_diattenuator(alpha, theta=0, shape=None)#
Generates a homogenous linear diattenuator jones matrix.
- Parameters:
alpha (float) – Fraction of the light that passes through the partially transmitted channel. If 1, this is an unpolarizing plate. If 0, this is a perfect polarizer
theta (float) – angle in radians the linear retarder is rotated with respect to the x-axis. Defaults to 0.
shape (list) – shape to prepend to the jones matrix array. shape = [32,32] returns an array of shape [32,32,2,2] where the matrix is assumed to be in the last indices. Defaults to None, which returns a 2x2 array.
- Returns:
diattenuator – numpy array containing the diattenuator matrices
- Return type:
numpy.ndarray
- prysm.x.polarization.half_wave_plate(theta=0, shape=None)#
Make a half wave plate jones matrix. Just a wrapper for linear_retarder.
- Parameters:
theta (float) – angle in radians the linear retarder is rotated with respect to the x-axis. Defaults to 0.
shape (list) – shape to prepend to the jones matrix array. shape = [32,32] returns an array of shape [32,32,2,2] where the matrix is assumed to be in the last indices. Defaults to None, which returns a 2x2 array.
- Returns:
a linear retarder with half-wave retardance
- Return type:
linear_retarder
- prysm.x.polarization.quarter_wave_plate(theta=0, shape=None)#
Make a quarter wave plate jones matrix. Just a wrapper for linear_retarder.
- Parameters:
theta (float) – angle in radians the linear retarder is rotated with respect to the x-axis. Defaults to 0.
shape (list, optional) – shape to prepend to the jones matrix array. shape = [32,32] returns an array of shape [32,32,2,2] where the matrix is assumed to be in the last indices. Defaults to None, which returns a 2x2 array.
- Returns:
a linear retarder with quarter-wave retardance
- Return type:
linear_retarder
- prysm.x.polarization.linear_polarizer(theta=0, shape=None)#
Make a linear polarizer jones matrix. Just a wrapper for linear_diattenuator.
- Returns:
theta (float) – angle in radians the linear retarder is rotated with respect to the x-axis. Defaults to 0.
shape (list) – shape to prepend to the jones matrix array. shape = [32,32] returns an array of shape [32,32,2,2] where the matrix is assumed to be in the last indices. Defaults to None, which returns a 2x2 array.
- Returns:
a linear diattenuator with unit diattenuation
- Return type:
linear_diattenuator
- prysm.x.polarization.jones_to_mueller(jones)#
Construct a Mueller Matrix given a Jones Matrix. From Chipman, Lam, and Young Eq (6.99).
- Parameters:
jones (ndarray with final dimensions 2x2) – The complex-valued jones matrices to convert into mueller matrices
- Returns:
M – Mueller matrix
- Return type:
np.ndarray
- prysm.x.polarization.pauli_spin_matrix(index, shape=None)#
Generates a pauli spin matrix used for Jones matrix data reduction. From CLY Eq 6.108.
- Parameters:
index (int) – 0 - the identity matrix 1 - a linear half-wave retarder oriented horizontally 2 - a linear half-wave retarder oriented 45 degrees 3 - a circular half-wave retarder
shape (list, optional) – shape to prepend to the jones matrix array. shape = [32,32] returns an array of shape [32,32,2,2] where the matrix is assumed to be in the last indices. Default returns a 2x2 array
- Returns:
pauli spin matrix of index specified
- Return type:
jones
- prysm.x.polarization.pauli_coefficients(jones)#
Compute the pauli coefficients of a jones matrix.
- Parameters:
jones (numpy.ndarray) – complex jones matrix to decompose
- Returns:
complex coefficients of pauli matrices
- Return type:
c0,c1,c2,c3