-
Notifications
You must be signed in to change notification settings - Fork 13
Add functionality to set parameter constraint minium #104
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
Add functionality to set parameter constraint minium #104
Conversation
cippy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left two comments, but otherwise fine to merge if CI is fine
rabbit/fitter.py
Outdated
| idx = np.where(self.indata.systs.astype(str) == parm)[0] | ||
| if len(idx) != 1: | ||
| raise RuntimeError( | ||
| f"Expect to find exactly one match for {parm} to set constraint minimum, but found {len(len(idx))}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is len(len(idx)) a typo ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, fixed
|
|
||
| # tf tensor containing default constraint minima | ||
| theta0default = np.zeros(self.indata.nsyst) | ||
| for parm, val in options.setConstraintMinimum: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I get correctly that setConstraintMinimum sets the initial central value of the parameter (i.e. what we would consider the "pull"?). In that case the option name seems misleading, because Constraints makes me think about the width of the prior of the parameter. Maybe --setParameterMinimum or --setPrefitParameterPull ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Constraint minimum is what we usually call this. This sets the
No description provided.