Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

python

plot

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) 
like image 613
Vladan Markov Avatar asked Oct 26 '25 10:10

Vladan Markov


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

like image 99
OriolAbril Avatar answered Oct 28 '25 22:10

OriolAbril



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!