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

QT GUI - cannot fit any S(Q) params if using P(Q)S(Q) model (Trac #1130) #1171

Closed
sasview-bot opened this issue Mar 30, 2019 · 3 comments
Closed
Labels
Critical High priority Defect Bug or undesirable behaviour
Milestone

Comments

@sasview-bot
Copy link

sasview-bot commented Mar 30, 2019

''I'm importing this from the ESS JIRA because it's quite a big one and might involve conversation about the behaviour of radius_effective in terms of fitting.''


'''SASVIEW-960'''
Reporter: Torin Cooper-Bennun
Created: 13 July 2018 15:06

When both a P(Q) and S(Q) model are selected in the fitting GUI, the parameter table includes all parameters from P(Q) and S(Q).

However, if any S(Q) parameters are checked and the user clicks Fit, the following error occurs (bizarrely, only appearing in the status bar – I had to add a line to also log it):

Setting model parameters failed with: parameter charge not available in model M1; use one of [scale, background, radius_equat_core, x_core, thick_shell, x_polar_shell, sld_core, M0:sld_core, mtheta:sld_core, mphi:sld_core, sld_shell, M0:sld_shell, mtheta:sld_shell, mphi:sld_shell, sld_solvent, M0:sld_solvent, mtheta:sld_solvent, mphi:sld_solvent, theta, phi, up:frac_i, up:frac_f, up:angle, radius_equat_core.npts, radius_equat_core.nsigmas, radius_equat_core.width, x_core.npts, x_core.nsigmas, x_core.width, thick_shell.npts, thick_shell.nsigmas, thick_shell.width, x_polar_shell.npts, x_polar_shell.nsigmas, x_polar_shell.width, theta.npts, theta.nsigmas, theta.width, phi.npts, phi.nsigmas, phi.width] instead

where it is listing P(Q) parameters only.

It seems that in FittingWidget, the S(Q) parameters never make it into the self.kernel_module.params dict, and this causes the exception to be raised in AbstractFitEngine.py:431. This conflicts with the fact that parameters are listed in the GUI based on the P(Q) and S(Q) models separately, with nothing to do with self.kernel_module.


'''''N.B.:'''''

In !SasView 4.1, you can fit ''almost'' all S(Q) parameters, but not radius_effective, since it introduces confusion; in mixture models it can be unclear exactly which parameter is meant (this is a ticket for another day, and also falls under the beta approximation project). In 4.1, sas.sascalc.fit.MultiplicationModel contains logic to exclude radius_effective, but this code is effectively unused in 5.0, as it stands.

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

{
    "status": "closed",
    "changetime": "2018-08-02T10:27:08",
    "_ts": "2018-08-02 10:27:08.827664+00:00",
    "description": "''I'm importing this from the ESS JIRA because it's quite a big one and might involve conversation about the behaviour of radius_effective in terms of fitting.''\n\n----\n\n'''SASVIEW-960'''\nReporter: Torin Cooper-Bennun\nCreated: 13 July 2018 15:06\n\nWhen both a P(Q) and S(Q) model are selected in the fitting GUI, the parameter table includes all parameters from P(Q) and S(Q).\n\nHowever, if any S(Q) parameters are checked and the user clicks Fit, the following error occurs (bizarrely, only appearing in the status bar \u2013 I had to add a line to also log it):\n\n{{{\nSetting model parameters failed with: parameter charge not available in model M1; use one of [scale, background, radius_equat_core, x_core, thick_shell, x_polar_shell, sld_core, M0:sld_core, mtheta:sld_core, mphi:sld_core, sld_shell, M0:sld_shell, mtheta:sld_shell, mphi:sld_shell, sld_solvent, M0:sld_solvent, mtheta:sld_solvent, mphi:sld_solvent, theta, phi, up:frac_i, up:frac_f, up:angle, radius_equat_core.npts, radius_equat_core.nsigmas, radius_equat_core.width, x_core.npts, x_core.nsigmas, x_core.width, thick_shell.npts, thick_shell.nsigmas, thick_shell.width, x_polar_shell.npts, x_polar_shell.nsigmas, x_polar_shell.width, theta.npts, theta.nsigmas, theta.width, phi.npts, phi.nsigmas, phi.width] instead\n}}}\nwhere it is listing P(Q) parameters only.\n\nIt seems that in `FittingWidget`, the S(Q) parameters never make it into the  `self.kernel_module.params` dict, and this causes the exception to be raised in `AbstractFitEngine.py:431`. This conflicts with the fact that parameters are listed in the GUI based on the P(Q) and S(Q) models separately, with nothing to do with `self.kernel_module`.\n\n----\n'''''N.B.:'''''\n\nIn !SasView 4.1, you can fit ''almost'' all S(Q) parameters, but not `radius_effective`, since it introduces confusion; in mixture models it can be unclear exactly which parameter is meant (this is a ticket for another day, and also falls under the beta approximation project). In 4.1, `sas.sascalc.fit.MultiplicationModel` contains logic to exclude `radius_effective`, but this code is effectively unused in 5.0, as it stands.",
    "reporter": "tcbennun",
    "cc": "richardh",
    "resolution": "fixed",
    "workpackage": "Beta Approximation Project",
    "time": "2018-07-13T14:13:39",
    "component": "SasView",
    "summary": "QT GUI - cannot fit any S(Q) params if using P(Q)S(Q) model",
    "priority": "critical",
    "keywords": "",
    "milestone": "SasView 5.0.0",
    "owner": "",
    "type": "defect"
}
@sasview-bot sasview-bot added this to the SasView 5.0.0 milestone Mar 30, 2019
@sasview-bot sasview-bot added Beta Approximation Project Critical High priority Defect Bug or undesirable behaviour and removed Incomplete Migration labels Mar 30, 2019
@butlerpd
Copy link
Member

Trac update at 2018/07/20 23:52:13: butler changed milestone from "SasView 4.2.0" to "SasView 5.0.0"

@sasview-bot
Copy link
Author

Trac update at 2018/08/02 10:26:38: tcbennun commented:

Fixed in branch ESS_GUI as a result of fixing '''SASVIEW-971: Constraining an S(Q) param to its current value crashes the app'''. See discussion at the pull request: #163

@sasview-bot
Copy link
Author

Trac update at 2018/08/02 10:27:08:

  • tcbennun changed resolution from "" to "fixed"
  • 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
Critical High priority Defect Bug or undesirable behaviour
Projects
None yet
Development

No branches or pull requests

2 participants