Skip to content
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

Make config files more readable #13

Closed
hammannr opened this issue Jun 16, 2023 · 1 comment · Fixed by #19
Closed

Make config files more readable #13

hammannr opened this issue Jun 16, 2023 · 1 comment · Fixed by #19
Assignees

Comments

@hammannr
Copy link
Collaborator

In binference, the definition of a parameter in the config was distributed over the entire file and it was easy to lose the overview.
I'd suggest using a structure like the following to increase the readability of parameter initialization in alea:

parameter_definition = {
    wimp_mass: {
        nominal_value: 50,
        fixed: True,  # or use floating instead?
    },
    livetime_0: {
        nominal_value: 1.,
        fixed: True,
    },
    livetime_1: {
        nominal_value: 1.,
        fixed: True,
    },
    signal_rate_multiplier: {
        nominal_value: 1.,
        type: "rate",  # or fix all of this internally in the likelihood i.e. inspect from parameter name what the parameter does.
        fixed: False,
    },
    er_rate_multiplier: {
        nominal_value: 1.,
        type: "rate",
        uncertainty: .2,
        relative_uncertainty: True,
        fixed: False,
    },
    par1: {
        nominal_value: 0,
        type: "shape",
        uncertainty: $some_expression_to_define_a_constraint,  # we could allow any scipy and np expression e.g.
        relative_uncertainty: False,
        fixed: False,
    },
}
@hammannr
Copy link
Collaborator Author

After discussion with @kdund : Probably more meaningful to define a boolean fittable instead of fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant