Changeset a953943 in sasmodels
- Timestamp:
- Aug 8, 2014 4:29:10 PM (11 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:
- 4001d6e
- Parents:
- ae7d639
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Kernel/Kernel-Cylinder_f.cpp
r1726b21 ra953943 85 85 const real lv = loops[2*(li+Nradius)]; 86 86 const real lw = loops[2*(li+Nradius)+1]; 87 vol += rw*lw*rv*rv*lv*Ntheta*Nphi;88 norm_vol += rw*lw*Ntheta*Nphi;89 87 for (int thi=0; thi < Ntheta; thi++) { 90 88 const real thv = loops[2*(thi+Nradius+Nlength)]; … … 100 98 ret += f(qxi, qyi, sub, rv, lv, weight, thv, phv); 101 99 norm += weight; 100 vol += rw*lw*rv*rv*lv; 101 norm_vol += rw*lw; 102 102 } 103 103 } … … 105 105 } 106 106 } 107 if (Ntheta>1) norm = norm/(M_PI/2);107 //if (Ntheta>1) norm = norm/(M_PI/2); 108 108 if (vol != REAL(0.0) && norm_vol != REAL(0.0)) { 109 109 ret *= norm_vol/vol; -
Kernel/Kernel-Ellipse_f.cpp
rae7d639 ra953943 73 73 const real rbv = loops[2*(bi+Nradius_a)]; 74 74 const real rbw = loops[2*(bi+Nradius_a)+1]; 75 vol += raw*rbw*rav*rbv*rbv*Ntheta*Nphi;76 norm_vol += raw*rbw*Ntheta*Nphi;77 75 for (int thi=0; thi < Ntheta; thi++) { 78 76 const real thv = loops[2*(thi+Nradius_a+Nradius_b)]; … … 88 86 ret += f(qxi, qyi, sub, rav, rbv, weight, thv, phv); 89 87 norm += weight; 88 vol += raw*rbw*rav*rbv*rbv; 89 norm_vol += raw*rbw; 90 90 } 91 91 } -
compare.py
r1726b21 ra953943 117 117 118 118 model = sasview_model('CoreShellCylinder', **pars) 119 from Models.code_coreshellcyl import GpuCoreShellCylinder as gpumodel119 from Models.code_coreshellcyl_f import GpuCoreShellCylinder as gpumodel 120 120 121 121 plot(data, model, gpumodel, N, pars) … … 176 176 177 177 if __name__ == "__main__": 178 c yl(2)179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 178 coreshell(1) 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 -
fit.py
rae7d639 ra953943 5 5 from sasmodel import SasModel, load_data, set_beam_stop, set_half, set_top 6 6 from Models.code_capcyl import GpuCapCylinder 7 from Models.code_coreshellcyl import GpuCoreShellCylinder7 from Models.code_coreshellcyl_f import GpuCoreShellCylinder 8 8 from Models.code_cylinder_f import GpuCylinder 9 9 #from Models.code_cylinder import GpuCylinder, OneDGpuCylinder … … 18 18 """ SET INNER BEAM STOP, OUTER RING, AND MASK HALF OF THE DATA """ 19 19 set_beam_stop(data, 0.004)#, outer=0.025) 20 #set_top(data, -.018)20 set_top(data, -.018) 21 21 #set_half(data, 'right') 22 22 … … 31 31 32 32 33 if 1:33 if 0: 34 34 model = SasModel(data, GpuEllipse, 35 35 scale=0.08, … … 104 104 105 105 106 if 0:106 if 1: 107 107 model = SasModel(data, GpuCoreShellCylinder, 108 scale= .0 0031, radius=19.5, thickness=30, length=22,108 scale= .031, radius=19.5, thickness=30, length=22, 109 109 core_sld=7.105e-6, shell_sld=.291e-6, solvent_sld=7.105e-6, 110 background=0 .2, axis_theta=0, axis_phi=0,110 background=0, axis_theta=0, axis_phi=0, 111 111 112 112 radius_pd=0.26, radius_pd_n=10, radius_pd_nsigma=3, -
sasmodel.py
r1726b21 ra953943 101 101 vmin = min(mdata.min(), mtheory.min()) 102 102 vmax = max(mdata.max(), mtheory.max()) 103 print np.exp(np.mean(mtheory)), np.std(mtheory),np.max(mtheory),np.min(mtheory) 103 104 104 105 plt.subplot(1, 3, 1)
Note: See TracChangeset
for help on using the changeset viewer.