Opened 6 years ago

Closed 5 years ago

#1113 closed task (wontfix)

qt5 gui - constraints not working?

Reported by: richardh Owned by: richardh
Priority: minor Milestone: SasView Next Release +1
Component: SasView Keywords:
Cc: Work Package: Beta Approximation Project


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.

Change History (5)

comment:1 Changed 6 years ago by richardh

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.2*radius, where radius is polydisperse, then shell_thickness is constant at 0.2*mean_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" ??

Last edited 6 years ago by richardh (previous) (diff)

comment:2 Changed 6 years ago by tcbennun

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.

comment:3 Changed 6 years ago by tcbennun

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.

comment:4 Changed 6 years ago by richardh

See #1135 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!

comment:5 Changed 5 years ago by tcbennun

  • Resolution set to wontfix
  • Status changed from new to closed

Closing; constraint improvements are covered in #1135.

Note: See TracTickets for help on using tickets.