-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve plotting functions #144
Labels
Comments
I suggest not using something other than a list/array for I also suggest not using dictionaries as function arguments, because that's very hard to document and use properly (Jupyter tab signature hints; type hints; ...). If you want to go down this road, I suggest to add all of them as keyword arguments. fpl.contour(
x,
y,
z,
*,
levels: Optional[Sequence[int]] = None,
n_sigma: Optional[Sequence[int]] = None,
dof: int = 2,
type: str = "chi2",
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As mentioned in issue #143,
I actually think that it might be better if
likelihood_contour_data
would not return thelevels
at all. In principle, the levels can always be changed without recomputing the contour data and this is not very clear at the moment. In addition to changing the DOF, one might also want to changen_sigma
after one has computed the plot data. The fact thatlikelihood_contour_data
has then_sigma
argument suggests that one has to recompute all the data in this case. But this is actually not necessary.One idea for
contours
would be to use thelevels
argument in two different ways:type
andn_sigma
are mandatory and the keydof
is optional. The value oftype
could then be e.g.likelihood
,chi2
,log-likelihood
.By this, we could avoid additional functions or the need to use
levels=[delta_chi2(n, dof) for n in n_sigma]
. Calling contours would just look like e.g.or
It is a bit confusing that
likelihood_contour_data
actually returns neither likelihood nor log-likelihood but chi2 values.The text was updated successfully, but these errors were encountered: