bilby.core.result.make_pp_plot

bilby.core.result.make_pp_plot(results, filename=None, save=True, confidence_interval=[0.68, 0.95, 0.997], lines=None, legend_fontsize='x-small', keys=None, title=True, confidence_interval_alpha=0.1, weight_list=None, **kwargs)[source]

Make a P-P plot for a set of runs with injected signals.

Parameters:
results: list

A list of Result objects, each of these should have injected_parameters

filename: str, optional

The name of the file to save, the default is “outdir/pp.png”

save: bool, optional

Whether to save the file, default=True

confidence_interval: (float, list), optional

The confidence interval to be plotted, defaulting to 1-2-3 sigma

lines: list

If given, a list of matplotlib line formats to use, must be greater than the number of parameters.

legend_fontsize: float

The font size for the legend

keys: list

A list of keys to use, if None defaults to search_parameter_keys

title: bool

Whether to add the number of results and total p-value as a plot title

confidence_interval_alpha: float, list, optional

The transparency for the background condifence interval

weight_list: list, optional

List of the weight arrays for each set of posterior samples.

kwargs:

Additional kwargs to pass to matplotlib.pyplot.plot

Returns:
fig, pvals:

matplotlib figure and a NamedTuple with attributes combined_pvalue, pvalues, and names.