convert_to_stdev_nan#

agabpylib.plotting.inference.convert_to_stdev_nan(logL)#

Given a grid of log-likelihood values, convert them to cumulative standard deviations.

This is useful for drawing contours from a grid of likelihoods.

Code adapted from astroML: astroML/astroML

This version is robust to a logL input array that contains NaNs.

Parameters:

logL (float array) – Input array of log-likelihood (or log-probability) values. Can contain NaNs.

Returns:

cumprob – Array of values that represent the cumulative probability for logL.

Return type:

float array