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

Constraints mapping bug #2155

Merged
merged 4 commits into from
Jul 20, 2022
Merged

Constraints mapping bug #2155

merged 4 commits into from
Jul 20, 2022

Conversation

dagewa
Copy link
Member

@dagewa dagewa commented Jun 28, 2022

Fixes an issue in which models which are shared by many experiments (such as detector models in serial crystallography) were being identified by id being set to the index in the list of those models, not the index of the experiment list.

For a concrete example using data shared by @nksauter this had the effect that that this .phil snippet:

      constraints {
        id = 1, 5000
        parameter=Dist
      }

attempted to apply constraints to the 2nd and 5001st detector, not the first and second detectors, picked out by experiments with id == 1 and id == 5000.

dagewa and others added 3 commits June 28, 2022 10:50
The index of the experiment id was being used, not the index of
the model. So, if id=5000 is an experiment using the second
detector, the previous behaviour tried to apply constraints to
the 5001st detector 5001, not the 2nd detector.
Previously, constraint scopes created for parameterisations that
were removed due to having too few reflections would cause a
crash. Now this elicits a warning and a None constraint, which
is later removed from the manager.

In addition, the ability to constrain scan-varying parameterisations
was removed as this was untested and apparently buggy.
@dagewa
Copy link
Member Author

dagewa commented Jul 20, 2022

I'm confident this bug fix is correct, so merging now.

@dagewa dagewa merged commit 178236f into main Jul 20, 2022
@dagewa dagewa deleted the contraints-bug branch July 20, 2022 15:26
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.

None yet

2 participants