Version 3 (modified by smk78, 9 years ago) (diff)

Model Documentation Checks

All models added to SasView need to be properly documented. This means there should be (in order):

a model name:

  • this is the name string in the .py file
  • titles should be:
    • all in lower case
    • without spaces (use underscores to separate words instead)
    • without any capitalization or CamelCase
    • without incorporating the word 'model'
    • examples: barbell not BarBell; broad_peak not BroadPeak; barbell not BarBellModel

a short description:

  • this is the title string in the .py file
  • the .py file also contains a description string: this becomes a tooltip in the GUI

a model parameter table:

  • this will be auto-generated from the parameters in the .py file
  • model parameter names should be consistent between different models, so solvent_sld, for example, should have exactly the same name in every model
  • scale and background are implicit to all models, they do not need to be added separately
  • new parameter names:
    • radius = radius
    • sld = scattering length density of particle
    • solvent_sld = scattering length density of matrix
    • regiona_sld = scattering length density of region a for a multi component model with several slds
    • cor_length = correlation length
    • exp = an exponent
    • peak_pos = q_peak or q0, etc
    • theta = axis_theta
    • phi = axis_phi
    • vol_frac = volume fraction of particle
    • etc
  • every parameter should have units (or the word None)
  • units should be properly formatted; ie, using sub-/super-scripts and using negative exponents rather than / operators
  • fancy units markup are contained in the variable RST_UNITS in sasmodels/generate.py
  • if necessary, add new units to RST_UNITS, use the macros defined in doc/rst_prolog, or add your own
  • every parameter must have a default value

a long description:

  • this is the RST text enclosed between the r""" and """ delimiters in the .py file

a definition of the model:

  • as part of the long description

a formula defining the function the model calculates:

  • as part of the long description

an explanation of the parameters:

  • as part of the long description
  • explaining how the symbols in the formula map to the model parameters

a plot of the function

  • using the default parameters

a figure caption:

  • as part of the long description
  • the figure number is auto-generated

at least one reference:

  • as part of the long description
  • specifying where the reader can obtain more information about the model

the name of the author

  • as part of the long description
  • the .py file should also contain a comment identifying who converted/created the model file
SasView namesasmodels name P(Q) S(Q) Multiply Multiplicity Magnetic SESANS Assigned Converted UTest double err
HayterMSAStructure HayterMSAsq .....1RKH..... -
BarBellModel barbell .....3AJJ. - ....
BCCrystalModel bcc .....3AJJ. - .. 9e-14 2e-2
BEPolyelectrolyte be_polyelectrolyte .....3PR ..... -
BroadPeakModel broad_peak .....4PDB. - ... -
CappedCylinderModel capped_cylinder .....3HP . - .. 2e-11 3e-3
CoreShellBicelleModel core_shell_bicelle .....2PR .... 1e-12 1e-4
CoreShellCylinderModel core_shell_cylinder.....3HP . - .. 9e-14 4e-4
CoreShellEllipsoidModelcore_shell_ellipsoid.....3PR ... 1e-4. 1e-3
CoreShellEllipsoidXTModelcore_shell_ellipsoid_xt.....3PR... 1e-4. 1e-3
CoreShellModel core_shell_sphere .....2MD ..... -
CorrLength correlation_length .....3JRK..... -
CSParallelepipedModel core_shell_parallelepiped.....3MAG.... 5e-13 8e-4
CylinderModel cylinder .....1HP . - .. 2e-13 1e-4
DABModel dab .....1DM . - ... -
EllipsoidModel ellipsoid .....1HP . - good*. 3e-14 1e-4
EllipticalCylinderModel elliptical_cylinder.....3MD ..... -
FCCrystalModel fcc .....3AJJ. - ....
FlexibleCylinderModel flexible_cylinder .....2PR ..... -
FlexCylEllipXModel flexible_cylinder_ex.....3PR ..... -
FractalCoreShell fractal_core_shell .....3PR ..... -
FuzzySphereModel fuzzy_sphere .....2TRN.. good*. - -
PeakGaussModel gaussian_peak .....4AJJ. - . 1e-3. -
GaussLorentzGel gauss_lorentz_gel .....2PR ..... -
GelFitModel gel_fit .....1PR ..... -
Guinier guinier .....1JRK..... -
GuinierPorod guinier_porod .....2MD ..... -
HardsphereStructure hardsphere .....1RKH..... -
HollowCylinderModel hollow_cylinder .....2JRK.... 4e-13 2e-3
LamellarModel lamellar .....2PAK. - ... -
LamellarPSModel lamellarCaille .....3RKH... 5e-2. -
LamellarPSHGModel lamellarCailleHG .....3RKH.. 3e-12 5e-3. -
LamellarFFHGModel lamellarFFHG .....3RKH..... -
LamellarPCrystallModel lamellarPC .....3RKH..... -
LineModel line .....4WP ..... -
LinearPearlsModel linear_pearls .....3PR . N ... -
Lorentz lorentz .....1JRK..... -
MassFractalModel mass_fractal .....1PR ... 5e-5. -
MassSurfaceFractal mass_surface_fractal.....1PR ..... -
MicelleSphCore micelle_sphere_core..... PR . - 1e-09.. -
MultiShellModel multi_shell .....3PR .. 2e-09 1e-3. -
ParallelepipedModel parallelepiped .....2MAG.... 5e-13 2e-4
PeakLorentzModel peak_lorentz .....4AJJ..... -
PearlNecklaceModel pearl_necklace .....3JRK.. 6e-14.. -
PolyExclVolume polymer_excl_volume.....3PR ..... -
PorodModel porod .....3MD ..... -
!AbsolutePower_Law power_law .....3SMK..... -
RectangularPrismModel rectangular_prism .....2MAG..... -
RectangularHollowPrismModelhollow_rectangular_prism.....3MAG..... -
RectangularHollowPrismInfThinWallsModelhollow_rectangular_prism_infinitely_thin_walls .....3MAG..... -
SCCrystalModel sc_crystal .....3PR ..... 1e-3
SphereModel sphere .....1HP . - good*.. -
StackedDisksModel stacked_disk .....2PR ... 1e-5. 1e-5
StarPolymer star_polymer .....2PR ..... -
StickyHSStructure stickyhardsphere .....1PAK..... -
SurfaceFractalModel surface_fractal .....1PR ... 5e-5. -
TeubnerStrey teubner_strey .....1PAK. - good*.. -
TriaxialEllipsoidModel triaxial_ellipsoid .....3HP . - good*...
TwoLorentzian two_lorentzian .....4PR ..... -
TwoPowerLaw two_power_law .....4WP ..... -
VesicleModel vesicle .....2PDB.. 3e-3 2e-5. -
BinaryHSModel binary_hard_sphere .....1PDB. - - - - -
Core2ndMomentModel .....3SMK. - - - - -
CoreMultiShellModel .....3 . - - - - -
Debye .....1SMK. - - - - -
FractalModel .....1PDB. - - - - -
MultiplicationModel ..... PAK. - - - - -
OnionExpShellModel .....3PAK. - - - - -
Poly_GaussCoil .....2SMK. - - - - -
PringleModel .....3WP . - - - - -
RaspBerryModel .....2AJJ. - - - - -
ReflectivityModel .....4 . - - - - -
ReflectivityIIModel .....4 . - - - - -
RPA10Model .....3PAK. - - - - -
SphericalSLDModel .....3WP . - - - - -
SquareWellStructure squarewell .....1RKH. - - - - -
UnifiedPowerRg .....4 . - - - - -
sum_p1_p2 .....3PAK. - - - - -
sum_Ap1_1_Ap2 .....3 . - - - - -
polynomial5 .....3 . - - - - -
sph_bessel_jn .....3 . - - - - -
testmodel .....3 . - - - - -
testmodel_2 .....3 . - - - - -