spey.backends.default_pdf.third_moment.third_moment_expansion

spey.backends.default_pdf.third_moment.third_moment_expansion#

spey.backends.default_pdf.third_moment.third_moment_expansion(expectation_value: ndarray, covariance_matrix: ndarray, third_moment: ndarray | None = None, return_correlation_matrix: bool = False) Tuple[source]#

Construct the terms for third moment expansion. For details see [arXiv:1809.05548].

Attention

This function expects \(8\Sigma_{ii}^3 \geq (m^{(3)}_i)^2\). In case its not satisfied, NaN values will be replaced with zero.

Parameters:
  • expectation_value (np.ndarray) – expectation value of the background

  • covariance_matrix (np.ndarray) – covariance matrix

  • third_moment (np.ndarray) – Diagonal components of the third moment, \(m^{(3)}\)

  • return_correlation_matrix (bool, default False) – If true reconstructs and returns correlation matrix.

Returns:

A, B, C terms from [arXiv:1809.05548] eqns 2.9, 2.10, 2.11. if return_correlation_matrix is True it also returns correlation matrix.

Return type:

np.ndarray