Skip to content

Conversation

@davidwalter2
Copy link
Collaborator

No description provided.

Copy link
Contributor

@cippy cippy left a 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))}"
Copy link
Contributor

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 ?

Copy link
Collaborator Author

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:
Copy link
Contributor

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 ?

Copy link
Collaborator Author

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 $\theta_0$ value which appears in the Gaussian constraint term $(\theta-\theta_0)^2$, i.e. it changes the value where $\theta$ minimizes the constraint term of the likelihood.

@davidwalter2 davidwalter2 merged commit fc2efd0 into WMass:main Jan 27, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants