MomentGauge.Statistic.SymbolicPolynomials#

Module Contents#

Classes#

SympyGaugeTransformation

The mixin class to generate gauge transformation automatically using sympy symbolic computation.

class MomentGauge.Statistic.SymbolicPolynomials.SympyGaugeTransformation(suff_stats)#

The mixin class to generate gauge transformation automatically using sympy symbolic computation. :param suff_stats:

a list of moment functions [\(\phi_i\), i=0,cdots,N-1] in which each \(\phi_i\) is a polynomial function \(\phi_i\) ( u, \(*\) gauge_paras ) whose

Parameters:

u : float array of shape (3) - The 3D sample vector (\(u_x\), \(u_y\), \(u_z\))

\(*\) gauge_paras : - Arbitrary many extra parameters. The \(*\) refers to the unpacking operator in python.

Returns:

float – the moment value

get_gauge_transformation(suff_stats, gauge_symbols_source, gauge_symbols_target, transformation_inputs)#

Compute the gauge transformation matrix between different gauge parameters

\begin{equation} \phi_i(\mathbf{u}, \mathbf{g}' )= T_{ij}(\mathbf{g}',\mathbf{g}) \phi_j(\mathbf{u}, \mathbf{g}) \end{equation}
Parameters:
  • suff_stats (list) –

    a list of moment functions [\(\phi_i\), i=0,cdots,N-1] in which each \(\phi_i\) is a polynomial function \(\phi_i\) ( u, \(*\) gauge_paras ) whose

    Parameters:

    u : float array of shape (3) - The 3D sample vector (\(u_x\), \(u_y\), \(u_z\))

    \(*\) gauge_paras : - Arbitrary many extra parameters. The \(*\) refers to the unpacking operator in python.

    Returns:

    float – the moment value

  • gauge_symbols_source (tuple or list) –

    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.

  • gauge_symbols_target (tuple or list) –

    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.

  • transformation_inputs (tuple or list) – A tuple or list containing sympy symbols specifying the input of the matrix valued function \(T_{ij}\). For example, (a’, b’, c’, a, b, c)

Returns:

a matrix valued function \(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 \(T_{ij}\)

Return type:

function

get_gauge_paras_s_wx_1D(suff_stats, gauge_symbols, transformation_inputs)#
get_gauge_paras_sr_sx_wx_1D(suff_stats, gauge_symbols, transformation_inputs)#
conservation_projection_1D(suff_stats, gauge_symbols, transformation_inputs)#