-
Notifications
You must be signed in to change notification settings - Fork 41
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
Cyclic constraints inconsistent #3125
Comments
Initially I could not reproduce this, but after reading more carefully the mails from Ilona I could reproduce it and I think that I understand what is happening. I think that this is more a misunderstanding on her part, and I don't consider that there is a real bug here. This is what I think is happening:
I guess we could store the previous definition, then delete it from the active constraints, check the new definition and, if correct, use it to replace the previous one and, if not, recuperate the previous one. But is it worthy to add so much complication? Personally, I would say no. |
Ahh, thanks @gonzalezma . |
So, just to summarise, I think this means: BUG 1: Should be addressed and the word Warning added to the popup (else it looks like an error and confuses the User). Anyone disagree? |
Isn't the cyclic pop-up and error rather than a warning? In other words it should not be able to actually fit properly right? Or did I misunderstand? cause if it doesn't matter why worry the user with a pop up at all? I agree that bug 2 is not a bug. In principle the two parameters are independent so it should work even if it will get confusing and quickly lead to real cyclical problems if they continue doing that? So I would generally recommend not doing that I guess? Are you asking about whether that should be added to the tutorial? |
@Butler wrote:
Well, @gonzalezma describes the behaviour as "no real reason for this, ... But it is not wrong either" which doesn't ooze Error to me? However, your second question, why worry the user at all, is perhaps the more pertinent!
No. And as mentioned in #3125 (comment), the wording that led Ilona down this rabbit hole has been changed in the latest versions anyhow. So close this issue with no action, or make the popup a warning first? |
The cycling error was added to avoid having the following situation (e.g. with just 2 parameters A and B): I think this was giving an error because there is no "free" parameter to fit any more (but I may be wrong here, so it would be good to check with PK). So at the time, Nico (I think) implemented two features:
So I would say that what to do depends on how bumps will handle the cyclic constraint. If it is able to understand the double definition (A=B + B=A) and do the expected thing (do the fit with a single common parameter for A and B), we could remove the check for the cycling error and ignore the redundancy in the user's definition. If not, we still need it. As for Ilona's case, the problem is not that she used A=B or B=A, which both are equivalent, but that in the moment of checking the edited constraint we have both "in memory". But of course she could not know this and I understand that the observed behaviour can be very confusing. But only if PK confirms that bumps will handle this situation correctly, we should remove the cycling error. |
Describe the bug
User IlonaS was trying to simultaneously fit two datasets in 5.0.6 to core_shell models with the following constraints:
M2.radius = M1.radius
M1.thickness = M2.thickness
This threw the following popup:
which seems reasonable.
BUG 1: This popup should declare whether it is an Error or a Warning.
Fearing the worst, the User started playing around to see if they could avoid the popup and found they could by setting these constraints instead:
M1.thickness = M2.thickness
M2.radius = M1.radius
BUG 2: This did not throw the popup!
Surely, if the first set of constraints are cyclic, the second set must be too???
SUPPLEMENTARY QUESTION: Are cyclic constraints 'bad' (and to be avoided, meaning the popup is an Error) or just 'not recommended' (meaning the popup is a Warning)?
To Reproduce
Run SasView.
Load 2 of the AOT test datsets and send them to fitting
Set both FitPages to core_shell models
Go in to the Constrained/Simultaneous Fit page and try setting the constraints above
Expected behavior
The popup should declare whether it is an error or warning.
The popup should appear for all instances of cyclic constraints.
SasView version (please complete the following information):
Operating system (please complete the following information):
The text was updated successfully, but these errors were encountered: