Add a model here when you are working on it. Mark it as converted when it is tested and pushed.

The err columns are the result of running multi_compare.sh, which generates random parameters for comparison against sasview. double should be at most 5e-14 relative error, single should be 5e-5.

./multi_compare.sh MODEL 200 1d200 mono double
./multi_compare.sh MODEL 200 1d200 mono single
./multi_compare.sh MODEL 200 2d32 mono double
./multi_compare.sh MODEL 200 2d32 mono single

Some models still have issues when run using single precision (lamellarPC for example).

We are not dealing with magnetism at this point as it requires some work on the wrapper functionality. Thus the *Magnetic* column below is for reference as to which models need attention. The *SESANS* column should be used to indicate if the model is a priority (1 highest, 4 lowest). The Multiply column indicates whether the model can be multiplied by a structure factor. This is currently hardcoded into src/sas/perspectives/fitting/models.py

SasView namesasmodels name P(Q) S(Q) Multiply Multiplicity Magnetic SESANS Assigned Converted UTest double err single err double 2D single 2D
Core2ndMomentModel adsorbed_layer Y....3SMKY - good good - -
BarBellModel barbell Y....3AJJY - good good FAIL FAIL
BCCrystalModel bcc Y....3AJJY - good FAIL 9e-14 2e-2
BEPolyelectrolyte be_polyelectrolyte Y....3PR Y Y good good - -
BinaryHSModel binary_hard_sphere YNNNN1PDBY Y OK FAIL - -
BroadPeakModel broad_peak Y....4PDBY - good good - -
CappedCylinderModel capped_cylinder Y....3HP Y - good good 2e-11 3e-3
CoreMultiShellModel core_multi_shell Y.YYY3 . - - - - -
CoreShellBicelleModel core_shell_bicelle Y.Y..2PR Y Y good good 1e-12 1e-4
CoreShellCylinderModel core_shell_cylinderY.Y..3HP Y - good good 9e-14 4e-4
CoreShellEllipsoidModelcore_shell_ellipsoidY.Y..3PR Y Y good 1e-4 good 1e-3
CoreShellEllipsoidXTModelcore_shell_ellipsoid_xtY.Y..3PRYY good 1e-4 good 1e-3
CoreShellModel core_shell_sphere Y.Y.Y2MD Y Y good good - -
CorrLength correlation_length Y....3JRKY Y good good - -
CSParallelepipedModel core_shell_parallelepipedY.Y..3MAGY Y good good 5e-13 8e-4
CylinderModel cylinder Y.Y.Y1HP Y - good good 2e-13 1e-4
DABModel dab Y....1DM Y - good good - -
EllipsoidModel ellipsoid Y.Y..1HP Y - good* good 3e-14 1e-4
EllipticalCylinderModel elliptical_cylinderY.Y..3MD Y Y good good - -
FCCrystalModel fcc Y....3AJJY - good FAIL 6e-12 7e-2
FlexibleCylinderModel flexible_cylinder Y....2PR Y Y good FAIL - -
FlexCylEllipXModel flexible_cylinder_exY....3PR Y Y good FAIL - -
FractalModel fractal Y....1PDBY Y good* good* - -
FractalCoreShell fractal_core_shell Y....3PR Y Y good good - -
FuzzySphereModel fuzzy_sphere Y.Y..2TRNY Y good* good - -
PeakGaussModel gaussian_peak Y....4AJJY - good 1e-3 - -
GaussLorentzGel gauss_lorentz_gel Y....2PR Y Y good good - -
GelFitModel gel_fit Y....1PR Y Y good good - -
Guinier guinier Y....1JRKY Y good good - -
GuinierPorod guinier_porod Y....2MD Y Y good good - -
HardsphereStructure hardsphere .Y...1RKHY Y good FAIL - -
HayterMSAStructure hayter_msa .Y...1RKHY Y OK FAIL - -
HollowCylinderModel hollow_cylinder Y.Y..2JRKY Y good good 4e-13 2e-3
RectangularHollowPrismModelhollow_rectangular_prismY.Y..3MAGY Y good good - -
RectangularHollowPrismInfThinWallsModelhollow_rectangular_prism_infinitely_thin_walls Y....3MAGY Y good good - -
LamellarModel lamellar Y....2PAKY Y good good - -
LamellarPSModel lamellarCaille Y....3RKHY Y good 5e-2 - -
LamellarPSHGModel lamellarCailleHG Y....3RKHY Y 3e-12 5e-3 - -
LamellarFFHGModel lamellarFFHG Y....3RKHY Y good good - -
LamellarPCrystallModel lamellarPC Y....3RKHY Y good FAIL - -
LineModel line Y....4WP Y Y good good - -
LinearPearlsModel linear_pearls Y....3PR Y N good fail - -
Lorentz lorentz Y....1JRKY Y good good - -
MassFractalModel mass_fractal Y....1PR Y Y good 5e-5 - -
MassSurfaceFractal mass_surface_fractalY....1PR Y Y good good - -
MicelleSphCore micelle_sphere_coreY.Y.. PR Y - 1e-09 FAIL - -
sum_p1_p2 mixture Y....3PAKY - - - - -
Debye mono_gauss_coil Y....1SMKY Y good good - -
MultiShellModel multilayer_vesicle Y.YY.3PR Y Y 2e-09 1e-3 - -
OnionExpShellModel onion Y.YY.3PAKY - - - - -
ParallelepipedModel parallelepiped Y.Y.Y2MAGY Y good good 5e-13 2e-4
PeakLorentzModel peak_lorentz Y....4AJJY Y good good - -
PearlNecklaceModel pearl_necklace Y....3JRKY Y 6e-14 FAIL - -
Poly_GaussCoil poly_gauss_coil Y....2SMKY Y FAIL FAIL - -
PolyExclVolume polymer_excl_volumeY....3PR Y Y good good - -
PorodModel porod Y....3MD Y Y good good - -
PringleModel pringle Y....3WP Y Y FAIL good - -
!AbsolutePower_Law power_law Y....3SMKY Y good good - -
MultiplicationModel product ..... PAKY - - - - -
RaspBerryModel raspberry Y....2PDBY Y good good - -
RectangularPrismModel rectangular_prism Y.Y..2MAGY Y good good - -
RPA10Model rpa Y..Y.3PAK. - - - - -
SCCrystalModel sc_crystal Y....3PR Y Y good FAIL good 1e-3
SphereModel sphere Y.Y.Y1HP Y - good* good - -
SphericalSLDModel spherical_sld Y.YY.3WP . - - - - -
SquareWellStructure squarewell .Y...1RKHY Y good OK - -
StackedDisksModel stacked_disk Y.Y..2PR Y Y good 1e-5 good 1e-5
StarPolymer star_polymer Y....2PR Y Y good fail - -
StickyHSStructure stickyhardsphere .Y...1PAKY Y good FAIL - -
SurfaceFractalModel surface_fractal Y....1PR Y Y good 5e-5 - -
TeubnerStrey teubner_strey Y....1PAKY - good* good - -
TriaxialEllipsoidModel triaxial_ellipsoid Y.Y..3HP Y - good* good good good
TwoLorentzian two_lorentzian Y....4PR Y Y good good - -
TwoPowerLaw two_power_law Y....4WP Y Y good good - -
UnifiedPowerRg unified_power_Rg Y..Y.4PAK. - good N/A - -
VesicleModel vesicle Y.Y..2PDBY Y good* good - -
ReflectivityModel Y..Y.4 . - - - - -
ReflectivityIIModel Y..Y.4 . - - - - -
sum_Ap1_1_Ap2 Y....3 . - - - - -
polynomial5 Y....3 . - - - - -
sph_bessel_jn Y....3 . - - - - -
testmodel Y....3 . - - - - -
testmodel_2 Y....3 . - - - - -

* using taylor expansion near 0 for fq = 3 (sin(qr)/qr - cos(qr))/qr2; using quad precision as a cross check, this is more accurate than computing the direct expression for qr < 0.1 in double precision, and so the values will differ from those in sasview. It is much more accurate in single precision. This affects many models, including sphere and ellipsoid models. The cylinder models are using J1(qr)/qr, which has its own numerical expansion and does not suffer from this problem. Should probably settle on one or the other and move it into the library. So even though the double precision values for sphere, ellipsoid and triaxial ellipsoid differ by more than 5e-14, they are still marked good. Similarly, the Teubner-Strey model checks out against the quad precision version and so is marked good.

OK. some models such as binary hard sphere and raspberry are inherently "unstable" in certain regions of parameter space. They require double precision but the difference between old SasView and sasmodels is still higher than nominally allowed. However hard to say which is more correct at this point.

List of standard parameters has moved to the instructions page

Last modified 6 years ago Last modified on Oct 14, 2016 12:54:45 PM