[ Identification | Description | Input parameters | Links ]

# The `SasView_model` Component

## Identification

- Site:
- Author: Jakob Garde, Torben Nielsen, Peter Willendrup
- Origin: SasView, DTU, European Spallation Source ERIC
- Date: 03.02.2016

## Description

    Sample for use in SANS instruments. The models describe mono disperse particles in thin solution. The sample geometry may have the shape:

    Shape:        - A filled box with dimensions xwidth, yheight and zdepth.
    - A cylinder with dimensions radius and yheight.
    - A filled sphere given by radius.

    These parameters are mutually exclusive.

    Example using spheres in thin solution, with radius=200 AA and a delta_sld=0.6 fm/AA^3:
    SasView_model(model_index=47, model_scale=1.0, model_pars={1, 7, 200}, model_abs=0.0, xwidth=0.01, yheight=0.01, zdepth=0.005,)

    The algorithm of this component requires use of the ISO C standard c99, standard from McStas 2.7 and 3.0.

    The list of scattering models in SasView is called sasmodels. The list of McStas available SasView sasmodels are found in the table below.

    A few models may require manual documentation lookup using the above link to the SasView site.

    McStas does currently not support multiplication of formfactor models with structure factor models.

    The 2D scattering scattering kernels are denoted by modelname_xy. I.e. to evalulate scattering from aligned cylinders use model_index=10 to use cylinder_xy.

    MDOC

    Model no.SasView nameParameters
     0NoneNone
     1barbell(sld, solvent_sld, bell_radius, radius, length)
     2barbell_xy(sld, solvent_sld, bell_radius, radius, length, theta, phi)
     3bcc_paracrystal(dnn, d_factor, radius, sld, solvent_sld)
     4bcc_paracrystal_xy(dnn, d_factor, radius, sld, solvent_sld, theta, phi, psi)
     5capped_cylinder(sld, solvent_sld, radius, cap_radius, length)
     6capped_cylinder_xy(sld, solvent_sld, radius, cap_radius, length, theta, phi)
     7core_shell_cylinder(core_sld, shell_sld, solvent_sld, radius, thickness, length)
     8core_shell_cylinder_xy(core_sld, shell_sld, solvent_sld, radius, thickness, length, theta, phi)
     9cylinder(sld, solvent_sld, radius, length)
    10cylinder_xy(sld, solvent_sld, radius, length, theta, phi)
    11dab(length)
    12dab_xy(length)
    13ellipsoid(sld, solvent_sld, rpolar, requatorial)
    14ellipsoid_xy(sld, solvent_sld, rpolar, requatorial, theta, phi)
    15fcc_paracrystal(dnn, d_factor, radius, sld, solvent_sld)
    16fcc_paracrystal_xy(dnn, d_factor, radius, sld, solvent_sld, theta, phi, psi)
    17flexible_cylinder_ex(length, kuhn_length, radius, axis_ratio, sld, solvent_sld)
    18flexible_cylinder_ex_xy(length, kuhn_length, radius, axis_ratio, sld, solvent_sld)
    19gaussian_peak(q0, sigma)
    20gaussian_peak_xy(q0, sigma)
    21guinier(rg)
    22guinier_xy(rg)
    23hardsphere(effect_radius, volfraction)
    24hardsphere_xy(effect_radius, volfraction)
    25HayterMSAsq(effect_radius, zz, VolFrac, Temp, csalt, dialec)
    26HayterMSAsq_xy(effect_radius, charge, volfraction, temperature, saltconc, dielectconst)
    27hollow_cylinder(radius, core_radius, length, sld, solvent_sld)
    28hollow_cylinder_xy(radius, core_radius, length, sld, solvent_sld, theta, phi)
    29lamellar(sld, solvent_sld, thickness)
    30lamellar_xy(sld, solvent_sld, thickness)
    31lamellar_FFHG(tail_length, head_length, sld, head_sld, solvent_sld)
    32lamellar_FFHG_xy(tail_length, head_length, sld, head_sld, solvent_sld)
    33lamellarCailleHG(tail_length, head_length, Nlayers, dd, Cp, tail_sld, head_sld, solvent_sld)
    34lamellarCailleHG_xy(tail_length, head_length, Nlayers, spacing, Caille_parameter, sld, head_sld, solvent_sld)
    35lamellarPC(th, Nlayers, davg, pd, sld, solvent_sld)
    36lamellarPC_xy(thickness, Nlayers, spacing, spacing_polydisp, sld, solvent_sld)
    37lamellarPS(del, Nlayers, dd, Cp, sld, solvent_sld)
    38lamellarPS_xy(thickness, Nlayers, spacing, Caille_parameter, sld, solvent_sld)
    39linear_pearls(radius, edge_sep, num_pearls, pearl_sld, solvent_sld)
    40linear_pearls_xy(radius, edge_sep, num_pearls, pearl_sld, solvent_sld)
    41lorentz(cor_length)
    42lorentz_xy(cor_length)
    43mass_fractal(radius, mass_dim, cutoff_length)
    44mass_fractal_xy(radius, mass_dim, cutoff_length)
    45mass_surface_fractal(mass_dim, surface_dim, cluster_rg, primary_rg)
    46mass_surface_fractal_xy(mass_dim, surface_dim, cluster_rg, primary_rg)
    47parallelepiped(sld, solvent_sld, a_side, b_side, c_side)
    48parallelepiped_xy(sld, solvent_sld, a_side, b_side, c_side, theta, phi, psi)
    49pearl_necklace(radius, edge_separation, string_thickness, number_of_pearls, sld, string_sld, solvent_sld)
    50pearl_necklace_xy(radius, edge_separation, string_thickness, number_of_pearls, sld, string_sld, solvent_sld)
    51sphere(sld, solvent_sld, radius)
    52sphere_xy(sld, solvent_sld, radius)
    53star_polymer(radius2, arms)
    54star_polymer_xy(radius2, arms)
    55stickyhardsphere(effect_radius, volfraction, perturb, stickiness)
    56stickyhardsphere_xy(effect_radius, volfraction, perturb, stickiness)
    57triaxial_ellipsoid(sld, solvent_sld, req_minor, req_major, rpolar)
    58triaxial_ellipsoid_xy(sld, solvent_sld, req_minor, req_major, rpolar, theta, phi, psi)

    Available SasView sasmodels - Extended parameters description

    sasmodels name
    Parameters
    Units
    Range

    barbell
     { 4, 1, 40, 20, 400 }

    barbell_xy
     { 4, 1, 40, 20, 400, 60, 60 }

    Parameters:

    Barbell scattering length density
    4e-6/Ang^2
    [-inf, inf]

    Solvent scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Spherical bell radius
    Ang
    [0, inf]

    Cylindrical bar radius
    Ang
    [0, inf]

    Cylinder bar length
    Ang
    [0, inf]

    In plane angle
    degrees
    [-inf, inf]

    Out of plane angle
    degrees
    [-inf, inf]

    bcc
     { 220, 0.06, 40, 4, 1 }

    bcc_xy
     { 220, 0.06, 40, 4, 1, 60, 60, 60 }

    Parameters:

    Nearest neighbour distance
    Ang
    [-inf, inf]

    Paracrystal distortion factor

    [-inf, inf]

    Particle radius
    Ang
    [0, inf]

    Particle scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Solvent scattering length density
    1e-6/Ang^2
    [-inf, inf]

    In plane angle
    degrees
    [-inf, inf]

    Out of plane angle
    degrees
    [-inf, inf]

    Out of plane angle
    degrees
    [-inf, inf]

    capped_cylinder
     { 4, 1, 20, 20, 400 }

    capped_cylinder_xy
     { 4, 1, 20, 20, 400, 60, 60 }

    Parameters:

    Cylinder scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Solvent scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Cylinder radius
    Ang
    [0, inf]

    Cap radius
    Ang
    [0, inf]

    Cylinder length
    Ang
    [0, inf]

    In plane angle
    degrees
    [-inf, inf]

    Out of plane angle
    degrees
    [-inf, inf]

    core_shell_cylinder
     { 4, 4, 1, 20, 20, 400 }

    core_shell_cylinder_xy
     { 4, 4, 1, 20, 20, 400, 60, 60 }

    Parameters:

    Cylinder core scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Cylinder shell scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Solvent scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Cylinder core radius
    Ang
    [0, inf]

    Cylinder shell thickness
    Ang
    [0, inf]

    Cylinder length
    Ang
    [0, inf]

    In plane angle
    degrees
    [-inf, inf]

    Out of plane angle
    degrees
    [-inf, inf]

    cylinder
     { 4, 1, 20, 400 }

    cylinder_xy
     { 4, 1, 20, 400, 60, 60 }

    Parameters:

    Cylinder scattering length density
    4e-6/Ang^2
    [-inf, inf]

    Solvent scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Cylinder radius
    Ang
    [0, inf]

    Cylinder length
    Ang
    [0, inf]

    In plane angle
    degrees
    [-inf, inf]

    Out of plane angle
    degrees
    [-inf, inf]

    dab
     { 50.0 }

    dab_xy
     { 50.0 }

    Parameters:

    correlation length
    Ang
    [0, inf]

    ellipsoid
     { 4, 1, 20, 400 }

    ellipsoid_xy
     { 4, 1, 20, 400, 60, 60 }

    Parameters:

    Ellipsoid scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Solvent scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Polar radius
    Ang
    [0, inf]

    Equatorial radius
    Ang
    [0, inf]

    In plane angle
    degrees
    [-inf, inf]

    Out of plane angle
    degrees
    [-inf, inf]

    fcc
     { 220, 0.06, 40, 4, 1 }

    fcc_xy
     { 220, 0.06, 40, 4, 1, 60, 60, 60 }

    Parameters:

    Nearest neighbour distance
    Ang
    [-inf, inf]

    Paracrystal distortion factor

    [-inf, inf]

    Particle radius
    Ang
    [0, inf]

    Particle scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Solvent scattering length density
    1e-6/Ang^2
    [-inf, inf]

    In plane angle
    degrees
    [-inf, inf]

    Out of plane angle
    degrees
    [-inf, inf]

    Out of plane angle
    degrees
    [-inf, inf]

    flexible_cylinder_ex
     { 1000.0, 100.0, 20.0, 1.5, 1.0, 6.3 }

    flexible_cylinder_ex_xy
     { 1000.0, 100.0, 20.0, 1.5, 1.0, 6.3 }

    Parameters:

    Length of the flexible cylinder
    Ang
    [0, inf]

    Kuhn length of the flexible cylinder
    Ang
    [0, inf]

    Radius of the flexible cylinder
    Ang
    [0, inf]

    Axis_ratio (major_radius/radius

    [0, inf]

    Cylinder scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Solvent scattering length density
    1e-6/Ang^2
    [-inf, inf]

    gaussian_peak
     { 0.05, 0.005 }

    gaussian_peak_xy
     { 0.05, 0.005 }

    Parameters:

    Peak position
    1/Ang
    [-inf, inf]

    Peak width (standard deviation)
    1/Ang
    [0, inf]

    guinier
     { 60.0 }

    guinier_xy
     { 60.0 }

    Parameters:

    Radius of Gyration
    Ang
    [0, inf]

    hardsphere
     { 50.0, 0.2 }

    hardsphere_xy
     { 50.0, 0.2 }

    Parameters:

    effective radius of hard sphere
    Ang
    [0, inf]

    volume fraction of hard spheres

    [0, 0.74]

    HayterMSAsq
     { 20.75, 19.0, 0.0192, 318.16, 0.0, 71.08 }

    HayterMSAsq_xy
     { 20.75, 19.0, 0.0192, 318.16, 0.0, 71.08 }

    Parameters:

    effective radius of hard sphere
    Ang
    [0, inf]

    charge on sphere (in electrons)
    e
    [0, inf]

    volume fraction of spheres

    [0, 0.74]

    temperature, in Kelvin, for Debye length calculation
    K
    [0, inf]

    conc of salt, 1:1 electolyte, for Debye length
    M
    [-inf, inf]

    dielectric constant of solvent (default water), for Debye length

    [-inf, inf]

    hollow_cylinder
     { 30.0, 20.0, 400.0, 6.3, 1 }

    hollow_cylinder_xy
     { 30.0, 20.0, 400.0, 6.3, 1, 90, 0 }

    Parameters:

    Cylinder radius
    Ang
    [0, inf]

    Hollow core radius
    Ang
    [0, inf]

    Cylinder length
    Ang
    [0, inf]

    Cylinder sld
    1/Ang^2
    [-inf, inf]

    Solvent sld
    1/Ang^2
    [-inf, inf]

    Theta angle
    degrees
    [-360, 360]

    Phi angle
    degrees
    [-360, 360]

    lamellar
     { 1, 6, 50 }

    lamellar_xy
     { 1, 6, 50 }

    Parameters:

    Layer scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Solvent scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Bilayer thickness
    Ang
    [0, inf]

    lamellarCaille
     { 30.0, 20, 400.0, 0.1, 6.3, 1.0 }

    lamellarCaille_xy
     { 30.0, 20, 400.0, 0.1, 6.3, 1.0 }

    Parameters:

    sheet thickness
    Ang
    [0, inf]

    Number of layers

    [0, inf]

    d-spacing of Caille S(Q)
    Ang
    [0.0, inf]

    Caille parameter
    1/Ang^2
    [0.0, 0.8]

    layer scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Solvent scattering length density
    1e-6/Ang^2
    [-inf, inf]

    lamellarCailleHG
     { 10, 2, 30, 40.0, 0.001, 0.4, 2.0, 6 }

    lamellarCailleHG_xy
     { 10, 2, 30, 40.0, 0.001, 0.4, 2.0, 6 }

    Parameters:

    Tail thickness
    Ang
    [0, inf]

    head thickness
    Ang
    [0, inf]

    Number of layers

    [0, inf]

    d-spacing of Caille S(Q)
    Ang
    [0.0, inf]

    Caille parameter

    [0.0, 0.8]

    Tail scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Head scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Solvent scattering length density
    1e-6/Ang^2
    [-inf, inf]

    lamellarFFHG
     { 15, 10, 0.4, 3.0, 6 }

    lamellarFFHG_xy
     { 15, 10, 0.4, 3.0, 6 }

    Parameters:

    Tail thickness
    Ang
    [0, inf]

    head thickness
    Ang
    [0, inf]

    Tail scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Head scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Solvent scattering length density
    1e-6/Ang^2
    [-inf, inf]

    lamellarPC
     { 33.0, 20, 250.0, 0.0, 1.0, 6.34 }

    lamellarPC_xy
     { 33.0, 20, 250.0, 0.0, 1.0, 6.34 }

    Parameters:

    sheet thickness
    Ang
    [0, inf]

    Number of layers

    [0, inf]

    d-spacing of paracrystal stack
    Ang
    [0.0, inf]

    d-spacing polydispersity
    Ang
    [0.0, inf]

    layer scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Solvent scattering length density
    1e-6/Ang^2
    [-inf, inf]

    linear_pearls
     { 80.0, 350.0, 3.0, 1.0, 6.3 }

    linear_pearls_xy
     { 80.0, 350.0, 3.0, 1.0, 6.3 }

    Parameters:

    Radius of the pearls
    Ang
    [0, inf]

    Length of the string segment - surface to surface
    Ang
    [0, inf]

    Number of the pearls

    [0, inf]

    SLD of the pearl spheres
    1e-6/Ang^2
    [-inf, inf]

    SLD of the solvent
    1e-6/Ang^2
    [-inf, inf]

    lorentz
     { 50.0 }

    lorentz_xy
     { 50.0 }

    Parameters:

    Screening length
    Ang
    [0, inf]

    mass_fractal
     { 10.0, 1.9, 100.0 }

    mass_fractal_xy
     { 10.0, 1.9, 100.0 }

    Parameters:

    Particle radius
    Ang
    [0.0, inf]

    Mass fractal dimension

    [1.0, 6.0]

    Cut-off length
    Ang
    [0.0, inf]

    mass_surface_fractal
     { 1.8, 2.3, 86.7, 4000.0 }

    mass_surface_fractal_xy
     { 1.8, 2.3, 86.7, 4000.0 }

    Parameters:

    Mass fractal dimension

    [1e-16, 6.0]

    Surface fractal dimension

    [1e-16, 6.0]

    Cluster radius of gyration
    Ang
    [0.0, inf]

    Primary particle radius of gyration
    Ang
    [0.0, inf]

    parallelepiped
     { 4, 1, 35, 75, 400 }

    parallelepiped_xy
     { 4, 1, 35, 75, 400, 60, 60, 60 }

    Parameters:

    Parallelepiped scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Solvent scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Shorter side of the parallelepiped
    Ang
    [0, inf]

    Second side of the parallelepiped
    Ang
    [0, inf]

    Larger side of the parallelepiped
    Ang
    [0, inf]

    In plane angle
    degrees
    [-inf, inf]

    Out of plane angle
    degrees
    [-inf, inf]

    Rotation angle around its own c axis against q plane
    degrees
    [-inf, inf]

    pearl_necklace
     { 80.0, 350.0, 2.5, 3, 1.0, 1.0, 6.3 }

    pearl_necklace_xy
     { 80.0, 350.0, 2.5, 3, 1.0, 1.0, 6.3 }

    Parameters:

    Mean radius of the chained spheres
    Angstrom
    [0, inf]

    Mean separation of chained particles
    Angstrom
    [0, inf]

    Thickness of the chain linkage
    Angstrom
    [0, inf]

    Mean number of pearls in each necklace
    none
    [0, inf]

    Scattering length density of the chained spheres
    Angstrom^2
    [-inf, inf]

    Scattering length density of the chain linkage
    Angstrom^2
    [-inf, inf]

    Scattering length density of the solvent
    Angstrom^2
    [-inf, inf]

    sphere
     { 1, 6, 50 }

    sphere_xy
     { 1, 6, 50 }

    Parameters:

    Layer scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Solvent scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Sphere radius
    Ang
    [0, inf]

    star_polymer
     { 100.0, 3 }

    star_polymer_xy
     { 100.0, 3 }

    Parameters:

    Ensemble radius of gyration squared of an arm
    Ang
    [0.0, inf]

    Number of arms in the model

    [1.0, 6.0]

    stickyhardsphere
     { 50.0, 0.2, 0.05, 0.2 }

    stickyhardsphere_xy
     { 50.0, 0.2, 0.05, 0.2 }

    Parameters:

    effective radius of hard sphere
    Ang
    [0, inf]

    volume fraction of hard spheres

    [0, 0.74]

    perturbation parameter, epsilon

    [0.01, 0.1]

    stickiness, tau

    [-inf, inf]

    triaxial_ellipsoid
     { 4, 1, 20, 400, 10 }

    triaxial_ellipsoid_xy
     { 4, 1, 20, 400, 10, 60, 60, 60 }

    Parameters:

    Ellipsoid scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Solvent scattering length density
    1e-6/Ang^2
    [-inf, inf]

    Minor equitorial radius
    Ang
    [0, inf]

    Major equatorial radius
    Ang
    [0, inf]

    Polar radius
    Ang
    [0, inf]

    In plane angle
    degrees
    [-inf, inf]

    Out of plane angle
    degrees
    [-inf, inf]

    Out of plane angle
    degrees
    [-inf, inf]

    Name convention: SasView  - sasmodels

    SasView name
    sasmodels name
    P(Q)
    S(Q)
    Multiply
    Multiplicity

    BarBell
    barbell
    -
     -
    -
    -

    BCCrystal
    bcc
    -
     -
    -
    -

    CappedCylinder
    capped_cylinder
    -
     -
    -
    -

    CoreShellCylinder
    core_shell_cylinder
    -
     -
    -
    -

    Cylinder
    cylinder
    -
     -
    -
    -

    DAB
    dab
    -
     -
    -
    -

    Ellipsoid
    ellipsoid
    -
     -
    -
    -

    FCCrystal
    fcc
    -
     -
    -
    -

    FlexCylEllipX
    flexible_cylinder_ex
    -
     -
    -
    -

    PeakGauss
    gaussian_peak
    -
     -
    -
    -

    Guinier
    guinier
    -
     -
    -
    -

    HardsphereStructure
    hardsphere
    -
     Y
    -
    -

    HayterMSAStructure
    HayterMSAsq
    -
     Y
    -
    -

    HollowCylinder
    hollow_cylinder
    -
     -
    -
    -

    Lamellar
    lamellar
    -
     -
    -
    -

    LamellarPS
    lamellarCaille
    -
     -
    -
    -

    LamellarPSHG
    lamellarCailleHG
    -
     -
    -
    -

    LamellarFFHG
    lamellarFFHG
    -
     -
    -
    -

    LamellarPCrystal
    lamellarPC
    -
     -
    -
    -

    LinearPearls
    linear_pearls
    -
     -
    -
    -

    Lorentz
    lorentz
    -
     -
    -
    -

    MassFractal
    mass_fractal
    -
     -
    -
    -

    MassSurfaceFractal
    mass_surface_fractal
    -
     -
    -
    -

    Parallelepiped
    parallelepiped
    -
     -
    -
    -

    PearlNecklace
    pearl_necklace
    -
     -
    -
    -

    Sphere
    sphere
    -
     -
    -
    -

    StarPolymer
    star_polymer
    -
     -
    -
    -

    StickyHSStructure
    stickyhardsphere
    -
     Y
    -
    -

    TriaxialEllipsoid
    triaxial_ellipsoid
    -
     -
    -
    -

    MDOC_END

## Input parameters

Parameters in boldface are required; the others are optional.

Name | Unit | Description | Default |
model_index |  | Index of the applied sasview model. Recompile instrument for changes to take effect. | 21 |
model_scale |  | Global scale factor for scattering kernel. For systems without inter-particle interference, the form factors can be related to the scattering intensity by the particle volume fraction. | 1.0 |
model_pars |  | Model parameters are given as a set of comma-separated values enclosed by {}, e.g. {60} for the model index 21 (the guinier model). Consult the sasview docs for further info. | {60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} |
model_abs | 1/m | Absorption cross section density at 2200 m/s | 0.5 |
xwidth | m | horiz. dimension of sample, as a width | 0 |
yheight | m | vert . dimension of sample, as a height for cylinder/box | 0 |
zdepth | m | depth of sample | 0 |
radius | m | Outer radius of sample in (x,z) plane for cylinder/sphere | 0 |
target_x | m | relative focus target position | 0 |
target_y | m | relative focus target position | 0 |
target_z | m | relative focus target position | 6 |
target_index | 1 | Relative index of component to focus at, e.g. next is +1 | 0 |
focus_xw | m | horiz. dimension of a rectangular area | 0 |
focus_yh | m | vert. dimension of a rectangular area | 0 |
focus_aw | deg | horiz. angular dimension of a rectangular area | 0 |
focus_ah | deg | vert. angular dimension of a rectangular area | 0 |

AT ( | , | , |  | ) RELATIVE |  |
ROTATED ( | , | , |  | ) RELATIVE |

## Links

- Source code for `SasView_model.comp`.
- http://www.sasview.org/sasview/user/models/model_functions.html

[ Identification | Description | Input parameters | Links ]