Changeset a953943 in sasmodels


Ignore:
Timestamp:
Aug 8, 2014 2:29:10 PM (10 years ago)
Author:
HMP1 <helen.park@…>
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
Message:

The Core-Shell isn't working :(

Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • Kernel/Kernel-Cylinder_f.cpp

    r1726b21 ra953943  
    8585                const real lv = loops[2*(li+Nradius)]; 
    8686                const real lw = loops[2*(li+Nradius)+1]; 
    87                 vol += rw*lw*rv*rv*lv*Ntheta*Nphi; 
    88                norm_vol += rw*lw*Ntheta*Nphi; 
    8987                for (int thi=0; thi < Ntheta; thi++) { 
    9088                    const real thv = loops[2*(thi+Nradius+Nlength)]; 
     
    10098                            ret += f(qxi, qyi, sub, rv, lv, weight, thv, phv); 
    10199                            norm += weight; 
     100                            vol += rw*lw*rv*rv*lv; 
     101                            norm_vol += rw*lw; 
    102102                        } 
    103103                    } 
     
    105105            } 
    106106        } 
    107         if (Ntheta>1) norm = norm/(M_PI/2); 
     107        //if (Ntheta>1) norm = norm/(M_PI/2); 
    108108        if (vol != REAL(0.0) && norm_vol != REAL(0.0)) { 
    109109            ret *= norm_vol/vol; 
  • Kernel/Kernel-Ellipse_f.cpp

    rae7d639 ra953943  
    7373                const real rbv = loops[2*(bi+Nradius_a)]; 
    7474                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; 
    7775                for (int thi=0; thi < Ntheta; thi++) { 
    7876                    const real thv = loops[2*(thi+Nradius_a+Nradius_b)]; 
     
    8886                            ret += f(qxi, qyi, sub, rav, rbv, weight, thv, phv); 
    8987                            norm += weight; 
     88                            vol += raw*rbw*rav*rbv*rbv; 
     89                            norm_vol += raw*rbw; 
    9090                        } 
    9191                    } 
  • compare.py

    r1726b21 ra953943  
    117117 
    118118    model = sasview_model('CoreShellCylinder', **pars) 
    119     from Models.code_coreshellcyl import GpuCoreShellCylinder as gpumodel 
     119    from Models.code_coreshellcyl_f import GpuCoreShellCylinder as gpumodel 
    120120 
    121121    plot(data, model, gpumodel, N, pars) 
     
    176176 
    177177if __name__ == "__main__": 
    178     cyl(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  
    55from sasmodel import SasModel, load_data, set_beam_stop, set_half, set_top 
    66from Models.code_capcyl import GpuCapCylinder 
    7 from Models.code_coreshellcyl import GpuCoreShellCylinder 
     7from Models.code_coreshellcyl_f import GpuCoreShellCylinder 
    88from Models.code_cylinder_f import GpuCylinder 
    99#from Models.code_cylinder import GpuCylinder, OneDGpuCylinder 
     
    1818""" SET INNER BEAM STOP, OUTER RING, AND MASK HALF OF THE DATA """ 
    1919set_beam_stop(data, 0.004)#, outer=0.025) 
    20 #set_top(data, -.018) 
     20set_top(data, -.018) 
    2121#set_half(data, 'right') 
    2222 
     
    3131 
    3232 
    33 if 1: 
     33if 0: 
    3434    model = SasModel(data, GpuEllipse, 
    3535    scale=0.08, 
     
    104104 
    105105 
    106 if 0: 
     106if 1: 
    107107    model = SasModel(data, GpuCoreShellCylinder, 
    108     scale= .00031, radius=19.5, thickness=30, length=22, 
     108    scale= .031, radius=19.5, thickness=30, length=22, 
    109109    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, 
    111111 
    112112    radius_pd=0.26, radius_pd_n=10, radius_pd_nsigma=3, 
  • sasmodel.py

    r1726b21 ra953943  
    101101    vmin = min(mdata.min(), mtheory.min()) 
    102102    vmax = max(mdata.max(), mtheory.max()) 
     103    print np.exp(np.mean(mtheory)), np.std(mtheory),np.max(mtheory),np.min(mtheory) 
    103104 
    104105    plt.subplot(1, 3, 1) 
Note: See TracChangeset for help on using the changeset viewer.