Changeset 6dd90c1 in sasmodels
- Timestamp:
- Mar 16, 2016 9:25:21 PM (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:
- 63776d3
- Parents:
- 5111921
- Location:
- sasmodels/models
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/be_polyelectrolyte.py
r2f0c07d r6dd90c1 170 170 'ionization_degree': 2.0, 171 171 'polymer_concentration': 10.0, 172 'background': 0.0, 172 173 }, 0.1, -3.75693800588], 173 174 … … 189 190 'ionization_degree': 0.5, 190 191 'polymer_concentration': 0.1, 192 'background': 0.0, 191 193 }, 200., 1.80664667511e-06], 192 194 ] -
sasmodels/models/core_shell_parallelepiped.py
r2f0c07d r6dd90c1 186 186 187 187 qx, qy = 0.2 * np.cos(2.5), 0.2 * np.sin(2.5) 188 tests = [[{}, 0.2, 0.53 2149288477],189 [{}, [0.2], [0.53 2149288477]],190 [{'theta':10.0, 'phi':10.0}, (qx, qy), 0.03 1102135569],191 [{'theta':10.0, 'phi':10.0}, [(qx, qy)], [0.03 1102135569]],188 tests = [[{}, 0.2, 0.533149288477], 189 [{}, [0.2], [0.533149288477]], 190 [{'theta':10.0, 'phi':10.0}, (qx, qy), 0.032102135569], 191 [{'theta':10.0, 'phi':10.0}, [(qx, qy)], [0.032102135569]], 192 192 ] 193 193 del qx, qy # not necessary to delete, but cleaner -
sasmodels/models/correlation_length.py
r3e6c5c1 r6dd90c1 84 84 85 85 tests = [[{}, 0.001, 1009.98], 86 [{}, 0.150141, 0.17 4645],87 [{}, 0.442528, 0.02 03957]]86 [{}, 0.150141, 0.175645], 87 [{}, 0.442528, 0.0213957]] -
sasmodels/models/cylinder.py
r2f0c07d r6dd90c1 167 167 168 168 qx, qy = 0.2 * np.cos(2.5), 0.2 * np.sin(2.5) 169 tests = [[{}, 0.2, 0.04 1761386790780453],170 [{}, [0.2], [0.04 1761386790780453]],171 [{'theta':10.0, 'phi':10.0}, (qx, qy), 0.03 414647218513852],172 [{'theta':10.0, 'phi':10.0}, [(qx, qy)], [0.03 414647218513852]],169 tests = [[{}, 0.2, 0.042761386790780453], 170 [{}, [0.2], [0.042761386790780453]], 171 [{'theta':10.0, 'phi':10.0}, (qx, qy), 0.03514647218513852], 172 [{'theta':10.0, 'phi':10.0}, [(qx, qy)], [0.03514647218513852]], 173 173 ] 174 174 del qx, qy # not necessary to delete, but cleaner -
sasmodels/models/gauss_lorentz_gel.py
r168052c r6dd90c1 132 132 'lorentz_scale_factor': 50.0, 133 133 'dynamic_cor_length': 20.0, 134 }, 0.001, 149.48 1],134 }, 0.001, 149.482], 135 135 136 136 [{'gauss_scale_factor': 100.0, … … 138 138 'lorentz_scale_factor': 50.0, 139 139 'dynamic_cor_length': 20.0, 140 }, 0.105363, 9.19 03],140 }, 0.105363, 9.1913], 141 141 142 142 [{'gauss_scale_factor': 100.0, … … 144 144 'lorentz_scale_factor': 50.0, 145 145 'dynamic_cor_length': 20.0, 146 }, 0.441623, 0.63 2811],146 }, 0.441623, 0.633811], 147 147 148 148 # Additional tests with larger range of parameters … … 151 151 'lorentz_scale_factor': 3.0, 152 152 'dynamic_cor_length': 1.0, 153 }, 0.1, 2.97 02970297],153 }, 0.1, 2.9712970297], 154 154 155 155 [{'gauss_scale_factor': 10.0, … … 158 158 'dynamic_cor_length': 1.0, 159 159 'background': 100.0 160 }, 5.0, 100.11 5384615],160 }, 5.0, 100.116384615], 161 161 162 162 [{'gauss_scale_factor': 10.0, … … 164 164 'lorentz_scale_factor': 3.0, 165 165 'dynamic_cor_length': 1.0, 166 'background': 0.0, 166 167 }, 200., 7.49981250469e-05], 167 168 ] -
sasmodels/models/gel_fit.py
r5111921 r6dd90c1 92 92 'gyration_radius': 10.0, 93 93 'fractal_exp': 10.0, 94 'cor_length': 20.0 94 'cor_length': 20.0, 95 'background': 0.0, 95 96 }, 0.1, 0.716532], 96 97 -
sasmodels/models/guinier.py
r723cebe r6dd90c1 57 57 58 58 # parameters for unit tests 59 tests = [[{'rg' : 31.5}, 0.005, 0.99 1756]]59 tests = [[{'rg' : 31.5}, 0.005, 0.992756]] -
sasmodels/models/hollow_rectangular_prism.py
r5111921 r6dd90c1 158 158 thickness='thickness', sld='sldPipe', solvent_sld='sldSolv') 159 159 160 tests = [[{}, 0.2, 0.76 587283098],161 [{}, [0.2], [0.76 587283098]],160 tests = [[{}, 0.2, 0.76687283098], 161 [{}, [0.2], [0.76687283098]], 162 162 ] 163 163 -
sasmodels/models/hollow_rectangular_prism_infinitely_thin_walls.py
rdeb7ee0 r6dd90c1 137 137 sld='sldPipe', solvent_sld='sldSolv') 138 138 139 tests = [[{}, 0.2, 0.83 6719188592],140 [{}, [0.2], [0.83 6719188592]],139 tests = [[{}, 0.2, 0.837719188592], 140 [{}, [0.2], [0.837719188592]], 141 141 ] 142 142 -
sasmodels/models/line.py
r4b0e1f3 r6dd90c1 80 80 [{'intercept': 1.0, 81 81 'slope': 1.0, 82 }, 1.0, 2.0 ],82 }, 1.0, 2.001], 83 83 84 84 [{'intercept': 1.0, 85 85 'slope': 1.0, 86 }, 0.0, 1.0 ],86 }, 0.0, 1.001], 87 87 88 88 [{'intercept': 1.0, 89 89 'slope': 1.0, 90 }, 0.4, 1.4 ],90 }, 0.4, 1.401], 91 91 92 92 [{'intercept': 1.0, 93 93 'slope': 1.0, 94 }, 1.3, 2.3 ],94 }, 1.3, 2.301], 95 95 96 96 [{'intercept': 1.0, 97 97 'slope': 1.0, 98 }, 0.5, 1.5 ],98 }, 0.5, 1.501], 99 99 100 100 [{'intercept': 1.0, 101 101 'slope': 1.0, 102 }, [0.4, 0.5], [1.4 , 1.5]],102 }, [0.4, 0.5], [1.401, 1.501]], 103 103 104 104 [{'intercept': 1.0, 105 105 'slope': 1.0, 106 'background': 0.0, 106 107 }, (1.3, 1.57), 5.911], 107 108 ] -
sasmodels/models/lorentz.py
reb5901b r6dd90c1 64 64 65 65 # parameters for unit tests 66 tests = [[{'cor_length': 250}, 0.01, 0.13 7931]]66 tests = [[{'cor_length': 250}, 0.01, 0.138931]] -
sasmodels/models/mass_fractal.py
r168052c r6dd90c1 106 106 'mass_dim': 1.9, 107 107 'cutoff_length': 100.0, 108 }, 0.05, 279.59 322],108 }, 0.05, 279.59422], 109 109 110 110 # Additional tests with larger range of parameters … … 112 112 'mass_dim': 3.3, 113 113 'cutoff_length': 1.0, 114 }, 0.5, 1.29 016774904],114 }, 0.5, 1.29116774904], 115 115 116 116 [{'radius': 1.0, … … 124 124 'cutoff_length': 1.0, 125 125 'scale': 10.0, 126 }, 0.051, 11.62 27966145],126 }, 0.051, 11.6237966145], 127 127 ] -
sasmodels/models/mass_surface_fractal.py
r168052c r6dd90c1 115 115 'cluster_rg': 86.7, 116 116 'primary_rg': 4000.0, 117 'background': 0.0, 117 118 }, 0.05, 1.77537e-05], 118 119 … … 122 123 'cluster_rg': 90.0, 123 124 'primary_rg': 4000.0, 124 }, 0.001, 0.18 462699016],125 }, 0.001, 0.18562699016], 125 126 126 127 [{'mass_dim': 1.3, … … 136 137 'primary_rg': 1000.0, 137 138 'scale': 10.0, 139 'background': 0.0, 138 140 }, 0.051, 0.000169548800377], 139 141 ] -
sasmodels/models/mono_gauss_coil.py
r4c05f49 r6dd90c1 61 61 62 62 # NB: Scale and Background are implicit parameters on every model 63 def Iq(q, radius_gyration):63 def Iq(q, i_zero, radius_gyration): 64 64 # pylint: disable = missing-docstring 65 z = ( x * radius_gyration) * (x * radius_gyration)66 if x== 0:65 z = (q * radius_gyration) ** 2 66 if q == 0: 67 67 inten = 1.0 68 68 else: 69 69 inten = i_zero * 2.0 * (exp(-z) + z - 1.0 ) / (z * z) 70 70 return inten 71 Iq.vectorized = True# Iq accepts an array of q values71 #Iq.vectorized = True # Iq accepts an array of q values 72 72 73 73 def Iqxy(qx, qy, *args): 74 74 # pylint: disable = missing-docstring 75 75 return Iq(sqrt(qx ** 2 + qy ** 2), *args) 76 Iqxy.vectorized =True # Iqxy accepts an array of qx, qy values76 #Iqxy.vectorized = True # Iqxy accepts an array of qx, qy values 77 77 78 78 demo = dict(scale = 1.0, -
sasmodels/models/parallelepiped.py
r5111921 r6dd90c1 233 233 234 234 qx, qy = 0.2 * np.cos(2.5), 0.2 * np.sin(2.5) 235 tests = [[{}, 0.2, 0.17 658004974],236 [{}, [0.2], [0.17 658004974]],237 [{'theta':10.0, 'phi':10.0}, (qx, qy), 0.00 460296014],238 [{'theta':10.0, 'phi':10.0}, [(qx, qy)], [0.00 460296014]],235 tests = [[{}, 0.2, 0.17758004974], 236 [{}, [0.2], [0.17758004974]], 237 [{'theta':10.0, 'phi':10.0}, (qx, qy), 0.00560296014], 238 [{'theta':10.0, 'phi':10.0}, [(qx, qy)], [0.00560296014]], 239 239 ] 240 240 del qx, qy # not necessary to delete, but cleaner -
sasmodels/models/poly_gauss_coil.py
r4c05f49 r6dd90c1 67 67 68 68 # NB: Scale and Background are implicit parameters on every model 69 def Iq(q, radius_gyration, polydispersity):69 def Iq(q, i_zero, radius_gyration, polydispersity): 70 70 # pylint: disable = missing-docstring 71 71 u = polydispersity - 1.0 72 72 # TO DO 73 74 75 z = ((x * radius_gyration) * (x * radius_gyration))/ (1.0 + 2.0 * u)76 if x== 0:77 78 79 80 81 Iq.vectorized = True# Iq accepts an array of q values73 # should trap the case of polydispersity = 1 by switching to a taylor expansion 74 minusoneonu = -1.0 / u 75 z = (q * radius_gyration) ** 2 / (1.0 + 2.0 * u) 76 if q == 0: 77 inten = i_zero * 1.0 78 else: 79 inten = i_zero * 2.0 * (power((1.0 + u * z),minusoneonu) + z - 1.0 ) / ((1.0 + u) * (z * z)) 80 return inten 81 #Iq.vectorized = True # Iq accepts an array of q values 82 82 83 83 def Iqxy(qx, qy, *args): 84 84 # pylint: disable = missing-docstring 85 85 return Iq(sqrt(qx ** 2 + qy ** 2), *args) 86 Iqxy.vectorized =True # Iqxy accepts an array of qx, qy values86 #Iqxy.vectorized = True # Iqxy accepts an array of qx, qy values 87 87 88 88 demo = dict(scale = 1.0, -
sasmodels/models/polymer_excl_volume.py
r168052c r6dd90c1 168 168 tests = [ 169 169 # Accuracy tests based on content in test/polyexclvol_default_igor.txt 170 [{'rg': 60, 'porod_exp': 3.0}, 0.001, 0.99 8801],171 [{'rg': 60, 'porod_exp': 3.0}, 0.105363, 0.01 62751],172 [{'rg': 60, 'porod_exp': 3.0 }, 0.665075, 6.56261e-05],170 [{'rg': 60, 'porod_exp': 3.0}, 0.001, 0.999801], 171 [{'rg': 60, 'porod_exp': 3.0}, 0.105363, 0.0172751], 172 [{'rg': 60, 'porod_exp': 3.0, 'background': 0.0}, 0.665075, 6.56261e-05], 173 173 174 174 # Additional tests with larger range of parameters 175 [{'rg': 10, 'porod_exp': 4.0}, 0.1, 0.72 3436675809],175 [{'rg': 10, 'porod_exp': 4.0}, 0.1, 0.724436675809], 176 176 [{'rg': 2.2, 'porod_exp': 22.0, 'background': 100.0}, 5.0, 100.0], 177 177 [{'rg': 1.1, 'porod_exp': 1, 'background': 10.0, 'scale': 1.25}, -
sasmodels/models/rectangular_prism.py
rdeb7ee0 r6dd90c1 135 135 sld='sldPipe', solvent_sld='sldSolv') 136 136 137 tests = [[{}, 0.2, 0.37 4248406825],138 [{}, [0.2], [0.37 4248406825]],137 tests = [[{}, 0.2, 0.375248406825], 138 [{}, [0.2], [0.375248406825]], 139 139 ] -
sasmodels/models/sc_crystal.py
r5111921 r6dd90c1 152 152 tests = [ 153 153 # Accuracy tests based on content in test/utest_extra_models.py 154 [{}, 0.001, 10.30 38],155 [{}, 0.215268, 0.00 714889],156 [{}, (0.414467), 0.00 0313289]154 [{}, 0.001, 10.3048], 155 [{}, 0.215268, 0.00814889], 156 [{}, (0.414467), 0.001313289] 157 157 ] 158 158 -
sasmodels/models/star_polymer.py
r13ed84c r6dd90c1 76 76 tests = [[{'radius2': 2.0, 77 77 'arms': 3.3, 78 }, 0.5, 0.85 0646091108],78 }, 0.5, 0.851646091108], 79 79 80 80 [{'radius2': 1.0, -
sasmodels/models/surface_fractal.py
r168052c r6dd90c1 106 106 'surface_dim': 2.0, 107 107 'cutoff_length': 500.0, 108 }, 0.05, 301428.6 5916],108 }, 0.05, 301428.66016], 109 109 110 110 # Additional tests with larger range of parameters … … 112 112 'surface_dim': 1.0, 113 113 'cutoff_length': 10.0, 114 }, 0.332070182643, 1125.00 321004],114 }, 0.332070182643, 1125.00421004], 115 115 116 116 [{'radius': 3.5, … … 124 124 'cutoff_length': 33.0, 125 125 'scale': 0.1, 126 }, 0.51, 2.50 020147004],126 }, 0.51, 2.50120147004], 127 127 ] -
sasmodels/models/teubner_strey.py
reb69cce r6dd90c1 91 91 oldpars = dict(a2='scale') 92 92 93 tests = [[{}, 0.2, 0.14 4927536232]]93 tests = [[{}, 0.2, 0.145927536232]] -
sasmodels/models/vesicle.py
rfa8011eb r6dd90c1 130 130 131 131 132 # NOTE: test results taken from values returned by SasView 3.1.2 133 tests = [[{}, 0.0010005303255, 17139.8268799], 134 [{}, 0.200027832249, 0.130387268704], 132 # NOTE: test results taken from values returned by SasView 3.1.2, with 133 # 0.001 added for a non-zero default background. 134 tests = [[{}, 0.0010005303255, 17139.8278799], 135 [{}, 0.200027832249, 0.131387268704], 135 136 [{}, 'ER', 130.], 136 137 [{}, 'VR', 0.54483386436],
Note: See TracChangeset
for help on using the changeset viewer.