/*******************************************************************************
*
* Component: SasView_model
*
* %I
* Written by: Jakob Garde, Torben Nielsen, Peter Willendrup
* Date: 03.02.2016
* Origin: SasView, DTU, European Spallation Source ERIC
*
* This SANS sample exposes <a href="http://www.sasview.org">SasView's</a> scattering kernels to McStas. In this way SasView's monodisperse scattering kernels can be call from McStas.
*
* %D
* 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 <a href="http://www.sasview.org/sasview/user/models/model_functions.html#model">SasView sasmodels</a> 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
*
* <table border=1><tr><td><b>Model no.</b></td><td><b>SasView name</b></td><td><b>Parameters</b></td></tr>
* <tr><td> 0</td><td>None</td><td>None</td></tr>
* <tr><td> 1</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#barbellmodel">barbell</a></td><td>(sld, solvent_sld, bell_radius, radius, length)</td></tr>
* <tr><td> 2</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#barbellmodel">barbell_xy</a></td><td>(sld, solvent_sld, bell_radius, radius, length, theta, phi)</td></tr>
* <tr><td> 3</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#bccparacrystalmodel">bcc_paracrystal</a></td><td>(dnn, d_factor, radius, sld, solvent_sld)</td></tr>
* <tr><td> 4</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#bcc_paracrystalmodel">bcc_paracrystal_xy</a></td><td>(dnn, d_factor, radius, sld, solvent_sld, theta, phi, psi)</td></tr>
* <tr><td> 5</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#cappedcylindermodel">capped_cylinder</a></td><td>(sld, solvent_sld, radius, cap_radius, length)</td></tr>
* <tr><td> 6</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#capped_cylindermodel">capped_cylinder_xy</a></td><td>(sld, solvent_sld, radius, cap_radius, length, theta, phi)</td></tr>
* <tr><td> 7</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#coreshellcylindermodel">core_shell_cylinder</a></td><td>(core_sld, shell_sld, solvent_sld, radius, thickness, length)</td></tr>
* <tr><td> 8</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#core_shell_cylindermodel">core_shell_cylinder_xy</a></td><td>(core_sld, shell_sld, solvent_sld, radius, thickness, length, theta, phi)</td></tr>
* <tr><td> 9</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#cylindermodel">cylinder</a></td><td>(sld, solvent_sld, radius, length)</td></tr>
* <tr><td>10</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#cylindermodel">cylinder_xy</a></td><td>(sld, solvent_sld, radius, length, theta, phi)</td></tr>
* <tr><td>11</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#dabmodel">dab</a></td><td>(length)</td></tr>
* <tr><td>12</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#dabmodel">dab_xy</a></td><td>(length)</td></tr>
* <tr><td>13</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#ellipsoidmodel">ellipsoid</a></td><td>(sld, solvent_sld, rpolar, requatorial)</td></tr>
* <tr><td>14</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#ellipsoidmodel">ellipsoid_xy</a></td><td>(sld, solvent_sld, rpolar, requatorial, theta, phi)</td></tr>
* <tr><td>15</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#fccparacrystalmodel">fcc_paracrystal</a></td><td>(dnn, d_factor, radius, sld, solvent_sld)</td></tr>
* <tr><td>16</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#fcc_paracrystalmodel">fcc_paracrystal_xy</a></td><td>(dnn, d_factor, radius, sld, solvent_sld, theta, phi, psi)</td></tr>
* <tr><td>17</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#flexiblecylinderexmodel">flexible_cylinder_ex</a></td><td>(length, kuhn_length, radius, axis_ratio, sld, solvent_sld)</td></tr>
* <tr><td>18</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#flexible_cylinder_exmodel">flexible_cylinder_ex_xy</a></td><td>(length, kuhn_length, radius, axis_ratio, sld, solvent_sld)</td></tr>
* <tr><td>19</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#gaussianpeakmodel">gaussian_peak</a></td><td>(q0, sigma)</td></tr>
* <tr><td>20</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#gaussian_peakmodel">gaussian_peak_xy</a></td><td>(q0, sigma)</td></tr>
* <tr><td>21</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#guiniermodel">guinier</a></td><td>(rg)</td></tr>
* <tr><td>22</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#guiniermodel">guinier_xy</a></td><td>(rg)</td></tr>
* <tr><td>23</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#hardspheremodel">hardsphere</a></td><td>(effect_radius, volfraction)</td></tr>
* <tr><td>24</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#hardspheremodel">hardsphere_xy</a></td><td>(effect_radius, volfraction)</td></tr>
* <tr><td>25</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#HayterMSAsqmodel">HayterMSAsq</a></td><td>(effect_radius, zz, VolFrac, Temp, csalt, dialec)</td></tr>
* <tr><td>26</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#HayterMSAsqmodel">HayterMSAsq_xy</a></td><td>(effect_radius, charge, volfraction, temperature, saltconc, dielectconst)</td></tr>
* <tr><td>27</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#hollowcylindermodel">hollow_cylinder</a></td><td>(radius, core_radius, length, sld, solvent_sld)</td></tr>
* <tr><td>28</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#hollow_cylindermodel">hollow_cylinder_xy</a></td><td>(radius, core_radius, length, sld, solvent_sld, theta, phi)</td></tr>
* <tr><td>29</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lamellarmodel">lamellar</a></td><td>(sld, solvent_sld, thickness)</td></tr>
* <tr><td>30</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lamellarmodel">lamellar_xy</a></td><td>(sld, solvent_sld, thickness)</td></tr>
* <tr><td>31</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lamellarFFHGmodel">lamellar_FFHG</a></td><td>(tail_length, head_length, sld, head_sld, solvent_sld)</td></tr>
* <tr><td>32</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lamellar_FFHGmodel">lamellar_FFHG_xy</a></td><td>(tail_length, head_length, sld, head_sld, solvent_sld)</td></tr>
* <tr><td>33</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lamellarCailleHGmodel">lamellarCailleHG</a></td><td>(tail_length, head_length, Nlayers, dd, Cp, tail_sld, head_sld, solvent_sld)</td></tr>
* <tr><td>34</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lamellarCailleHGmodel">lamellarCailleHG_xy</a></td><td>(tail_length, head_length, Nlayers, spacing, Caille_parameter, sld, head_sld, solvent_sld)</td></tr>
* <tr><td>35</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lamellarPCmodel">lamellarPC</a></td><td>(th, Nlayers, davg, pd, sld, solvent_sld)</td></tr>
* <tr><td>36</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lamellarPCmodel">lamellarPC_xy</a></td><td>(thickness, Nlayers, spacing, spacing_polydisp, sld, solvent_sld)</td></tr>
* <tr><td>37</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lamellarPSmodel">lamellarPS</a></td><td>(del, Nlayers, dd, Cp, sld, solvent_sld)</td></tr>
* <tr><td>38</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lamellarPSmodel">lamellarPS_xy</a></td><td>(thickness, Nlayers, spacing, Caille_parameter, sld, solvent_sld)</td></tr>
* <tr><td>39</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#linearpearlsmodel">linear_pearls</a></td><td>(radius, edge_sep, num_pearls, pearl_sld, solvent_sld)</td></tr>
* <tr><td>40</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#linear_pearlsmodel">linear_pearls_xy</a></td><td>(radius, edge_sep, num_pearls, pearl_sld, solvent_sld)</td></tr>
* <tr><td>41</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lorentzmodel">lorentz</a></td><td>(cor_length)</td></tr>
* <tr><td>42</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lorentzmodel">lorentz_xy</a></td><td>(cor_length)</td></tr>
* <tr><td>43</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#massfractalmodel">mass_fractal</a></td><td>(radius, mass_dim, cutoff_length)</td></tr>
* <tr><td>44</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#mass_fractalmodel">mass_fractal_xy</a></td><td>(radius, mass_dim, cutoff_length)</td></tr>
* <tr><td>45</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#masssurfacefractalmodel">mass_surface_fractal</a></td><td>(mass_dim, surface_dim, cluster_rg, primary_rg)</td></tr>
* <tr><td>46</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#mass_surface_fractalmodel">mass_surface_fractal_xy</a></td><td>(mass_dim, surface_dim, cluster_rg, primary_rg)</td></tr>
* <tr><td>47</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#parallelepipedmodel">parallelepiped</a></td><td>(sld, solvent_sld, a_side, b_side, c_side)</td></tr>
* <tr><td>48</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#parallelepipedmodel">parallelepiped_xy</a></td><td>(sld, solvent_sld, a_side, b_side, c_side, theta, phi, psi)</td></tr>
* <tr><td>49</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#pearlnecklacemodel">pearl_necklace</a></td><td>(radius, edge_separation, string_thickness, number_of_pearls, sld, string_sld, solvent_sld)</td></tr>
* <tr><td>50</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#pearl_necklacemodel">pearl_necklace_xy</a></td><td>(radius, edge_separation, string_thickness, number_of_pearls, sld, string_sld, solvent_sld)</td></tr>
* <tr><td>51</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#spheremodel">sphere</a></td><td>(sld, solvent_sld, radius)</td></tr>
* <tr><td>52</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#spheremodel">sphere_xy</a></td><td>(sld, solvent_sld, radius)</td></tr>
* <tr><td>53</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#starpolymermodel">star_polymer</a></td><td>(radius2, arms)</td></tr>
* <tr><td>54</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#star_polymermodel">star_polymer_xy</a></td><td>(radius2, arms)</td></tr>
* <tr><td>55</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#stickyhardspheremodel">stickyhardsphere</a></td><td>(effect_radius, volfraction, perturb, stickiness)</td></tr>
* <tr><td>56</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#stickyhardspheremodel">stickyhardsphere_xy</a></td><td>(effect_radius, volfraction, perturb, stickiness)</td></tr>
* <tr><td>57</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#triaxialellipsoidmodel">triaxial_ellipsoid</a></td><td>(sld, solvent_sld, req_minor, req_major, rpolar)</td></tr>
* <tr><td>58</td><td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#triaxial_ellipsoidmodel">triaxial_ellipsoid_xy</a></td><td>(sld, solvent_sld, req_minor, req_major, rpolar, theta, phi, psi)</td></tr>
* </table>
* <!DOCTYPE html>
* <html>
* <body>
* <p><font size="24">Available SasView sasmodels - Extended parameters description</font></p>
* <table border=1>
*   <tr>
*      <td>sasmodels name</td>
*      <td>Parameters </td>
*      <td>Units</td>
*      <td>Range</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#barbellmodel">barbell</a></td>
*      <td> { 4, 1, 40, 20, 400 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#barbellmodel">barbell_xy</a></td>
*      <td> { 4, 1, 40, 20, 400, 60, 60 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Barbell scattering length density</td>
*      <td>4e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Solvent scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Spherical bell radius</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Cylindrical bar radius</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Cylinder bar length</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>In plane angle</td>
*      <td>degrees</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Out of plane angle</td>
*      <td>degrees</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#bccrystalmodel">bcc</a></td>
*      <td> { 220, 0.06, 40, 4, 1 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#bccrystalmodel">bcc_xy</a></td>
*      <td> { 220, 0.06, 40, 4, 1, 60, 60, 60 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Nearest neighbour distance</td>
*      <td>Ang</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Paracrystal distortion factor</td>
*      <td>&nbsp;</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Particle radius</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Particle scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Solvent scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>In plane angle</td>
*      <td>degrees</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Out of plane angle</td>
*      <td>degrees</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Out of plane angle</td>
*      <td>degrees</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#cappedcylindermodel">capped_cylinder</a></td>
*      <td> { 4, 1, 20, 20, 400 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#cappedcylindermodel">capped_cylinder_xy</a></td>
*      <td> { 4, 1, 20, 20, 400, 60, 60 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Cylinder scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Solvent scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Cylinder radius</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Cap radius</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Cylinder length</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>In plane angle</td>
*      <td>degrees</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Out of plane angle</td>
*      <td>degrees</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#coreshellcylindermodel">core_shell_cylinder</a></td>
*      <td> { 4, 4, 1, 20, 20, 400 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#coreshellcylindermodel">core_shell_cylinder_xy</a></td>
*      <td> { 4, 4, 1, 20, 20, 400, 60, 60 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Cylinder core scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Cylinder shell scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Solvent scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Cylinder core radius</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Cylinder shell thickness</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Cylinder length</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>In plane angle</td>
*      <td>degrees</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Out of plane angle</td>
*      <td>degrees</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#cylindermodel">cylinder</a></td>
*      <td> { 4, 1, 20, 400 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#cylindermodel">cylinder_xy</a></td>
*      <td> { 4, 1, 20, 400, 60, 60 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Cylinder scattering length density</td>
*      <td>4e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Solvent scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Cylinder radius</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Cylinder length</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>In plane angle</td>
*      <td>degrees</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Out of plane angle</td>
*      <td>degrees</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#dabmodel">dab</a></td>
*      <td> { 50.0 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#dabmodel">dab_xy</a></td>
*      <td> { 50.0 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>correlation length</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#ellipsoidmodel">ellipsoid</a></td>
*      <td> { 4, 1, 20, 400 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#ellipsoidmodel">ellipsoid_xy</a></td>
*      <td> { 4, 1, 20, 400, 60, 60 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Ellipsoid scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Solvent scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Polar radius</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Equatorial radius</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>In plane angle</td>
*      <td>degrees</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Out of plane angle</td>
*      <td>degrees</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#fccrystalmodel">fcc</a></td>
*      <td> { 220, 0.06, 40, 4, 1 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#fccrystalmodel">fcc_xy</a></td>
*      <td> { 220, 0.06, 40, 4, 1, 60, 60, 60 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Nearest neighbour distance</td>
*      <td>Ang</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Paracrystal distortion factor</td>
*      <td>&nbsp;</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Particle radius</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Particle scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Solvent scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>In plane angle</td>
*      <td>degrees</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Out of plane angle</td>
*      <td>degrees</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Out of plane angle</td>
*      <td>degrees</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#flexiblecylinderexmodel">flexible_cylinder_ex</a></td>
*      <td> { 1000.0, 100.0, 20.0, 1.5, 1.0, 6.3 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#flexiblecylinderexmodel">flexible_cylinder_ex_xy</a></td>
*      <td> { 1000.0, 100.0, 20.0, 1.5, 1.0, 6.3 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Length of the flexible cylinder</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Kuhn length of the flexible cylinder</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Radius of the flexible cylinder</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Axis_ratio (major_radius/radius</td>
*      <td>&nbsp;</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Cylinder scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Solvent scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#peakgaussmodel">gaussian_peak</a></td>
*      <td> { 0.05, 0.005 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#peakgaussmodel">gaussian_peak_xy</a></td>
*      <td> { 0.05, 0.005 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Peak position</td>
*      <td>1/Ang</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Peak width (standard deviation)</td>
*      <td>1/Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#guiniermodel">guinier</a></td>
*      <td> { 60.0 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#guiniermodel">guinier_xy</a></td>
*      <td> { 60.0 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Radius of Gyration</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#hardspheremodel">hardsphere</a></td>
*      <td> { 50.0, 0.2 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#hardspheremodel">hardsphere_xy</a></td>
*      <td> { 50.0, 0.2 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>effective radius of hard sphere</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>volume fraction of hard spheres</td>
*      <td>&nbsp;</td>
*      <td>[0, 0.74]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#HayterMSAsqmodel">HayterMSAsq</a></td>
*      <td> { 20.75, 19.0, 0.0192, 318.16, 0.0, 71.08 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#HayterMSAsqmodel">HayterMSAsq_xy</a></td>
*      <td> { 20.75, 19.0, 0.0192, 318.16, 0.0, 71.08 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>effective radius of hard sphere</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>charge on sphere (in electrons)</td>
*      <td>e</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>volume fraction of spheres</td>
*      <td>&nbsp;</td>
*      <td>[0, 0.74]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>temperature, in Kelvin, for Debye length calculation</td>
*      <td>K</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>conc of salt, 1:1 electolyte, for Debye length</td>
*      <td>M</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>dielectric constant of solvent (default water), for Debye length</td>
*      <td>&nbsp;</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#hollowcylindermodel">hollow_cylinder</a></td>
*      <td> { 30.0, 20.0, 400.0, 6.3, 1 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#hollowcylindermodel">hollow_cylinder_xy</a></td>
*      <td> { 30.0, 20.0, 400.0, 6.3, 1, 90, 0 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Cylinder radius</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Hollow core radius</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Cylinder length</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Cylinder sld</td>
*      <td>1/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Solvent sld</td>
*      <td>1/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Theta angle</td>
*      <td>degrees</td>
*      <td>[-360, 360]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Phi angle</td>
*      <td>degrees</td>
*      <td>[-360, 360]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lamellarmodel">lamellar</a></td>
*      <td> { 1, 6, 50 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lamellarmodel">lamellar_xy</a></td>
*      <td> { 1, 6, 50 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Layer scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Solvent scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Bilayer thickness</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lamellarCaillemodel">lamellarCaille</a></td>
*      <td> { 30.0, 20, 400.0, 0.1, 6.3, 1.0 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lamellarCaillemodel">lamellarCaille_xy</a></td>
*      <td> { 30.0, 20, 400.0, 0.1, 6.3, 1.0 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>sheet thickness</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Number of layers</td>
*      <td>&nbsp;</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>d-spacing of Caille S(Q)</td>
*      <td>Ang</td>
*      <td>[0.0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Caille parameter</td>
*      <td>1/Ang^2</td>
*      <td>[0.0, 0.8]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>layer scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Solvent scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lamellarCailleHGmodel">lamellarCailleHG</a></td>
*      <td> { 10, 2, 30, 40.0, 0.001, 0.4, 2.0, 6 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lamellarCailleHGmodel">lamellarCailleHG_xy</a></td>
*      <td> { 10, 2, 30, 40.0, 0.001, 0.4, 2.0, 6 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Tail thickness</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>head thickness</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Number of layers</td>
*      <td>&nbsp;</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>d-spacing of Caille S(Q)</td>
*      <td>Ang</td>
*      <td>[0.0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Caille parameter</td>
*      <td>&nbsp;</td>
*      <td>[0.0, 0.8]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Tail scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Head scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Solvent scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lamellarFFHGmodel">lamellarFFHG</a></td>
*      <td> { 15, 10, 0.4, 3.0, 6 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lamellarFFHGmodel">lamellarFFHG_xy</a></td>
*      <td> { 15, 10, 0.4, 3.0, 6 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Tail thickness</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>head thickness</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Tail scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Head scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Solvent scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lamellarPCmodel">lamellarPC</a></td>
*      <td> { 33.0, 20, 250.0, 0.0, 1.0, 6.34 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lamellarPCmodel">lamellarPC_xy</a></td>
*      <td> { 33.0, 20, 250.0, 0.0, 1.0, 6.34 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>sheet thickness</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Number of layers</td>
*      <td>&nbsp;</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>d-spacing of paracrystal stack</td>
*      <td>Ang</td>
*      <td>[0.0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>d-spacing polydispersity</td>
*      <td>Ang</td>
*      <td>[0.0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>layer scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Solvent scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#linearpearlsmodel">linear_pearls</a></td>
*      <td> { 80.0, 350.0, 3.0, 1.0, 6.3 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#linearpearlsmodel">linear_pearls_xy</a></td>
*      <td> { 80.0, 350.0, 3.0, 1.0, 6.3 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Radius of the pearls</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Length of the string segment - surface to surface</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Number of the pearls</td>
*      <td>&nbsp;</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>SLD of the pearl spheres</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>SLD of the solvent</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lorentzmodel">lorentz</a></td>
*      <td> { 50.0 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#lorentzmodel">lorentz_xy</a></td>
*      <td> { 50.0 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Screening length</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#massfractalmodel">mass_fractal</a></td>
*      <td> { 10.0, 1.9, 100.0 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#massfractalmodel">mass_fractal_xy</a></td>
*      <td> { 10.0, 1.9, 100.0 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Particle radius</td>
*      <td>Ang</td>
*      <td>[0.0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Mass fractal dimension</td>
*      <td>&nbsp;</td>
*      <td>[1.0, 6.0]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Cut-off length</td>
*      <td>Ang</td>
*      <td>[0.0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#masssurfacefractalmodel">mass_surface_fractal</a></td>
*      <td> { 1.8, 2.3, 86.7, 4000.0 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#masssurfacefractalmodel">mass_surface_fractal_xy</a></td>
*      <td> { 1.8, 2.3, 86.7, 4000.0 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Mass fractal dimension</td>
*      <td>&nbsp;</td>
*      <td>[1e-16, 6.0]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Surface fractal dimension</td>
*      <td>&nbsp;</td>
*      <td>[1e-16, 6.0]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Cluster radius of gyration</td>
*      <td>Ang</td>
*      <td>[0.0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Primary particle radius of gyration</td>
*      <td>Ang</td>
*      <td>[0.0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#parallelepipedmodel">parallelepiped</a></td>
*      <td> { 4, 1, 35, 75, 400 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#parallelepipedmodel">parallelepiped_xy</a></td>
*      <td> { 4, 1, 35, 75, 400, 60, 60, 60 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parallelepiped scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Solvent scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Shorter side of the parallelepiped</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Second side of the parallelepiped</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Larger side of the parallelepiped</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>In plane angle</td>
*      <td>degrees</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Out of plane angle</td>
*      <td>degrees</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Rotation angle around its own c axis against q plane</td>
*      <td>degrees</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#pearlnecklacemodel">pearl_necklace</a></td>
*      <td> { 80.0, 350.0, 2.5, 3, 1.0, 1.0, 6.3 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#pearlnecklacemodel">pearl_necklace_xy</a></td>
*      <td> { 80.0, 350.0, 2.5, 3, 1.0, 1.0, 6.3 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Mean radius of the chained spheres</td>
*      <td>Angstrom</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Mean separation of chained particles</td>
*      <td>Angstrom</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Thickness of the chain linkage</td>
*      <td>Angstrom</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Mean number of pearls in each necklace</td>
*      <td>none</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Scattering length density of the chained spheres</td>
*      <td>Angstrom^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Scattering length density of the chain linkage</td>
*      <td>Angstrom^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Scattering length density of the solvent</td>
*      <td>Angstrom^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#spheremodel">sphere</a></td>
*      <td> { 1, 6, 50 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#spheremodel">sphere_xy</a></td>
*      <td> { 1, 6, 50 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Layer scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Solvent scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Sphere radius</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#starpolymermodel">star_polymer</a></td>
*      <td> { 100.0, 3 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#starpolymermodel">star_polymer_xy</a></td>
*      <td> { 100.0, 3 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Ensemble radius of gyration squared of an arm</td>
*      <td>Ang</td>
*      <td>[0.0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Number of arms in the model</td>
*      <td>&nbsp;</td>
*      <td>[1.0, 6.0]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#stickyhardspheremodel">stickyhardsphere</a></td>
*      <td> { 50.0, 0.2, 0.05, 0.2 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#stickyhardspheremodel">stickyhardsphere_xy</a></td>
*      <td> { 50.0, 0.2, 0.05, 0.2 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>effective radius of hard sphere</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>volume fraction of hard spheres</td>
*      <td>&nbsp;</td>
*      <td>[0, 0.74]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>perturbation parameter, epsilon</td>
*      <td>&nbsp;</td>
*      <td>[0.01, 0.1]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>stickiness, tau</td>
*      <td>&nbsp;</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#triaxialellipsoidmodel">triaxial_ellipsoid</a></td>
*      <td> { 4, 1, 20, 400, 10 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td><a href="http://www.sasview.org/sasview/user/models/model_functions.html#triaxialellipsoidmodel">triaxial_ellipsoid_xy</a></td>
*      <td> { 4, 1, 20, 400, 10, 60, 60, 60 }</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Parameters:</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Ellipsoid scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Solvent scattering length density</td>
*      <td>1e-6/Ang^2</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Minor equitorial radius</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Major equatorial radius</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Polar radius</td>
*      <td>Ang</td>
*      <td>[0, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>In plane angle</td>
*      <td>degrees</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Out of plane angle</td>
*      <td>degrees</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>Out of plane angle</td>
*      <td>degrees</td>
*      <td>[-inf, inf]</td>
*   </tr>
*   <tr>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*      <td>&nbsp;</td>
*   </tr>
* </table>
* <p> </p>
* <p> </p>
* <p><font size="24">Name convention: SasView  - sasmodels </font></p>
* <table border=1>
*   <tr>
*      <td>SasView name</td>
*      <td>sasmodels name </td>
*      <td>P(Q) </td>
*      <td>S(Q)</td>
*      <td>Multiply</td>
*      <td>Multiplicity</td>
*   </tr>
*   <tr>
*      <td>BarBell</td>
*      <td>barbell </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>BCCrystal</td>
*      <td>bcc </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>CappedCylinder</td>
*      <td>capped_cylinder </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>CoreShellCylinder</td>
*      <td>core_shell_cylinder </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>Cylinder</td>
*      <td>cylinder </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>DAB</td>
*      <td>dab </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>Ellipsoid</td>
*      <td>ellipsoid </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>FCCrystal</td>
*      <td>fcc </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>FlexCylEllipX</td>
*      <td>flexible_cylinder_ex </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>PeakGauss</td>
*      <td>gaussian_peak </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>Guinier</td>
*      <td>guinier </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>HardsphereStructure</td>
*      <td>hardsphere </td>
*      <td>- </td>
*      <td> Y </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>HayterMSAStructure</td>
*      <td>HayterMSAsq </td>
*      <td>- </td>
*      <td> Y </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>HollowCylinder</td>
*      <td>hollow_cylinder </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>Lamellar</td>
*      <td>lamellar </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>LamellarPS</td>
*      <td>lamellarCaille </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>LamellarPSHG</td>
*      <td>lamellarCailleHG </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>LamellarFFHG</td>
*      <td>lamellarFFHG </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>LamellarPCrystal</td>
*      <td>lamellarPC </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>LinearPearls</td>
*      <td>linear_pearls </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>Lorentz</td>
*      <td>lorentz </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>MassFractal</td>
*      <td>mass_fractal </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>MassSurfaceFractal</td>
*      <td>mass_surface_fractal </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>Parallelepiped</td>
*      <td>parallelepiped </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>PearlNecklace</td>
*      <td>pearl_necklace </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>Sphere</td>
*      <td>sphere </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>StarPolymer</td>
*      <td>star_polymer </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>StickyHSStructure</td>
*      <td>stickyhardsphere </td>
*      <td>- </td>
*      <td> Y </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
*   <tr>
*      <td>TriaxialEllipsoid</td>
*      <td>triaxial_ellipsoid </td>
*      <td>- </td>
*      <td> - </td>
*      <td>-</td>
*      <td>-</td>
*   </tr>
* </table>
* </body>
* </html>
* MDOC_END
*
* %P
* Definition parameters:
*
* model_index: []    Index of the applied sasview model. Recompile instrument for changes to take effect.
* 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.
* 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.
* model_abs: [1/m]   Absorption cross section density at 2200 m/s
*
* Input parameters:
*
* radius: [m]        Outer radius of sample in (x,z) plane for cylinder/sphere
* xwidth: [m]        horiz. dimension of sample, as a width
* yheight: [m]       vert . dimension of sample, as a height for cylinder/box
* zdepth: [m]        depth of sample
* target_index: [1]  Relative index of component to focus at, e.g. next is +1
* focus_xw: [m]      horiz. dimension of a rectangular area
* focus_yh: [m]      vert.  dimension of a rectangular area
* focus_aw: [deg]    horiz. angular dimension of a rectangular area
* focus_ah: [deg]    vert.  angular dimension of a rectangular area
* focus_r: [m]       Detector (disk-shaped) radius
*
* Optional parameters:
*
* target_x: [m]      relative focus target position
* target_y: [m]      relative focus target position
* target_z: [m]      relative focus target position
*
* Variables calculated in the component:
*
* my_s:         Attenuation factor due to scattering [m^-1]
* my_a:         Attenuation factor due to absorbtion [m^-1]
*
* %Link
* http://www.sasview.org/sasview/user/models/model_functions.html
*
* %E
*******************************************************************************/

DEFINE COMPONENT SasView_model

DEFINITION PARAMETERS ()

SETTING PARAMETERS (
  model_index=21,
  model_scale=1.0,
  vector model_pars={60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  model_abs=0.5,
  xwidth=0,
  yheight=0,
  zdepth=0,
  radius=0,
  target_x=0,
  target_y=0,
  target_z=6,
  int target_index=0,
  focus_xw=0,
  focus_yh=0,
  focus_aw=0,
  focus_ah=0,
  focus_r=0)

OUTPUT PARAMETERS ()
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */



SHARE %{
  %include "sasview_proxy.c"
%}

DECLARE
%{
  double shape;
  double my_a_v;
  double modelpars[15];
%}

INITIALIZE
%{
  
int chosen=model_index;
#ifndef SASmodel_index
  exit(fprintf(stderr, "SasView_model: %s: Your instrument was compiled without the define -DSASmodel_index \n"
	       "ERROR Please recompile your instrument with -DSASmodel_index=%i to enable model_index=%i.\n", NAME_CURRENT_COMP, chosen, chosen));
#else
  if (!(SASmodel_index==model_index)) {
      exit(fprintf(stderr, "SasView_model: %s: Your instrument was compiled with -DSASmodel_index=%i \n"
		   "ERROR Please recompile your instrument with -DSASmodel_index=%i to enable model_index=%i\n", NAME_CURRENT_COMP, SASmodel_index, chosen, chosen));

// int SASmodel_index=model_index;  
}
#endif
  
shape=-1;  /* -1:no shape, 0:cyl, 1:box, 2:sphere  */
if (xwidth && yheight && zdepth)
    shape=1;
  else if (radius > 0 && yheight)
    shape=0;
  else if (radius > 0 && !yheight)
    shape=2;
  if (shape < 0)
    exit(fprintf(stderr, "SasView_model: %s: sample has invalid dimensions.\n"
                         "ERROR     Please check parameter values.\n", NAME_CURRENT_COMP));

  /* now compute target coords if a component index is supplied */
  if (!target_index && !target_x && !target_y && !target_z) target_index=1;
  if (target_index)
  {
    Coords ToTarget;
    ToTarget = coords_sub(POS_A_COMP_INDEX(INDEX_CURRENT_COMP+target_index),POS_A_CURRENT_COMP);
    ToTarget = rot_apply(ROT_A_CURRENT_COMP, ToTarget);
    coords_get(ToTarget, &target_x, &target_y, &target_z);
  }

  if (!(target_x || target_y || target_z)) {
    printf("SasView_model: %s: The target is not defined. Using direct beam (Z-axis).\n",
      NAME_CURRENT_COMP);
    target_z=1;
  }

  my_a_v = model_abs*2200*100; /* Is not yet divided by v. 100: Convert barns -> fm^2 */
  int j;
  for(j=0;j<15;j++){
    modelpars[j]=model_pars[j];
  }


%}

TRACE
%{
  double t0, t1, v, l_full, l, l_1, dt, d_phi, theta, my_s;
  double aim_x=0, aim_y=0, aim_z=1, axis_x, axis_y, axis_z;
  double arg, tmp_vx, tmp_vy, tmp_vz, vout_x, vout_y, vout_z;
  double f, solid_angle, vx_i, vy_i, vz_i, q, qx, qy, qz;
  char intersect=0;

  /* Intersection neutron trajectory / sample (sample surface) */
  if (shape == 0)
    intersect = cylinder_intersect(&t0, &t1, x, y, z, vx, vy, vz, radius, yheight);
  else if (shape == 1)
    intersect = box_intersect(&t0, &t1, x, y, z, vx, vy, vz, xwidth, yheight, zdepth);
  else if (shape == 2)
    intersect = sphere_intersect(&t0, &t1, x, y, z, vx, vy, vz, radius);
  if(intersect)
  {
    if(t0 < 0)
      ABSORB;

    /* Neutron enters at t=t0. */
    v = sqrt(vx*vx + vy*vy + vz*vz);
    l_full = v * (t1 - t0);          /* Length of full path through sample */
    dt = rand01()*(t1 - t0) + t0;    /* Time of scattering */
    PROP_DT(dt);                     /* Point of scattering */
    l = v*(dt-t0);                   /* Penetration in sample */

    vx_i=vx;
    vy_i=vy;
    vz_i=vz;
    if ((target_x || target_y || target_z)) {
      aim_x = target_x-x;            /* Vector pointing at target (anal./det.) */
      aim_y = target_y-y;
      aim_z = target_z-z;
    }
    if(focus_aw && focus_ah) {
      randvec_target_rect_angular(&vx, &vy, &vz, &solid_angle,
        aim_x, aim_y, aim_z, focus_aw, focus_ah, ROT_A_CURRENT_COMP);
    } else if(focus_xw && focus_yh) {
      randvec_target_rect(&vx, &vy, &vz, &solid_angle,
        aim_x, aim_y, aim_z, focus_xw, focus_yh, ROT_A_CURRENT_COMP);
    } else {
      randvec_target_circle(&vx, &vy, &vz, &solid_angle, aim_x, aim_y, aim_z, focus_r);
    }
    NORM(vx, vy, vz);
    vx *= v;
    vy *= v;
    vz *= v;
    qx = V2K*(vx_i-vx);
    qy = V2K*(vy_i-vy);
    qz = V2K*(vz_i-vz);
    q = sqrt(qx*qx+qy*qy+qz*qz);

    float Iq_out;
    Iq_out = getIq(q, qx, qy, modelpars);

    float vol;
    vol=getFormVol(modelpars);
    // Scale by 1.0E2 [SasView: 1/cm  ->   McStas: 1/m]
    Iq_out = model_scale*Iq_out / vol * 1.0E2;

    l_1 = v*t1;
    p *= l_full*solid_angle/(4*PI)*Iq_out*exp(-my_a_v*(l+l_1)/v);

    SCATTER;
  }
%}

MCDISPLAY
%{

  if (shape == 0) {	/* cylinder */
    circle("xz", 0,  yheight/2.0, 0, radius);
    circle("xz", 0, -yheight/2.0, 0, radius);
    line(-radius, -yheight/2.0, 0, -radius, +yheight/2.0, 0);
    line(+radius, -yheight/2.0, 0, +radius, +yheight/2.0, 0);
    line(0, -yheight/2.0, -radius, 0, +yheight/2.0, -radius);
    line(0, -yheight/2.0, +radius, 0, +yheight/2.0, +radius);
  }
  else if (shape == 1) { 	/* box */
    double xmin = -0.5*xwidth;
    double xmax =  0.5*xwidth;
    double ymin = -0.5*yheight;
    double ymax =  0.5*yheight;
    double zmin = -0.5*zdepth;
    double zmax =  0.5*zdepth;
    multiline(5, xmin, ymin, zmin,
                 xmax, ymin, zmin,
                 xmax, ymax, zmin,
                 xmin, ymax, zmin,
                 xmin, ymin, zmin);
    multiline(5, xmin, ymin, zmax,
                 xmax, ymin, zmax,
                 xmax, ymax, zmax,
                 xmin, ymax, zmax,
                 xmin, ymin, zmax);
    line(xmin, ymin, zmin, xmin, ymin, zmax);
    line(xmax, ymin, zmin, xmax, ymin, zmax);
    line(xmin, ymax, zmin, xmin, ymax, zmax);
    line(xmax, ymax, zmin, xmax, ymax, zmax);
  }
  else if (shape == 2) {	/* sphere */
    circle("xy", 0,  0.0, 0, radius);
    circle("xz", 0,  0.0, 0, radius);
    circle("yz", 0,  0.0, 0, radius);
  }
%}
END
