Is there a way to write the errors given in corner plots

Viewed 1747

I have made a corner plot which gives me the values of 3 parameters and their errors.

Is there a way to use these upper and lower errors which are given in corner plots and to put these values in an array or write these values in a file?

corner plot

I am searching for something like:

x = corner.quantile(parameter value) 
dx_up = corner.quantile(upper error)
dx_low = corner.quantile(lower error) 
1 Answers

Assuming you have plotted the data calling:

fig = corner.corner(samples,show_titles=True,...)

These values can be retrieved with the following code:

for i in range(2): # must be done once per variable
    q_16, q_50, q_84 = corner.quantile(samples[:,i], [0.16, 0.5, 0.84]) # your x is q_50
    dx_down, dx_up = q_50-q_16, q_84-q_50
    # save and/or print them

These will be the exact same values shown in the title (if rounded to the 2nd decimal place) because I have checked the corner.py source code for titles

Related