Changeset a807206 in sasmodels for sasmodels/models/hollow_cylinder.py
- Timestamp:
- Sep 30, 2016 10:42:06 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- caddb14, 5031ca3
- Parents:
- 2222134
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/hollow_cylinder.py
r58210db ra807206 39 39 40 40 In the parameters, the contrast represents SLD :sub:`shell` - SLD :sub:`solvent` 41 and the *radius* is $R_\text{shell}$ while * core_radius* is $R_\text{core}$.41 and the *radius* is $R_\text{shell}$ while *radius_core* is $R_\text{core}$. 42 42 43 43 To provide easy access to the orientation of the core-shell cylinder, we define … … 58 58 description = """ 59 59 P(q) = scale*<f*f>/Vol + background, where f is the scattering amplitude. 60 core_radius= the radius of core60 radius_core = the radius of core 61 61 radius = the radius of shell 62 62 length = the total length of the cylinder … … 70 70 parameters = [ 71 71 ["radius", "Ang", 30.0, [0, inf], "volume", "Cylinder radius"], 72 [" core_radius", "Ang", 20.0, [0, inf], "volume", "Hollow core radius"],72 ["radius_core", "Ang", 20.0, [0, inf], "volume", "Hollow core radius"], 73 73 ["length", "Ang", 400.0, [0, inf], "volume", "Cylinder length"], 74 74 ["sld", "1/Ang^2", 6.3, [-inf, inf], "sld", "Cylinder sld"], … … 82 82 83 83 # pylint: disable=W0613 84 def ER(radius, core_radius, length):84 def ER(radius, radius_core, length): 85 85 """ 86 86 :param radius: Cylinder radius 87 :param core_radius: Hollow core radius, UNUSED87 :param radius_core: Hollow core radius, UNUSED 88 88 :param length: Cylinder length 89 89 :return: Effective radius … … 99 99 return diam 100 100 101 def VR(radius, core_radius, length):101 def VR(radius, radius_core, length): 102 102 """ 103 103 :param radius: Cylinder radius 104 :param core_radius: Hollow core radius104 :param radius_core: Hollow core radius 105 105 :param length: Cylinder length 106 106 :return: Volf ratio for P(q)*S(q) 107 107 """ 108 vol_core = pi* core_radius*core_radius*length108 vol_core = pi*radius_core*radius_core*length 109 109 vol_total = pi*radius*radius*length 110 110 vol_shell = vol_total - vol_core … … 113 113 # parameters for demo 114 114 demo = dict(scale=1.0, background=0.0, length=400.0, radius=30.0, 115 core_radius=20.0, sld=6.3, sld_solvent=1, theta=90, phi=0,115 radius_core=20.0, sld=6.3, sld_solvent=1, theta=90, phi=0, 116 116 radius_pd=.2, radius_pd_n=9, 117 117 length_pd=.2, length_pd_n=10, 118 core_radius_pd=.2, core_radius_pd_n=9,118 radius_core_pd=.2, radius_core_pd_n=9, 119 119 theta_pd=10, theta_pd_n=5, 120 120 )
Note: See TracChangeset
for help on using the changeset viewer.