Skip to content

Documentation Checks

Ricardo Ferraz Leal edited this page Mar 31, 2019 · 10 revisions

<html><body>

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: this becomes a tooltip in the GUI
  • the .py file also contains a description string: this becomes the short description of the model in the GUI

a model parameter table :

  • this will be auto-generated from the parameters in the .py file
  • scale and background are implicit to all models, they do not need to be added separately
  • parameter names should follow the mathematical convention; eg, radius_core not core_radius , or sld_solvent not solvent_sld
  • use python -m sasmodels.list_pars to see all the parameter names currently in use: re-use as many as possible!!!
  • model parameter names should be consistent between different models, so sld_solvent , for example, should have exactly the same name in every model
  • 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

This table indicates the status of documentation compliance with the above rules (Y = compliant / . = status pending):

<tbody>

SasView name

sasmodels name

short_desc

param_table

long_desc

definition

formula

param_desc

plot

ref

attribution

Assigned

HayterMSAStructure

hayter_msa

Y

Y

Y

Y

n/a

Y

.

Y

n/a

RKH

BarBellModel

barbell

Y

Y

Y

Y

Y

Y

Y

Y

Y

RKH

BCCrystalModel

bcc_paracrystal

Y

Y

Y

Y

Y

Y

Y

Y

Y

RKH

BEPolyelectrolyte

be_polyelectrolyte

Y

x

Y

Y

Y

Y

Y

Y

.

RKH

investigate contrast factor

BroadPeakModel

broad_peak

Y

Y

Y

Y

Y

Y

Y

n/a

n/a

RKH

CappedCylinderModel

capped_cylinder

Y

Y

Y

Y

Y

Y

Y

Y

Y

RKH

CoreShellBicelleModel

core_shell_bicelle

Y

Y

Y

Y

Y

Y

Y

Y

Y

RKH

CoreShellCylinderModel

core_shell_cylinder

Y

Y

Y

Y

n/a

Y

.

Y

n/a

RKH

CoreShellEllipsoidModel

core_shell_ellipsoid

Y

Y

Y

Y

Y

Y

.

Y

n/a

RKH

CoreShellEllipsoidXTModel

core_shell_ellipsoid_xt

Y

Y

Y

Y

Y

Y

.

Y

n/a

RKH

CoreShellModel

core_shell_sphere

Y

Y

Y

Y

Y

Y

Y

Y

Y

RKH

CorrLength

correlation_length

Y

Y

Y

Y

Y

Y

Y

Y

.

RKH

CSParallelepipedModel

core_shell_parallelepiped

Y

Y

Y

Y

Y

Y

Y

Y

Y

RKH

CylinderModel

cylinder

Y

Y

Y

Y

n/a

Y

.

n/a

n/a

RKH

DABModel

dab

Y

Y

Y

Y

Y

Y

Y

Y

Y

RKH

EllipsoidModel

ellipsoid

Y

Y

Y

Y

Y

Y

Y

Y

Y

RKH

EllipticalCylinderModel

elliptical_cylinder

Y

Y

Y

Y

Y

Y

Y

Y

Y

RKH

FCCrystalModel

fcc_paracrystal

Y

Y

Y

Y

Y

Y

Y

Y

Y

RKH

FlexibleCylinderModel

flexible_cylinder

Y

Y

Y

Y

Y

Y

Y

Y

Y

RKH

FlexCylEllipXModel

flexible_cylinder_elliptical

Y

Y

Y

Y

Y

Y

Y

Y

Y

RKH

FractalCoreShell

fractal_core_shell

Y

Y

Y

Y

Y

Y

Y

Y

Y

RKH

FuzzySphereModel

fuzzy_sphere

Y

Y

Y

Y

Y

Y

Y

Y

.

RKH

PeakGaussModel

gaussian_peak

Y

Y

Y

Y

Y

Y

n/a

Y

.

RKH

GaussLorentzGel

gauss_lorentz_gel

Y

Y

Y

Y

Y

Y

Y

Y

.

RKH

GelFitModel

gel_fit

Y

Y

Y

Y

Y

Y

Y

Y

.

RKH

Guinier

guinier

Y

Y

Y

Y

Y

Y

Y

Y

.

RKH

GuinierPorod

guinier_porod

Y

Y

Y

Y

Y

Y

Y

Y

.

RKH

HardsphereStructure

hardsphere

Y

Y

Y

Y

n/a

Y

.

Y

n/a

RKH

HollowCylinderModel

hollow_cylinder

Y

Y

Y

Y

n/a

Y

.

Y

n/a

RKH

LamellarModel

lamellar

Y

Y

Y

Y

Y

Y

.

Y

n/a

RKH

LamellarPSModel

lamellar_stack_caille

Y

Y

Y

Y

Y

Y

.

Y

n/a

RKH

LamellarPSHGModel

lamellar_hg_stack_caille

Y

Y

Y

Y

Y

Y

.

Y

n/a

RKH

LamellarFFHGModel

lamellar_hg

Y

Y

Y

Y

Y

Y

.

Y

n/a

RKH

LamellarPCrystallModel

lamellar_stack_paracrystal

Y

Y

Y

Y

Y

Y

.

Y

n/a

RKH

LineModel

line

Y

Y

Y

Y

Y

Y

Y

n/a

n/a

RKH

LinearPearlsModel

linear_pearls

Y

Y

Y

Y

Y

Y

Y

Y

Y

RKH

Lorentz

lorentz

Y

Y

Y

Y

Y

Y

Y

Y

Y

RKH

MassFractalModel

mass_fractal

Y

Y

Y

Y

Y

Y

Y

Y

.

RKH

MassSurfaceFractal

mass_surface_fractal

Y

Y

Y

Y

Y

Y

Y

Y

.

RKH

MicelleSphCore

polymer_micelle

Y

Y

Y

x

x

x

Y

Y

x

RKH

- needs investigation

MultiShellModel

multi_shell

.

.

.

.

.

.

.

.

.

.

ParallelepipedModel

parallelepiped

Y

Y

Y

Y

Y

Y

Y

Y

.

RKH

PeakLorentzModel

peak_lorentz

Y

Y

Y

Y

Y

Y

Y

Y

.

RKH

PearlNecklaceModel

pearl_necklace

Y

Y

Y

Y

Y

Y

Y

Y

.

RKH

PolyExclVolume

polymer_excl_volume

Y

Y

Y

Y

Y

Y

Y

Y

.

RKH

PorodModel

porod

Y

Y

Y

Y

Y

Y

Y

n/a

Y

RKH

!AbsolutePower_Law

power_law

Y

Y

Y

Y

Y

Y

Y

x

Y

RKH

RectangularPrismModel

rectangular_prism

Y

Y

Y

Y

Y

Y

Y

Y

.

RKH

RectangularHollowPrismModel

hollow_rectangular_prism

Y

Y

Y

Y

Y

Y

Y

Y

.

RKH

RectangularHollowPrismInfThinWallsModel

hollow_rectangular_prism_thin_walls

Y

Y

Y

Y

Y

Y

Y

Y

.

RKH

SCCrystalModel

sc_paracrystal

Y

Y

Y

Y

Y

Y

Y

Y

Y

RKH

SphereModel

sphere

Y

Y

Y

Y

Y

Y

Y

Y

.

RKH

StackedDisksModel

stacked_disk

Y

Y

Y

Y

Y

Y

Y

Y

Y

RKH

StarPolymer

star_polymer

Y

Y

Y

Y

Y

Y

Y

Y

.

RKH

issues at extreme low Q

StickyHSStructure

stickyhardsphere

Y

Y

Y

Y

n/a

Y

.

Y

n/a

RKH

SurfaceFractalModel

surface_fractal

Y

Y

Y

Y

Y

Y

Y

Y

.

RKH

TeubnerStrey

teubner_strey

.

.

.

.

.

.

.

.

.

.

TriaxialEllipsoidModel

triaxial_ellipsoid

Y

Y

Y

Y

Y

Y

Y

Y

.

RKH

check linked fig

TwoLorentzian

two_lorentzian

Y

Y

Y

Y

Y

Y

Y

Y

Y

PDB

TwoPowerLaw

two_power_law

Y

Y

Y

Y

Y

Y

Y

Y

Y

PDB

VesicleModel

vesicle

Y

Y

Y

Y

Y

Y

Y

Y

Y

PDB

BinaryHSModel

binary_hard_sphere

Y

Y

Y

Y

*

Y

Y

Y

Y

PDB

Core2ndMomentModel

adsorbed_layer

Y

Y

Y

Y

Y

Y

Y

Y

Y

SMK

CoreMultiShellModel

core_multi_shell

Y

Y

Y

Y

.

.

.

.

.

.

Debye

mono_gauss_coil

Y

Y

Y

Y

Y

Y

Y

Y

Y

SMK

FractalModel

fractal

Y

Y

Y

Y

Y

Y

Y

Y

Y

PDB

MultiplicationModel

.

.

.

.

.

.

.

.

.

OnionExpShellModel

.

.

.

.

.

.

.

.

.

.

Poly_GaussCoil

poly_gauss_coil

Y

Y

Y

Y

Y

Y

Y

Y

Y

SMK

PringleModel

pringle

Y

Y

Y

Y

Y

Y

Y

Y

Y

PDB

RaspBerryModel

raspberry

Y

Y

Y

Y

Y

Y

Y

Y

Y

AJJ

ReflectivityModel

.

.

.

.

.

.

.

.

.

.

ReflectivityIIModel

.

.

.

.

.

.

.

.

.

.

RPA10Model

rpa [unfinished]

.

.

.

.

.

.

.

.

.

.

SphericalSLDModel

.

.

.

.

.

.

.

.

.

.

SquareWellStructure

squarewell

Y

Y

Y

Y

n/a

Y

.

Y

n/a

RKH

UnifiedPowerRg

.

.

.

.

.

.

.

.

.

.

sum_p1_p2

.

.

.

.

.

.

.

.

.

.

sum_Ap1_1_Ap2

.

.

.

.

.

.

.

.

.

.

polynomial5

.

.

.

.

.

.

.

.

.

.

sph_bessel_jn

.

.

.

.

.

.

.

.

.

.

testmodel

.

.

.

.

.

.

.

.

.

.

testmodel_2

.

.

.

.

.

.

.

.

.

.

</tbody>

  • = code not completely verified against equations in paper. Doc equations verified.

</body></html>

Clone this wiki locally