-
Notifications
You must be signed in to change notification settings - Fork 63
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
Refactoring of Parameter
and ParameterConstraints
classes
#124
Comments
I agree that it's confusing; but But the analogy with
Yes, fully agree, |
Yes, I think this is a very good idea! One could e.g. have one "parameter collection" for each correlated set of parameters and one collection each for the uncorrelated parameters from the PDG, from FLAG, etc.. And each of these collections could be implemented exactly like a measurement and would have an inspire ID (and one could rename the key "experiment" into "collaboration" to make it apply to both measurements and parameter collections). Then one could also rename |
Parameter
and ParameterConstraints
classesParameter
and ParameterConstraints
classes
This issue is based on the discussion in PR #123:
@MJKirk:
@DavidMStraub:
I actually find the implementation with the two classes
Parameter
andParameterConstraints
a bit confusing for the user and I think it might be more intuitive if theParameter
class would be analogous toMeasurement
, i.e. if it would be itself a subclass ofConstraints
and one would completely drop theParameterConstraints
class.Even though the value of a parameter can change while its metadata stays the same and this is not true for a measurement, this different treatment of
Measurement
andParameter
could be implemented on the level of these two classes.Then one could again merge the three parameter YAML files into one file analogous to
measurements.yaml
, which I think would also be more intuitive.I think it is actually a very good idea then to use a
Constraint
class instead of the_parameters
dict and the_constraints
list. This might make it also easier to access theProbabilityDistrubution
, e.g. for plotting experimental data.Apart from this, I was also thinking about whether the functions in
falvio.measurements
andflavio.parameters
could be made class methods of theMeasurement
andParameter
classes. This might also be more intuitive since at least I always got confused by the fact that there is bothflavio.Measurement
andflavio.measurements
as well asflavio.Parameter
andflavio.parameters
.@DavidMStraub what do you think?
The text was updated successfully, but these errors were encountered: