:py:mod:`MomentGauge.Statistic.SymbolicPolynomials` =================================================== .. py:module:: MomentGauge.Statistic.SymbolicPolynomials Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: MomentGauge.Statistic.SymbolicPolynomials.SympyGaugeTransformation .. py:class:: SympyGaugeTransformation(suff_stats) The mixin class to generate gauge transformation automatically using sympy symbolic computation. :param suff_stats: a list of moment functions [:math:`\phi_i`, i=0,\cdots,N-1] in which each :math:`\phi_i` is a polynomial function :math:`\phi_i` ( **u**, :math:`*` **gauge_paras** ) whose **Parameters**: **u** : float array of shape (3) - The 3D sample vector (:math:`u_x`, :math:`u_y`, :math:`u_z`) :math:`*` **gauge_paras** : - Arbitrary many extra parameters. The :math:`*` refers to the unpacking operator in python. **Returns**: float -- the moment value :type suff_stats: list .. py:method:: get_gauge_transformation(suff_stats, gauge_symbols_source, gauge_symbols_target, transformation_inputs) Compute the gauge transformation matrix between different gauge parameters .. math:: :nowrap: \begin{equation} \phi_i(\mathbf{u}, \mathbf{g}' )= T_{ij}(\mathbf{g}',\mathbf{g}) \phi_j(\mathbf{u}, \mathbf{g}) \end{equation} :param suff_stats: a list of moment functions [:math:`\phi_i`, i=0,\cdots,N-1] in which each :math:`\phi_i` is a polynomial function :math:`\phi_i` ( **u**, :math:`*` **gauge_paras** ) whose **Parameters**: **u** : float array of shape (3) - The 3D sample vector (:math:`u_x`, :math:`u_y`, :math:`u_z`) :math:`*` **gauge_paras** : - Arbitrary many extra parameters. The :math:`*` refers to the unpacking operator in python. **Returns**: float -- the moment value :type suff_stats: list :param gauge_symbols_source: A tuple or list containing sympy symbols of **gauge_paras** before transformation. These symbols must match the input of functions in **suff_stats**. For example, suppose functions in **suff_stats** takes input ( **u**, (**a**, **b**, **c**) ), the **gauge_symbols_source** should be a nested tuple ( (**a**, **b**, **c**), ), in which **a**, **b**, and **c** are sympy symbols. Alternatively, suppose functions in **suff_stats** takes input ( **u**, **a**, **b**, **c** ), the **gauge_symbols_source** should be a tuple (**a**, **b**, **c**), in which **a**, **b**, and **c** are sympy symbols. :type gauge_symbols_source: tuple or list :param gauge_symbols_target: A tuple or list containing sympy symbols of **gauge_paras** after transformation. These symbols must match the input of functions in **suff_stats**. For example, suppose functions in **suff_stats** takes input ( **u**, (**a**, **b**, **c**) ), the **gauge_symbols_source** should be a nested tuple ( (**a'**, **b'**, **c'**), ), in which **a'**, **b'**, and **c'** are sympy symbols. Alternatively, suppose functions in **suff_stats** takes input ( **u**, **a**, **b**, **c** ), the **gauge_symbols_source** should be a tuple (**a'**, **b'**, **c'**), in which **a'**, **b'**, and **c'** are sympy symbols. :type gauge_symbols_target: tuple or list :param transformation_inputs: A tuple or list containing sympy symbols specifying the input of the matrix valued function :math:`T_{ij}`. For example, (**a'**, **b'**, **c'**, **a**, **b**, **c**) :type transformation_inputs: tuple or list :returns: a matrix valued function :math:`T_{ij}` whose **Parameters**: **inputs** : float array of shape (len(**transformation_inputs**)) - The array containing values of symbols specified in **transformation_inputs**. **Returns**: float array of shape (N,N) -- the matrix :math:`T_{ij}` :rtype: function .. py:method:: get_gauge_paras_s_wx_1D(suff_stats, gauge_symbols, transformation_inputs) .. py:method:: get_gauge_paras_sr_sx_wx_1D(suff_stats, gauge_symbols, transformation_inputs) .. py:method:: conservation_projection_1D(suff_stats, gauge_symbols, transformation_inputs)