Skip to content

MAINT: tweaks to prior constraints#1096

Open
mj-will wants to merge 4 commits into
bilby-dev:mainfrom
mj-will:improve-prior-constraints
Open

MAINT: tweaks to prior constraints#1096
mj-will wants to merge 4 commits into
bilby-dev:mainfrom
mj-will:improve-prior-constraints

Conversation

@mj-will
Copy link
Copy Markdown
Collaborator

@mj-will mj-will commented May 20, 2026

Some tweaks to prior contraints

  • Raise an error if a constraint is present but the parameter key is missing. Currently, it's possible to have constraints that are silently ignored, e.g. because the conversion function doesn't generate them.
  • Remove an unreachable if statement. Prior to Change probability initialization to use np.ones_like #1028, evaluate_constraints returned 1.0 if there were no valid constraints and there was a check for this where the normalization was set to 1. I've removed this for now. Alternatively we could return 1.0 if all values are true but the while should do this anyway.

@mj-will mj-will added the priors label May 20, 2026
@mj-will mj-will added this to the 3.0.0 milestone May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant