Changeset 728136f in sasmodels
- Timestamp:
- Mar 21, 2016 8:38:04 AM (9 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:
- aad336c
- Parents:
- 02a0920 (diff), e42b0b9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- sasmodels/models
- Files:
-
- 2 edited
- 6 moved
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/spherical_sld.py
r8ad9619 re42b0b9 13 13 Exemplary SLD profile 14 14 15 Unlike the OnionExpShellModel (using an analytical integration),15 Unlike the <onion> model (using an analytical integration), 16 16 the interfacial layers here are sub-divided and numerically integrated assuming each of the sub-layers are described 17 17 by a line function. The number of the sub-layer can be given by users by setting the integer values of npts_inter. … … 170 170 # pylint: disable=bad-whitespace, line-too-long 171 171 # ["name", "units", default, [lower, upper], "type", "description"], 172 parameters = [["n_shells", "", 1, [0, 9], "", "number of shells"], 173 ["thick_inter_0", "Ang", 50, [-inf, inf], "", "intern layer thickness"], 174 ["func_inter_0", "", 0, [0, 4], "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 175 ["core0_sld", "1e-6/Ang^2", 2.07, [-inf, inf], "", "sld function flat"], 176 ["solvent_sld", "1e-6/Ang^2", 1.0, [-inf, inf], "", "sld function solvent"], 177 ["flat1_sld", "1e-6/Ang^2", 4.06, [-inf, inf], "", "sld function flat"], 178 ["flat2_sld", "1e-6/Ang^2", 3.5, [-inf, inf], "", "sld function flat"], 179 ["flat3_sld", "1e-6/Ang^2", 4.06, [-inf, inf], "", "sld function flat"], 180 ["flat4_sld", "1e-6/Ang^2", 3.5, [-inf, inf], "", "sld function flat"], 181 ["flat5_sld", "1e-6/Ang^2", 4.06, [-inf, inf], "", "sld function flat"], 182 ["flat6_sld", "1e-6/Ang^2", 3.5, [-inf, inf], "", "sld function flat"], 183 ["flat7_sld", "1e-6/Ang^2", 4.06, [-inf, inf], "", "sld function flat"], 184 ["flat8_sld", "1e-6/Ang^2", 3.5, [-inf, inf], "", "sld function flat"], 185 ["flat9_sld", "1e-6/Ang^2", 4.06, [-inf, inf], "", "sld function flat"], 186 ["flat10_sld", "1e-6/Ang^2", 3.5, [-inf, inf], "", "sld function flat"], 187 ["thick_inter_1", "Ang", 50.0, [0, inf], "", "intern layer thickness"], 188 ["thick_inter_2", "Ang", 50.0, [0, inf], "", "intern layer thickness"], 189 ["thick_inter_3", "Ang", 50.0, [0, inf], "", "intern layer thickness"], 190 ["thick_inter_4", "Ang", 50.0, [0, inf], "", "intern layer thickness"], 191 ["thick_inter_5", "Ang", 50.0, [0, inf], "", "intern layer thickness"], 192 ["thick_inter_6", "Ang", 50.0, [0, inf], "", "intern layer thickness"], 193 ["thick_inter_7", "Ang", 50.0, [0, inf], "", "intern layer thickness"], 194 ["thick_inter_8", "Ang", 50.0, [0, inf], "", "intern layer thickness"], 195 ["thick_inter_9", "Ang", 50.0, [0, inf], "", "intern layer thickness"], 196 ["thick_inter_10", "Ang", 50.0, [0, inf], "", "intern layer thickness"], 197 ["thick_flat_1", "Ang", 100.0, [0, inf], "", "flat layer_thickness"], 198 ["thick_flat_2", "Ang", 100.0, [0, inf], "", "flat layer_thickness"], 199 ["thick_flat_3", "Ang", 100.0, [0, inf], "", "flat layer_thickness"], 200 ["thick_flat_4", "Ang", 100.0, [0, inf], "", "flat layer_thickness"], 201 ["thick_flat_5", "Ang", 100.0, [0, inf], "", "flat layer_thickness"], 202 ["thick_flat_6", "Ang", 100.0, [0, inf], "", "flat layer_thickness"], 203 ["thick_flat_7", "Ang", 100.0, [0, inf], "", "flat layer_thickness"], 204 ["thick_flat_8", "Ang", 100.0, [0, inf], "", "flat layer_thickness"], 205 ["thick_flat_9", "Ang", 100.0, [0, inf], "", "flat layer_thickness"], 206 ["thick_flat_10", "Ang", 100.0, [0, inf], "", "flat layer_thickness"], 207 ["func_inter_1", "", 0, [0, 4], "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 208 ["func_inter_2", "", 0, [0, 4], "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 209 ["func_inter_3", "", 0, [0, 4], "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 210 ["func_inter_4", "", 0, [0, 4], "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 211 ["func_inter_5", "", 0, [0, 4], "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 212 ["func_inter_6", "", 0, [0, 4], "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 213 ["func_inter_7", "", 0, [0, 4], "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 214 ["func_inter_8", "", 0, [0, 4], "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 215 ["func_inter_9", "", 0, [0, 4], "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 216 ["func_inter_10", "", 0, [0, 4], "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 217 ["nu_inter_1", "", 2.5, [-inf, inf], "", "steepness parameter"], 218 ["nu_inter_2", "", 2.5, [-inf, inf], "", "steepness parameter"], 219 ["nu_inter_3", "", 2.5, [-inf, inf], "", "steepness parameter"], 220 ["nu_inter_4", "", 2.5, [-inf, inf], "", "steepness parameter"], 221 ["nu_inter_5", "", 2.5, [-inf, inf], "", "steepness parameter"], 222 ["nu_inter_6", "", 2.5, [-inf, inf], "", "steepness parameter"], 223 ["nu_inter_7", "", 2.5, [-inf, inf], "", "steepness parameter"], 224 ["nu_inter_8", "", 2.5, [-inf, inf], "", "steepness parameter"], 225 ["nu_inter_9", "", 2.5, [-inf, inf], "", "steepness parameter"], 226 ["nu_inter_10", "", 2.5, [-inf, inf], "", "steepness parameter"], 227 ["npts_inter", "", 35, [0, 35], "", "number of points in each sublayer Must be odd number"], 228 ["nu_inter_0", "", 2.5, [-inf, inf], "", "steepness parameter"], 229 ["rad_core_0", "Ang", 50.0, [0, inf], "", "intern layer thickness"], 172 parameters = [["n_shells", "", 1, [0, 9], "", "number of shells"], 173 ["thick_inter[n]", "Ang", 50, [-inf, inf], "", "intern layer thickness"], 174 ["func_inter[n]", "", 0, [0, 4], "", "Erf:0, RPower:1, LPower:2, RExp:3, LExp:4"], 175 ["sld_core", "1e-6/Ang^2", 2.07, [-inf, inf], "", "sld function flat"], 176 ["sld_solvent", "1e-6/Ang^2", 1.0, [-inf, inf], "", "sld function solvent"], 177 ["sld_flat[n]", "1e-6/Ang^2", 4.06, [-inf, inf], "", "sld function flat"], 178 ["thick_inter[n]", "Ang", 50.0, [0, inf], "", "intern layer thickness"], 179 ["thick_flat[n]", "Ang", 100.0, [0, inf], "", "flat layer_thickness"], 180 ["inter_nu[n]", "", 2.5, [-inf, inf], "", "steepness parameter"], 181 ["npts_inter", "", 35, [0, 35], "", "number of points in each sublayer Must be odd number"], 182 ["core_rad", "Ang", 50.0, [0, inf], "", "intern layer thickness"], 230 183 ] 231 184 # pylint: enable=bad-whitespace, line-too-long 232 185 #source = ["lib/librefl.c", "lib/sph_j1c.c", "spherical_sld.c"] 233 186 234 Iq = """ 235 return q; 236 """ 237 238 Iqxy = """ 239 // never called since no orientation or magnetic parameters. 240 //return -1.0; 241 """ 187 def Iq(q, *args, **kw): 188 return q 189 190 def Iqxy(qx, *args, **kw): 191 return qx 192 242 193 243 194 demo = dict( -
sasmodels/models/barbell.py
r26141cb r02a0920 101 101 # pylint: disable=bad-whitespace, line-too-long 102 102 # ["name", "units", default, [lower, upper], "type","description"], 103 parameters = [["sld", " 4e-6/Ang^2", 4, [-inf, inf], "", "Barbell scattering length density"],104 ["s olvent_sld", "1e-6/Ang^2", 1, [-inf, inf], "", "Solvent scattering length density"],103 parameters = [["sld", "1e-6/Ang^2", 4, [-inf, inf], "", "Barbell scattering length density"], 104 ["sld_solvent", "1e-6/Ang^2", 1, [-inf, inf], "", "Solvent scattering length density"], 105 105 ["bell_radius", "Ang", 40, [0, inf], "volume", "Spherical bell radius"], 106 106 ["radius", "Ang", 20, [0, inf], "volume", "Cylindrical bar radius"], … … 115 115 # parameters for demo 116 116 demo = dict(scale=1, background=0, 117 sld=6, s olvent_sld=1,117 sld=6, sld_solvent=1, 118 118 bell_radius=40, radius=20, length=400, 119 119 theta=60, phi=60, … … 128 128 oldname = 'BarBellModel' 129 129 oldpars = dict(sld='sld_barbell', 130 s olvent_sld='sld_solv', bell_radius='rad_bell',130 sld_solvent='sld_solv', bell_radius='rad_bell', 131 131 radius='rad_bar', length='len_bar') -
sasmodels/models/bcc_paracrystal.py
r43b7eea r02a0920 117 117 ["radius", "Ang", 40, [0, inf], "volume", "Particle radius"], 118 118 ["sld", "1e-6/Ang^2", 4, [-inf, inf], "", "Particle scattering length density"], 119 ["s olvent_sld", "1e-6/Ang^2", 1, [-inf, inf], "", "Solvent scattering length density"],119 ["sld_solvent", "1e-6/Ang^2", 1, [-inf, inf], "", "Solvent scattering length density"], 120 120 ["theta", "degrees", 60, [-inf, inf], "orientation", "In plane angle"], 121 121 ["phi", "degrees", 60, [-inf, inf], "orientation", "Out of plane angle"], … … 124 124 # pylint: enable=bad-whitespace, line-too-long 125 125 126 source = ["lib/sph_j1c.c", "lib/gauss150.c", "lib/sphere_form.c", "bcc .c"]126 source = ["lib/sph_j1c.c", "lib/gauss150.c", "lib/sphere_form.c", "bcc_paracrystal_kernel.c"] 127 127 128 128 # parameters for demo 129 129 demo = dict( 130 130 scale=1, background=0, 131 dnn=220, d_factor=0.06, sld=4, s olvent_sld=1,131 dnn=220, d_factor=0.06, sld=4, sld_solvent=1, 132 132 radius=40, 133 133 theta=60, phi=60, psi=60, … … 141 141 # names and the target sasview model name. 142 142 oldname = 'BCCrystalModel' 143 oldpars = dict(sld='sldSph', s olvent_sld='sldSolv')143 oldpars = dict(sld='sldSph', sld_solvent='sldSolv') -
sasmodels/models/fcc_paracrystal.py
r43b7eea r02a0920 109 109 ["radius", "Ang", 40, [0, inf], "volume", "Particle radius"], 110 110 ["sld", "1e-6/Ang^2", 4, [-inf, inf], "", "Particle scattering length density"], 111 ["s olvent_sld", "1e-6/Ang^2", 1, [-inf, inf], "", "Solvent scattering length density"],111 ["sld_solvent", "1e-6/Ang^2", 1, [-inf, inf], "", "Solvent scattering length density"], 112 112 ["theta", "degrees", 60, [-inf, inf], "orientation", "In plane angle"], 113 113 ["phi", "degrees", 60, [-inf, inf], "orientation", "Out of plane angle"], … … 116 116 # pylint: enable=bad-whitespace, line-too-long 117 117 118 source = ["lib/sph_j1c.c", "lib/gauss150.c", "lib/sphere_form.c", "fcc .c"]118 source = ["lib/sph_j1c.c", "lib/gauss150.c", "lib/sphere_form.c", "fcc_paracrystal_kernel.c"] 119 119 120 120 # parameters for demo 121 121 demo = dict(scale=1, background=0, 122 dnn=220, d_factor=0.06, sld=4, s olvent_sld=1,122 dnn=220, d_factor=0.06, sld=4, sld_solvent=1, 123 123 radius=40, 124 124 theta=60, phi=60, psi=60, … … 132 132 # names and the target sasview model name. 133 133 oldname = 'FCCrystalModel' 134 oldpars = dict(sld='sldSph', s olvent_sld='sldSolv')134 oldpars = dict(sld='sldSph', sld_solvent='sldSolv') -
sasmodels/models/sc_paracrystal.py
ra84a0ca r02a0920 97 97 from numpy import inf 98 98 99 name = "sc_ crystal"99 name = "sc_paracrystal" 100 100 title = "Simple cubic lattice with paracrystalline distortion" 101 101 description = """ … … 125 125 ["d_factor", "", 0.06, [-inf, inf], "", "Paracrystal distortion factor"], 126 126 ["radius", "Ang", 40.0, [0.0, inf], "volume", "Radius of sphere"], 127 ["s phere_sld", "1e-6/Ang^2", 3.0, [0.0, inf], "", "Sphere scattering length density"],128 ["s olvent_sld", "1e-6/Ang^2", 6.3, [0.0, inf], "", "Solvent scattering length density"],127 ["sld", "1e-6/Ang^2", 3.0, [0.0, inf], "", "Sphere scattering length density"], 128 ["sld_solvent", "1e-6/Ang^2", 6.3, [0.0, inf], "", "Solvent scattering length density"], 129 129 ["theta", "degrees", 0.0, [-inf, inf], "orientation", "Orientation of the a1 axis w/respect incoming beam"], 130 130 ["phi", "degrees", 0.0, [-inf, inf], "orientation", "Orientation of the a2 in the plane of the detector"], … … 133 133 # pylint: enable=bad-whitespace, line-too-long 134 134 135 source = ["lib/sph_j1c.c", "lib/sphere_form.c", "lib/gauss150.c", "sc_ crystal.c"]135 source = ["lib/sph_j1c.c", "lib/sphere_form.c", "lib/gauss150.c", "sc_paracrystal_kernel.c"] 136 136 137 137 demo = dict(scale=1, background=0, … … 139 139 d_factor=0.06, 140 140 radius=40.0, 141 s phere_sld=3.0,142 s olvent_sld=6.3,141 sld=3.0, 142 sld_solvent=6.3, 143 143 theta=0.0, 144 144 phi=0.0, … … 147 147 oldname = 'SCCrystalModel' 148 148 149 oldpars = dict(s phere_sld='sldSph',150 s olvent_sld='sldSolv')149 oldpars = dict(sld='sldSph', 150 sld_solvent='sldSolv') 151 151 152 152 tests = [
Note: See TracChangeset
for help on using the changeset viewer.