Open pesummary opened 3 years ago
This sounds like a good suggestion, but it might be tricky to pass the bounds of the prior into the plot method. In this example, you've hard-coded 0 and 1 as bounds, which would not apply for every parameter. Currently, the user selects which parameter to plot. I would need some way of obtaining the bounds automatically for each parameter. Is there ... a dictionary of priors ... or similar inside the PE sample files? I could access this to read out prior bounds if I can figure out how.
Yes, we store a list of bounds for all parameters in pesummary. You can see the dictionary here: https://git.ligo.org/lscsoft/pesummary/-/blob/master/pesummary/gw/plots/bounds.py#L19. This is probably the easiest way to get bounds for a given parameter :)
Got it! Thank you.
As with #1, if I generate a triangle plot with
a_1
anda_2
, I see some unwanted smoothing from the gaussian_kde. This is replicated below,To overcome this, you can pass the
kde=bounded_1d_kde, kde_kwargs={"xlow": 0., "xhigh": 1.}, kde_2d=Bounded_2d_kde, kde_2d_kwargs={"xlow": 0., "xhigh": 1., "ylow": 0., "yhigh": 1.}
kwargs. These kwargs are passed to the pesummary.core.plots.bounded_1d_kde.bounded_1d_kde and pesummary.core.plots.bounded_2d_kde.Bounded_2d_kde functions. You can see an example below,It can be expensive to compute the bounded 2d KDE and therefore is probably not practical for this app. I would advocate for using the
bounded_1d_kde
though.