merit#

Functions used to evaluate the quality of CTIS inversions.

Functions

mean_chi_squared(observed, expected, uncertainty)

Compute \(\langle \chi^2 \rangle = \biggl\langle \left( \frac{O - E}{\sigma} \right)^2 \biggr \rangle\) , where \(O\) is the observed value, \(E\) is the expected value, and \(\sigma\) denotes the standard deviation of the uncertainty.

correlation_residual(observed, expected[, axis])

Compute Pearson's correlation coefficient between the expected values and the residual.