Skip to content

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

@sasview-bot

Description

@sasview-bot

''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"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    CriticalHigh priorityDefectBug or undesirable behaviour

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions