Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#590 closed defect (fixed)

Error in linear fit Rg calculation

Reported by: butler Owned by: butler
Priority: critical Milestone: SasView 4.0.0
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing

Description (last modified by butler)

The linear fits are very broken it seems. In particular for the Guinier plot, the q*Rgmin and q*Rgmax on the linearized plot fit panel returns q*(Rgmin)2 and q*(Rgmax)2 NOT the useful values it claims. Note also that the q2 limits can be changed but the q limits they correspond to do not adjust so that they are also incorrect as soon as the user adjust the limits. Also the uncertainties on Rg and I0 are incorrect as are the underlying uncertainties in the slope and intercept.

Change History (6)

comment:1 Changed 8 years ago by butler

  • Description modified (diff)

comment:2 Changed 8 years ago by butler

  • Description modified (diff)
  • Owner set to butler
  • Status changed from new to accepted

comment:3 Changed 8 years ago by butler

Code is rather ugly and needs tender loving care. Most if not all can be fixed in plottools.fitDialog. However plottools.transform; plottools.fittings; and plottools.LineModel are all involved. Note the absurdity of using the NLLSQ algorithm to fit the linearized plots. Fittings may be able to be completely removed. Also transform is probably not necessary?

For now fixed reporting for q*Rg and uncertainty calculation on Rg and I0. Underlying uncertainty calculation for slope and intercept are clearly still incorrect.

Last edited 8 years ago by butler (previous) (diff)

comment:4 Changed 8 years ago by paul butler <butlerpd@…>

In [dd5bf63093de43c42cbb5ac17751c02bdd615eae]:

close #590. A lot of problems were caused by LineModel? and LinerFit?
having different equations (ax+b vs a+bx). Further errors in
calculations, particularly of uncertainties were fixed. The fact that
the fits to not account for smearing was verified and a warning added.
Code was also modified to update the qmin and qmax to match changes in
the transformed xmin xmax. Lots of documentation was added and the
fitdialog layout was cleaned up considerably. This is now usable though
the design of the user interface (and the whole design of linear fits)
could use a rethink.

comment:5 Changed 8 years ago by butler

  • Resolution set to fixed
  • Status changed from accepted to closed

comment:6 Changed 8 years ago by Piotr Rozyczko <piotr.rozyczko@…

In [e3ae090acafb0a35e27298bc8dd1e99d1ffab206]:

Merge master

see issue #590. fix error in q.rg and uncertainties in Rg and I0.
Uncertainty calculation for slope and intercept are still wrong I
believe.

references #205 - Removed Kratky plot choice from linearized plots for
now since it doesn't currently work.

close #590. A lot of problems were caused by LineModel? and LinerFit?
having different equations (ax+b vs a+bx). Further errors in
calculations, particularly of uncertainties were fixed. The fact that
the fits to not account for smearing was verified and a warning added.
Code was also modified to update the qmin and qmax to match changes in
the transformed xmin xmax. Lots of documentation was added and the
fitdialog layout was cleaned up considerably. This is now usable though
the design of the user interface (and the whole design of linear fits)
could use a rethink.

Note: See TracTickets for help on using tickets.