Manipulate module reference#

Module providing a class to go from matrix elements squared, statistics and thermal masses to the numerical evaluation of the rate with necessary HTL resummations

exception numerical.manipulate.AutothermWarning[source]#

Empty placeholder class to be able to customize warnings occurring during numerical integration

class numerical.manipulate.NumRate(statmsqdict: dict, couplingdict: dict, masses: str | Tuple[str], deg: int)[source]#

This class maps the 2<->2 phase-space integration for a dict statmsqdict of matrix elements squared and statistics to all the coefficients \(a_i\) and \(b_i\). Its method rate() returns a function performing the two-dimensional numerical integration. In cases where IR divergences are present, HTL resummation is performed in the strict LO, subtracted and tuned schemes. In cases of matrix elements squared arising from higher-dimension operators, a C fallback routine is called for their 4D integrations if no t-channel divergence is present

Parameters:
  • statsmsqdict (dict) – uses tuples of (t1,s1,s2) statistics as keys and strings for the corresponding matrix elements squared. t1,s1 and s2 are +1 for bosons and -1 for fermions. They correspond to the statistics of the outgoing and two incoming bath particles.

  • couplingdict (dict) – is a dict with three keys. noneq is the non-equilibrium coupling, gauge are the gauge couplings (a tuple) and others all other couplings

  • masses (tuple) – is needed for IR-divergent processes. In case of a dimension-4 operator a string with the analytical expression of \(m_f^2/T^2\) is expected, with \(m_f^2\) the asymptotic mass of the fermion coupling to the non-equilibrium particle. In case of dimension 5 it is a tuple of strings containing \(m_D^2/T^2\) for each gauge boson, with \(m_D\) the Debye mass

  • deg (int) – is the degeneracy of the produced particle. The returned rate is then the production rate per degree of freedom. If this is not needed, deg can be set to 1

Examples#

Axion production in the KSVZ model

from numerical.manipulate import *
axiondict = {(1,1,1):"32*kappa^2*8*g3^6*3*(s*u/t+t*u/s+s*t/u)",\
            (-1,-1,1):"32*kappa^2*(s^2+u^2)/t*(-1/2*Nf*8*g3^6)",\
            (-1,1,-1):"32*kappa^2*(s^2+t^2)/u*(-1/2*Nf*8*g3^6)",\
            (1,-1,-1):"32*kappa^2*(u^2+t^2)/s*(1/2*Nf*8*g3^6)"}
axionclass=NumRate(axiondict, {"noneq":("kappa",),\
        "gauge": ("g3",), "others": ("Nf",)},("g3^2*(1+Nf/6)",),1)
axionclass.rate(numpy.array([1.,3.,5.]),1,(numpy.sqrt(4.*numpy.pi*0.3),3),0)
bathcouplings#

Stores the sympy symbol for the equilibrium couplings

deg#

Stores the degeneracy of the produced particle

dim#

Stores the dimension of the operator coupling the produced particle to the bath

fallback#

If True the C fallback mode is active

gaugecouplings#

Stores the sympy symbol for the gauge couplings

get_coeffs()[source]#

This method returns the symbolic form of the coefficients

get_leadlog()[source]#

This method returns the symbolic form of the leading-logarithmic part

irdiv#

If True the naive rate is IR divergent

rate(k: float | ndarray, y: float, numcouplings: Tuple[float], mode: int, intoptions: list | None = None) ndarray[source]#

This method returns the rate \(\Gamma/T^{1+2dim-8}\) as a function of an array k of \(k/T\) values, y value for the non-equilibrium coupling, a numcoupling tuple with the numerical values of the other couplings.

Parameters:
  • k (ndarray) – an array k of \(k/T\) values

  • y (float) – the non-equilibrium coupling

  • numcoupling (tuple) – the numerical values of the other couplings

  • mode (int) – sets the desired output. 0 returns everything, 1 returns the strict rate only, 2 the subtr rate only, 3 the tuned rate only. A negative value uses the C fallback routines

  • intoptions (list) – can be passed optionally as a dict or lists of dicts for the two nested integrations in \(q_+\) and \(q_-\). See the scipy documentation. The default options are {'limit':1000,'epsrel':1e-5} for both integrations.

Returns:

a list of ndarrays() with k in the first position and the requested rates according to mode

Return type:

ndarray

results#

Stores a stats, msq dict for the decomposition into the basis functions. This follows the definition given in decompose()

ynoneq#

Stores the sympy symbol for the non-equilibrium coupling

numerical.manipulate.decompose(msq: str, stats: Tuple[int], couplings: Tuple[str]) dict[source]#

Decomposes a string matrix element squared msq with statistics stats, couplings couplings into the coefficients \(a_1\), \(a_2\), \(b_1\) (and \(b_2\) for dimension 5). In the case of higher-dimensional couplings, the function returns \(a_t\) and \(b_s\), where the former contains all pieces of the original matrix element squared that feature positive powers of \(t\) at the denominator and the latter is the remainder.

stats should be a tuple (t1,s1,s2) for the statistics of the other outgoing particle t1 and the two incoming ones s1 and s2. +1 for a boson, -1 for a fermion. couplings should be a tuple of strings. Interactions of dimension different from 4 or 5 are supported only if IR finite.

Parameters:
  • msq (str) – A string for a matrix element squared

  • stats (tuple) – A tuple (t1,s1,s2) of integers

  • couplings (tuple) – A tuple of strings for the couplings

Returns:

A dict with stats as keys and a list of [a1,a2,b1], [a1,a2,b1,b2] or [at,bs] as values, depending on the dimensionality of the interaction

Return type:

dict

Examples#

from numerical.manipulate import *
decompose("kappa^2*g1**2*(s*t/u + s*u/t + t*u/s)",(1,1,1),("kappa","g1"))