API/Reference

Mueller.hwpFunction
hwp([T=Float64], θ=0)

A half-wave plate (HWP) with fast axis oriented at angle θ, in radians.

Examples

julia> M = hwp()
4×4 StaticArrays.SMatrix{4, 4, Float64, 16} with indices SOneTo(4)×SOneTo(4):
 1.0   0.0   0.0           0.0
 0.0   1.0   0.0           0.0
 0.0   0.0  -1.0          -1.22465e-16
 0.0  -0.0   1.22465e-16  -1.0

julia> S = [1, 1, 0, 0]; # I, Q, U, V

julia> M * S # allow +Q through unchanged
4-element StaticArrays.SVector{4, Float64} with indices SOneTo(4):
 1.0
 1.0
 0.0
 0.0

julia> rotate(M, π/8) * S # switch +Q to +U
4-element StaticArrays.SVector{4, Float64} with indices SOneTo(4):
  1.0
  1.9967346175427393e-16
  1.0
 -8.659560562354932e-17

See also

waveplate, qwp

source
Mueller.linear_polarizerFunction
linear_polarizer([T=Float64], θ=0; p=1)

A linear polarizer with the throughput axis given by θ, in radians, by default horizontal. The partial polarization can be given with the p keyword argument, which changes the intensity by a factor of p^2/2.

Examples

julia> M = linear_polarizer()
4×4 StaticArrays.SMatrix{4, 4, Float64, 16} with indices SOneTo(4)×SOneTo(4):
 0.5  0.5  0.0  0.0
 0.5  0.5  0.0  0.0
 0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0

julia> S = [1, 0, 0, 0]; # I, Q, U, V

julia> M * S # only horizontal component (+Q) remains
4-element StaticArrays.SVector{4, Float64} with indices SOneTo(4):
 0.5
 0.5
 0.0
 0.0
source
Mueller.mirrorFunction
mirror([T=Float64], r=1, δ=π, θ=0)

A reflective mirror with reflectance r, oriented at angle θ, in radians, compared to the reference frame of the light, and with phase shift δ. An ideal mirror will have perfect reflectance and a 180° phase shift.

Examples

julia> M = mirror()
4×4 StaticArrays.SMatrix{4, 4, Float64, 16} with indices SOneTo(4)×SOneTo(4):
 1.0  0.0   0.0           0.0
 0.0  1.0   0.0          -0.0
 0.0  0.0  -1.0           1.22465e-16
 0.0  0.0  -1.22465e-16  -1.0

julia> S = [1, 1, 0, 0]; # I, Q, U, V

julia> M * S # no change
4-element StaticArrays.SVector{4, Float64} with indices SOneTo(4):
 1.0
 1.0
 0.0
 0.0

julia> mirror(1, π, π/4) * S # rotates polarized light
4-element StaticArrays.SVector{4, Float64} with indices SOneTo(4):
  1.0
 -1.0
  1.2246467991473532e-16
  1.2246467991473532e-16
source
Mueller.polellipseFunction
polellipse(S)
polellipse!(S)

Plot the polarizatio ellipse for the given Stokes parameters. The polarization ellipse draws the path of the eletric field over one wavelength. The input vector should be a Stokes vector [I, Q, U, V]. This is a user recipe and can be composed with other plot recipes.

source
Mueller.qwpFunction
qwp([T=Float64], θ=0)

A quarter-wave plate (QWP) with fast axis oriented at angle θ, in radians.

Examples

julia> M = qwp()
4×4 StaticArrays.SMatrix{4, 4, Float64, 16} with indices SOneTo(4)×SOneTo(4):
 1.0   0.0  0.0           0.0
 0.0   1.0  0.0           0.0
 0.0   0.0  6.12323e-17  -1.0
 0.0  -0.0  1.0           6.12323e-17

julia> S = [1, 1, 0, 0]; # I, Q, U, V

julia> M * S # allow +Q through unchanged
4-element StaticArrays.SVector{4, Float64} with indices SOneTo(4):
 1.0
 1.0
 0.0
 0.0

julia> qwp(-π/4) * S # switch +Q to +V
4-element StaticArrays.SVector{4, Float64} with indices SOneTo(4):
  1.0
  6.123233995736766e-17
 -6.123233995736765e-17
  1.0

See also

waveplate, hwp

source
Mueller.rotateMethod
rotate(M, θ)

Rotates the component represented by the Mueller matrix M counter-clockwise by angle θ (in radians).

Examples

julia> M = linear_polarizer();

julia> Mr = rotate(M, π/2);

julia> Mr ≈ linear_polarizer(π/2)
true

See also

Mueller.rotation

source
Mueller.rotationMethod
rotation([T=Float64], θ)

Generate a rotation matrix with the given angle, in radians, θ. This can be used to rotate the axes of polarization components arbitrarily. For convenience, the rotate method will rotate a component, without having to generate this matrix, itself.

Examples

Rotate a linear polarizer by 90 degrees counter-clockwise

julia> M = linear_polarizer();

julia> r = rotation(π/4);

julia> Mr = r' * M * r;

julia> Mr ≈ linear_polarizer(π/4)
true

See also

rotate

source
Mueller.waveplateFunction
waveplate([T=Float64], δ=0, θ=0)

A generic phase retarder (waveplate) with fast axis aligned with angle θ, in radians, and phase delay of δ, in radians, along the slow axis.

Examples

julia> M = waveplate(π);

julia> M ≈ hwp()
true

julia> M = waveplate(π/2, π/4);

julia> M ≈ qwp(π/4)
true

See also

hwp, qwp, mirror

source