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

qt5 gui - constraints not working? (Trac #1113) #1158

Closed
RichardHeenan opened this issue Mar 30, 2019 · 5 comments
Closed

qt5 gui - constraints not working? (Trac #1113) #1158

RichardHeenan opened this issue Mar 30, 2019 · 5 comments
Assignees
Labels
Minor Small job

Comments

@RichardHeenan
Copy link
Contributor

RichardHeenan commented Mar 30, 2019

Would be nice to see how constraints work in qt5, as we might need todo similar for some of the beta approximation ideas.

In Windows-
(a) downloadable qt5 install - constraints tab appears but cannot enter any constraints. But the download may be out of date?
(b) when build own version from ess_gui branch, the constraints tab does not appear.

Migrated from http://trac.sasview.org/ticket/1113

{
    "status": "closed",
    "changetime": "2018-09-09T07:43:30",
    "_ts": "2018-09-09 07:43:30.556673+00:00",
    "description": "Would be nice to see how constraints work in qt5, as we might need todo similar for some of the beta approximation ideas.\n\nIn Windows- \n(a) downloadable qt5 install - constraints tab appears but cannot enter any constraints. But the download may be out of date?\n(b) when build own version from ess_gui branch, the constraints tab does not appear.",
    "reporter": "richardh",
    "cc": "",
    "resolution": "wontfix",
    "workpackage": "Beta Approximation Project",
    "time": "2018-07-01T20:13:39",
    "component": "SasView",
    "summary": "qt5 gui - constraints not working?",
    "priority": "minor",
    "keywords": "",
    "milestone": "SasView Next Release +1",
    "owner": "richardh",
    "type": "task"
}
@RichardHeenan
Copy link
Contributor Author

Trac update at 2018/07/01 21:55:27:

  • richardh changed _comment0 from:

Historically in sasview constraint are envisaged as linking parameters between different fit pages, thus the constraints tab wall only appear if there is more than one fit page.

Constraints within one fit page are OK, BUT in sasview they are not applied inside polydispersity integration loops. Thus if a user set shell_thickness=0.2radius, where radius is polydisperse, then shell_thickness is constant at 0.2mean_radius. It would be good to warn users if they attempt this.

Historically, the only indication on a fit page that a parameter is constrained (without looking back at the constraints tab) is that the error box for that one says "nan". This is likely because users can hit "fit" on either an individual fit page for a fit to just that data set (when the parameter is not actually constrained but freely adjusting) or hit "fit" on the constraints tab for a fit to multiple data sets.

It would be good to improve upon the clarity here, perhaps by changing the "nan" to "constrained" ??

to:

1530616188859088

  • richardh commented:

Historically in sasview constraint are envisaged as linking fitting (not fixed) parameters between different fit pages, however saasview was changed some while ago so that the constraints tab will appear if there is only a single fit page.

Constraints within one fit page are OK, BUT in sasview they are not applied inside polydispersity integration loops. Thus if a user set shell_thickness=0.2radius, where radius is polydisperse, then shell_thickness is constant at 0.2mean_radius. It would be good to warn users if they attempt this.

Users that need constraints of this type are encouraged to generate their own plugin models. However now that all polydispersity integrations are removed from the models themselves, it might be possible for sasview to allow this at some future point (i.e. to apply relevant constraints when setting up the lists of coordinates & weights for the integrations).

Historically, the only indication on a fit page that a parameter is constrained (without looking back at the constraints tab) is that the error box for that one says "nan". This is likely because users can hit "fit" on either an individual fit page for a fit to just that data set (when the parameter is not actually constrained but freely adjusting) or hit "fit" on the constraints tab for a fit to multiple data sets.

It would be good to improve upon the clarity here, perhaps by changing the "nan" to "constrained" ??

@sasview-bot
Copy link

Trac update at 2018/07/02 15:23:18: tcbennun commented:

The ESS_GUI branch version does allow the Const. Simul. Fit tab to appear by navigating to Fitting -> Constrained or Simultaneous Fit in the menu bar. However, you cannot add constraints. It appears to be simply unimplemented currently.

@sasview-bot
Copy link

Trac update at 2018/07/17 15:35:03: tcbennun commented:

I misunderstood the interface entirely. In order to create a constraint, you '''select two fit pages''' in the fit page table of the Constrained Fit tab, right-click, and in the resulting context menu click "Mutual constrain of parameters in selected models", which then brings up the constraint editor.

Clearly this is unintuitive and we need another way of bringing up the constraint editor. There are a couple of bugs to fix too:

  1. Selecting more than two fit pages and using that context menu option brings up nothing, with no explanation
  2. After creating a constraint, the 'left-hand' constrained parameter is highlighted blue in its respective parameter table, but the right-hand one(s) is/are not.
  3. Sometimes the Constraints tab won't appear in the first place, but this is inconsistent, rare and hard to reproduce.

@RichardHeenan
Copy link
Contributor Author

Trac update at 2018/07/18 16:30:52: richardh commented:

See #1176 where some improvements to constraints in QT gui are being developed.

Note that in QT unlike 4.2 constrained parameters do not have to be being fit,  and they change to non-editable blue italics to indicate that they are constrained, though some testing of all of this is likely needed. [In particular what happens if you hit "fit" on an individual FitPage.]

If a radius in S(Q) could also turn blue etc when constrained to an ER from P(Q) that would also be good!

@sasview-bot
Copy link

Trac update at 2018/09/09 07:43:30:

  • tcbennun commented:

Closing; constraint improvements are covered in #1176.

  • tcbennun changed resolution from "" to "wontfix"
  • tcbennun changed status from "new" to "closed"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Minor Small job
Projects
None yet
Development

No branches or pull requests

2 participants