Opened 2 years ago

Closed 4 months ago

#882 closed enhancement (fixed)

Add notes to doc about fitting integer parameters

Reported by: pkienzle Owned by: smk78
Priority: major Milestone: SasView 4.3.0
Component: SasView Keywords:
Cc: Work Package: SasView Documentation

Description

The following notes were in the multilayer vesicle model in IGOR:

The value returned by the fitting routine for the number of water/shell pairs will be a floating point number. The physical reality must be an integer number of layers. In the model function, the value is truncated so that only the integer portion is used. That is 5.95 "pairs" is actually calculating the scattering for 5 pairs. [sasmodels rounds to 6 rather than truncates to 5]

and:

This is a highly non-linear model function, complicated by the fact that the number of water/shell pairs must physically be an integer value, although the optimization treats it as a floating point value. For the best possible experience:

  • Start with the best possible guess
  • Using a priori knowledge, hold as many parameters fixed as possible
  • if N=1, tw (water thickness) must by definition be zero. Both N and tw must be fixed during fitting.
  • If N>1, use constraints to keep N > 1 (set this up in the curve fitting dialog)
  • To force N to "move" during fitting, you may need to set an "epsilon" wave to force a larger step in that direction. epsilon = 0.001 is good for all parameters other than N, which should be set to 1. (set this up in the curve fitting dialog) [epsilon is an IGOR control on individual fit parameters; in bumps, don't use L-M or other derivative-based optimizers]

Some of these details should be added to the multilayer vesicle docs, but others are more general and will apply to any system with integer parameters. See ticket #843 and the pull request 27 for context.

Also mentioned:

The resolution smeared version gives the most appropriate view of the model. Note that the resolution smearing calculation uses 76 Gauss quadrature points to properly smear the model since the function is HIGHLY oscillatory, especially around the q-values that correspond to the repeat distance of the layers. This can make the calculations rather slow.

Better control of resolution is ticketed in #715 and #717. Adaptive integration is recommended in #392. Hints for when the user should turn on oversampling in q for the resolution calculation should be documented (i.e., when the function is oscillatory or the data are sparse). Note that polydispersity reduces oscillation, which means the resolution calculation is cheaper.

Change History (5)

comment:1 Changed 2 years ago by pkienzle

Multilayer vesicle docs now include the above details. The main docs for the fitting perspective should still be updated, as well as the docs for other models with fittable integer parameters (e.g., pearl necklace).

comment:2 Changed 2 years ago by smk78

  • Work Package changed from SasView Bug Fixing to SasView Documentation

comment:3 Changed 21 months ago by butler

  • Milestone changed from SasView 4.2.0 to SasView 4.3.0

comment:4 Changed 8 months ago by pkienzle

See also #872.

comment:5 Changed 4 months ago by smk78

  • Owner set to smk78
  • Resolution set to fixed
  • Status changed from new to closed

In b7ce5ad13cff1bb692e5cac14d5eeb68461dd835/sasview:

Added section on Fitting Integer Parameters. Closes #882

Note: See TracTickets for help on using tickets.