yasfpy.mueller ============== .. py:module:: yasfpy.mueller .. autoapi-nested-parse:: Jones/Mueller matrix utilities. This module contains helpers to convert between polarization representations, including Jones and Mueller matrices. Attributes ---------- .. autoapisummary:: yasfpy.mueller.nb Functions --------- .. autoapisummary:: yasfpy.mueller.jones_to_mueller yasfpy.mueller.jones_to_mueller_numba Module Contents --------------- .. py:data:: nb :value: None .. py:function:: jones_to_mueller(jones) Convert a Jones matrix to a Mueller matrix. :param jones: Complex Jones matrix with shape `(..., 2, 2)`. :returns: Real Mueller matrix with shape `(..., 4, 4)`, using Stokes order (I,Q,U,V). :rtype: np.ndarray .. rubric:: Notes Uses the Pauli-matrix trace identity: M_ij = 0.5 * Re( Tr( σ_i J σ_j J† ) ) where σ_i are (I, Q, U, V) Pauli matrices. .. py:function:: jones_to_mueller_numba(jones) Convert a Jones matrix to a Mueller matrix (Numba-accelerated). This is a drop-in replacement for `jones_to_mueller`, but much faster for large batches. :param jones: Complex Jones matrix with shape `(..., 2, 2)`. :returns: Real Mueller matrix with shape `(..., 4, 4)`, using Stokes order (I,Q,U,V). :rtype: np.ndarray