Changeset 885ee37 in sasmodels
- Timestamp:
- Apr 4, 2016 11:09:26 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:
- 5b0335b
- Parents:
- aaf75b6 (diff), 7a1143b (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
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/direct_model.py
r7a1143b raaf75b6 25 25 import numpy as np 26 26 27 from .core import make_kernel 27 28 from .core import call_kernel, call_ER_VR 28 29 from . import sesans … … 170 171 def _calc_theory(self, pars, cutoff=0.0): 171 172 if self._kernel is None: 172 self._kernel = self._model.make_kernel(self._kernel_inputs)173 self._kernel_mono = ( self._model.make_kernel(self._kernel_mono_inputs)173 self._kernel = make_kernel(self._model, self._kernel_inputs) # pylint: disable=attribute-dedata_type 174 self._kernel_mono = (make_kernel(self._model, self._kernel_mono_inputs) 174 175 if self._kernel_mono_inputs else None) 175 176 -
sasmodels/models/adsorbed_layer.py
rc079f50 r1d4d409 98 98 'density_shell': 0.7, 'radius': 500.0, 'volfraction': 0.14, 99 99 'sld_shell': 1.5, 'sld_solvent': 6.3, 'background': 0.0}, 100 [0.0106939, 0. 469418], [73.741, 9.65391e-53]],100 [0.0106939, 0.1], [73.741, 4.51684e-3]], 101 101 ] 102 102 # ADDED by: SMK ON: 16Mar2016 convert from sasview, check vs SANDRA, 18Mar2016 RKH some edits & renaming -
sasmodels/models/core_shell_ellipsoid.py
r65bf704 r27fade8 117 117 source = ["lib/sph_j1c.c", "lib/gfn.c", "lib/gauss76.c", "core_shell_ellipsoid.c"] 118 118 119 def ER(equat_ shell, polar_shell):119 def ER(equat_core, polar_core, equat_shell, polar_shell): 120 120 """ 121 121 Returns the effective radius used in the S*P calculation … … 123 123 import numpy as np 124 124 from .ellipsoid import ER as ellipsoid_ER 125 return ellipsoid_ER( rpolar, equat_shell)125 return ellipsoid_ER(polar_shell, equat_shell) 126 126 127 127 -
sasmodels/models/core_shell_ellipsoid_xt.py
r65bf704 r27fade8 107 107 Returns the effective radius used in the S*P calculation 108 108 """ 109 import numpy as np110 109 from .ellipsoid import ER as ellipsoid_ER 111 return ellipsoid_ER(equat_core*x_core + t_shell*x_polar_shell, equat_shell + t_shell) 110 polar_outer = equat_core*x_core + t_shell*x_polar_shell 111 equat_outer = equat_core + t_shell 112 return ellipsoid_ER(polar_outer, equat_outer) 112 113 113 114 -
sasmodels/models/core_shell_sphere.py
r55b2b232 r3c6d5bc 99 99 100 100 tests = [[{'radius': 20.0, 'thickness': 10.0}, 'ER', 30.0], 101 [{'radius': 20.0, 'thickness': 10.0}, 'VR', 0.703703704], 101 # TODO: VR test suppressed until we sort out new product model 102 # and determine what to do with volume ratio. 103 #[{'radius': 20.0, 'thickness': 10.0}, 'VR', 0.703703704], 102 104 103 105 # The SasView test result was 0.00169, with a background of 0.001 -
sasmodels/models/onion.py
rce896fd raaf75b6 290 290 category = "shape:sphere" 291 291 292 # TODO: n is a volume parameter that is not polydisperse 292 293 293 294 # ["name", "units", default, [lower, upper], "type","description"], … … 364 365 365 366 def ER(core_radius, n, thickness): 366 return np.sum(thickness[:n ], axis=0) + core_radius367 return np.sum(thickness[:n[0]], axis=0) + core_radius 367 368 368 369 def VR(core_radius, n, thickness): 369 return 1.0 370 return 1.0, 1.0 370 371 371 372 demo = { -
sasmodels/models/sphere.py
rd7028dc r364d8f7 86 86 def ER(radius): 87 87 """ 88 88 Return equivalent radius (ER) 89 89 """ 90 90 return radius -
sasmodels/models/squarewell.py
r2f63032 rb812972 55 55 category = "structure-factor" 56 56 structure_factor = True 57 single = False 57 58 58 59 #single = False -
sasmodels/product.py
rce896fd raaf75b6 20 20 VOLFRACTION=3 21 21 22 # TODO: core_shell_sphere model has suppressed the volume ratio calculation 23 # revert it after making VR and ER available at run time as constraints. 22 24 def make_product_info(p_info, s_info): 23 25 """ -
sasmodels/resolution.py
r7a1143b raaf75b6 805 805 pars = { 806 806 'scale':0.05, 807 'r polar':500, 'requatorial':15000,808 'sld':6, 's olvent_sld': 1,807 'r_polar':500, 'r_equatorial':15000, 808 'sld':6, 'sld_solvent': 1, 809 809 } 810 810 form = load_model('ellipsoid', dtype='double') … … 837 837 TEST_PARS_PINHOLE_SPHERE = { 838 838 'scale': 1.0, 'background': 0.01, 839 'radius': 60.0, 'sld': 1, 's olvent_sld': 6.3,839 'radius': 60.0, 'sld': 1, 'sld_solvent': 6.3, 840 840 } 841 841 # Q, dQ, I(Q) calculated by NIST Igor SANS package … … 946 946 TEST_PARS_SLIT_SPHERE = { 947 947 'scale': 0.01, 'background': 0.01, 948 'radius': 60000, 'sld': 1, 's olvent_sld': 4,948 'radius': 60000, 'sld': 1, 'sld_solvent': 4, 949 949 } 950 950 # Q dQ I(Q) I_smeared(Q) … … 1047 1047 1048 1048 if name == 'cylinder': 1049 pars = {'length':210, 'radius':500 }1049 pars = {'length':210, 'radius':500, 'background': 0} 1050 1050 elif name == 'teubner_strey': 1051 1051 pars = {'a2':0.003, 'c1':-1e4, 'c2':1e10, 'background':0.312643} … … 1054 1054 elif name == 'ellipsoid': 1055 1055 pars = { 1056 'scale':0.05, 1057 'r polar':500, 'requatorial':15000,1058 'sld':6, 's olvent_sld': 1,1056 'scale':0.05, 'background': 0, 1057 'r_polar':500, 'r_equatorial':15000, 1058 'sld':6, 'sld_solvent': 1, 1059 1059 } 1060 1060 else:
Note: See TracChangeset
for help on using the changeset viewer.