This module provides functions to compute cumulants of discrete functions. Additionally functions are provided to compute cumulants from moments and vice versa

discrete_cumulant(func, cumulant, stencil)

Computes cumulant of discrete function.

  • func – sequence of function components, has to have the same length as stencil

  • cumulant – definition of cumulant, either as an index tuple, or as a polynomial (similar to moment description)

  • stencil – sequence of directions

cumulants_from_pdfs(stencil, cumulant_indices=None, pdf_symbols=None)

Transformation of pdfs (or other discrete function on a stencil) to cumulant space.

  • stencil – stencil object

  • cumulant_indices – sequence of cumulant indices, could be tuples or polynomial representation if left to default and a full stencil was passed, the full set i.e. moments_up_to_component_order with ‘order=2’ is used

  • pdf_symbols – symbolic values for pdf values, if not passed they default to \(f_0, f_1, ...\)


dict mapping cumulant index to expression

cumulant_as_function_of_raw_moments(index, moments_dict=None)

Returns an expression for the cumulant of given index as a function of raw moments.

  • index – a tuple of same length as spatial dimensions, specifying the cumulant

  • moments_dict – a dictionary that maps moment indices to symbols/values. These values are used for the moments in the returned expression. If this parameter is None, default symbols are used.

raw_moment_as_function_of_cumulants(index, cumulants_dict=None)

Inverse transformation of cumulant_as_function_of_raw_moments().

cumulant_as_function_of_central_moments(index, moments_dict=None)

Same as cumulant_as_function_of_raw_moments() but with central instead of raw moments.

central_moment_as_function_of_cumulants(index, cumulants_dict=None)

Same as raw_moment_as_function_of_cumulants() but with central instead of raw moments.