Opened 5 months ago

Closed 5 months ago

#1130 closed defect (fixed)

QT GUI - cannot fit any S(Q) params if using P(Q)S(Q) model

Reported by: tcbennun Owned by:
Priority: critical Milestone: SasView 5.0.0
Component: SasView Keywords:
Cc: richardh Work Package: Beta Approximation Project

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.


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.

Change History (3)

comment:1 Changed 5 months ago by butler

  • Milestone changed from SasView 4.2.0 to SasView 5.0.0

comment:2 Changed 5 months ago by tcbennun

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: https://github.com/SasView/sasview/pull/163

comment:3 Changed 5 months ago by tcbennun

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.