Changeset 236


Ignore:
Timestamp:
Jan 11, 2008 5:07:24 PM (13 years ago)
Author:
srkline
Message:

Changes to Igor functions to convert models to take individual SLD's rather than contrast.

Individual SLD's are easier to work with - since they are experimental values, contrast is not.

Concurrent changes have been made to the XOPs (the library) so that all calculations are the same.

Location:
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00
Files:
32 edited

Legend:

Unmodified
Added
Removed
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/CylinderForm.ipf

    r166 r236  
    1919        make/o/D/n=(num) xwave_cyl,ywave_cyl 
    2020        xwave_cyl =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    21         make/o/D coef_cyl = {1.,20.,400,3.0e-6,0.01} 
    22         make/o/t parameters_cyl = {"scale","radius (A)","length (A)","contrast (A^-2)","incoh. bkg (cm^-1)"} 
     21        make/o/D coef_cyl = {1.,20.,400,1e-6,6.3e-6,0.01} 
     22        make/o/t parameters_cyl = {"scale","radius (A)","length (A)","SLD cylinder (A^-2)","SLD solvent (A^-2)","incoh. bkg (cm^-1)"} 
    2323        Edit parameters_cyl,coef_cyl 
    2424        Variable/G root:g_cyl 
     
    4848         
    4949        // Setup parameter table for model function 
    50         make/o/D smear_coef_cyl = {1.,20.,400,3.0e-6,0.01} 
    51         make/o/t smear_parameters_cyl = {"scale","radius (A)","length (A)","contrast (A^-2)","incoh. bkg (cm^-1)"} 
     50        make/o/D smear_coef_cyl = {1.,20.,400,1e-6,6.3e-6,0.01} 
     51        make/o/t smear_parameters_cyl = {"scale","radius (A)","length (A)","SLD cylinder (A^-2)","SLD solvent (A^-2)","incoh. bkg (cm^-1)"} 
    5252        Edit smear_parameters_cyl,smear_coef_cyl 
    5353         
     
    9393        //[1] cylinder RADIUS (A) 
    9494        //[2] total cylinder LENGTH (A) 
    95         //[3] contrast (A^-2) 
    96         //[4] background (cm^-1) 
    97         Variable scale, radius,length,delrho,bkg 
     95        //[3] sld cylinder (A^-2) 
     96        //[4] sld solvent 
     97        //[5] background (cm^-1) 
     98        Variable scale, radius,length,delrho,bkg,sldCyl,sldSolv 
    9899        scale = w[0] 
    99100        radius = w[1] 
    100101        length = w[2] 
    101         delrho = w[3] 
    102         bkg = w[4] 
     102        sldCyl = w[3] 
     103        sldSolv = w[4] 
     104        bkg = w[5] 
     105        delrho = sldCyl-sldSolv 
     106 
    103107// 
    104108// the OUTPUT form factor is <f^2>/Vcyl [cm-1] 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Cylinder_and_Struct.ipf

    r166 r236  
    1919        Make/O/D/n=(num) xwave_CYL_HS,ywave_CYL_HS 
    2020        xwave_CYL_HS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    21         Make/O/D coef_CYL_HS = {0.01,20.,400,3.0e-6,0.01} 
    22         make/o/t parameters_CYL_HS = {"volume fraction","radius (A)","length (A)","contrast (A^-2)","incoh. bkg (cm^-1)"} 
     21        Make/O/D coef_CYL_HS = {0.01,20.,400,1e-6,6.3e-6,0.01} 
     22        make/o/t parameters_CYL_HS = {"volume fraction","radius (A)","length (A)","SLD cylinder (A^-2)","SLD solvent (A^-2)","incoh. bkg (cm^-1)"} 
    2323        Edit parameters_CYL_HS,coef_CYL_HS 
    2424         
     
    4848         
    4949        // Setup parameter table for model function 
    50         Make/O/D smear_coef_CYL_HS = {0.01,20.,400,3.0e-6,0.01} 
    51         make/o/t smear_parameters_CYL_HS = {"volume fraction","radius (A)","length (A)","contrast (A^-2)","incoh. bkg (cm^-1)"} 
     50        Make/O/D smear_coef_CYL_HS = {0.01,20.,400,1e-6,6.3e-6,0.01} 
     51        make/o/t smear_parameters_CYL_HS = {"volume fraction","radius (A)","length (A)","SLD cylinder (A^-2)","SLD solvent (A^-2)","incoh. bkg (cm^-1)"} 
    5252        Edit smear_parameters_CYL_HS,smear_coef_CYL_HS                                   
    5353         
     
    8080         
    8181        //setup form factor coefficient wave 
    82         Make/O/D/N=5 form_CYL_HS 
     82        Make/O/D/N=6 form_CYL_HS 
    8383        form_CYL_HS[0] = 1 
    8484        form_CYL_HS[1] = w[1] 
    8585        form_CYL_HS[2] = w[2] 
    8686        form_CYL_HS[3] = w[3] 
    87         form_CYL_HS[4] = 0 
     87        form_CYL_HS[4] = w[4]    
     88        form_CYL_HS[5] = 0 
    8889         
    8990        //setup structure factor coefficient wave 
     
    9899        yw = temp_CYL_HS_PQ * temp_CYL_HS_SQ 
    99100        yw *= w[0] 
    100         yw += w[4] 
     101        yw += w[5] 
    101102         
    102103        //cleanup waves (don't do this - it takes a lot of time...) 
     
    114115        Make/O/D/n=(num) xwave_CYL_SW,ywave_CYL_SW 
    115116        xwave_CYL_SW =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    116         Make/O/D coef_CYL_SW = {0.01,20.,400,3.0e-6,1.0,1.2,0.01} 
    117         make/o/t parameters_CYL_SW = {"volume fraction","radius (A)","length (A)","contrast (A^-2)","well depth (kT)","well width (diam.)","incoh. bkg (cm^-1)"} 
     117        Make/O/D coef_CYL_SW = {0.01,20.,400,1e-6,6.3e-6,1.0,1.2,0.01} 
     118        make/o/t parameters_CYL_SW = {"volume fraction","radius (A)","length (A)","SLD cylinder (A^-2)","SLD solvent (A^-2)","well depth (kT)","well width (diam.)","incoh. bkg (cm^-1)"} 
    118119        Edit parameters_CYL_SW,coef_CYL_SW 
    119120         
     
    143144         
    144145        // Setup parameter table for model function 
    145         Make/O/D smear_coef_CYL_SW = {0.01,20.,400,3.0e-6,1.0,1.2,0.01} 
    146         make/o/t smear_parameters_CYL_SW = {"volume fraction","radius (A)","length (A)","contrast (A^-2)","well depth (kT)","well width (diam.)","incoh. bkg (cm^-1)"} 
     146        Make/O/D smear_coef_CYL_SW = {0.01,20.,400,1e-6,6.3e-6,1.0,1.2,0.01} 
     147        make/o/t smear_parameters_CYL_SW = {"volume fraction","radius (A)","length (A)","SLD cylinder (A^-2)","SLD solvent (A^-2)","well depth (kT)","well width (diam.)","incoh. bkg (cm^-1)"} 
    147148        Edit smear_parameters_CYL_SW,smear_coef_CYL_SW                                   
    148149         
     
    175176         
    176177        //setup form factor coefficient wave 
    177         Make/O/D/N=5 form_CYL_SW 
     178        Make/O/D/N=6 form_CYL_SW 
    178179        form_CYL_SW[0] = 1 
    179180        form_CYL_SW[1] = w[1] 
    180181        form_CYL_SW[2] = w[2] 
    181182        form_CYL_SW[3] = w[3] 
    182         form_CYL_SW[4] = 0 
     183        form_CYL_SW[4] = w[4] 
     184        form_CYL_SW[5] = 0 
    183185         
    184186        //setup structure factor coefficient wave 
     
    186188        struct_CYL_SW[0] = 0.5*DiamCyl(len,rad) 
    187189        struct_CYL_SW[1] = w[0] 
    188         struct_CYL_SW[2] = w[4] 
    189         struct_CYL_SW[3] = w[5] 
     190        struct_CYL_SW[2] = w[5] 
     191        struct_CYL_SW[3] = w[6] 
    190192         
    191193        //calculate each and combine 
     
    195197        yw = temp_CYL_SW_PQ * temp_CYL_SW_SQ 
    196198        yw *= w[0] 
    197         yw += w[6] 
     199        yw += w[7] 
    198200         
    199201        //cleanup waves 
     
    216218        Make/O/D/n=(num) xwave_CYL_SC,ywave_CYL_SC 
    217219        xwave_CYL_SC =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    218         Make/O/D coef_CYL_SC = {0.01,20.,400,3.0e-6,20,0,298,78,0.01} 
    219         make/o/t parameters_CYL_SC = {"volume fraction","radius (A)","length (A)","contrast (A^-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","incoh. bkg (cm^-1)"} 
     220        Make/O/D coef_CYL_SC = {0.01,20.,400,1e-6,6.3e-6,20,0,298,78,0.01} 
     221        make/o/t parameters_CYL_SC = {"volume fraction","radius (A)","length (A)","SLD cylinder (A^-2)","SLD solvent (A^-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","incoh. bkg (cm^-1)"} 
    220222        Edit parameters_CYL_SC,coef_CYL_SC 
    221223         
     
    250252         
    251253        // Setup parameter table for model function 
    252         Make/O/D smear_coef_CYL_SC = {0.01,20.,400,3.0e-6,20,0,298,78,0.01} 
    253         make/o/t smear_parameters_CYL_SC = {"volume fraction","radius (A)","length (A)","contrast (A^-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","incoh. bkg (cm^-1)"} 
     254        Make/O/D smear_coef_CYL_SC = {0.01,20.,400,1e-6,6.3e-6,20,0,298,78,0.01} 
     255        make/o/t smear_parameters_CYL_SC = {"volume fraction","radius (A)","length (A)","SLD cylinder (A^-2)","SLD solvent (A^-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","incoh. bkg (cm^-1)"} 
    254256        Edit smear_parameters_CYL_SC,smear_coef_CYL_SC                                   
    255257         
     
    282284         
    283285        //setup form factor coefficient wave 
    284         Make/O/D/N=5 form_CYL_SC 
     286        Make/O/D/N=6 form_CYL_SC 
    285287        form_CYL_SC[0] = 1 
    286288        form_CYL_SC[1] = w[1] 
    287289        form_CYL_SC[2] = w[2] 
    288290        form_CYL_SC[3] = w[3] 
    289         form_CYL_SC[4] = 0 
     291        form_CYL_SC[4] = w[4] 
     292        form_CYL_SC[5] = 0 
    290293         
    291294        //setup structure factor coefficient wave 
    292295        Make/O/D/N=6 struct_CYL_SC 
    293296        struct_CYL_SC[0] = DiamCyl(len,rad) 
    294         struct_CYL_SC[1] = w[4] 
     297        struct_CYL_SC[1] = w[5] 
    295298        struct_CYL_SC[2] = w[0] 
    296         struct_CYL_SC[3] = w[6] 
    297         struct_CYL_SC[4] = w[5] 
    298         struct_CYL_SC[5] = w[7] 
     299        struct_CYL_SC[3] = w[7] 
     300        struct_CYL_SC[4] = w[6] 
     301        struct_CYL_SC[5] = w[8] 
    299302         
    300303        //calculate each and combine 
     
    304307        yw = temp_CYL_SC_PQ * temp_CYL_SC_SQ 
    305308        yw *= w[0] 
    306         yw += w[8] 
     309        yw += w[9] 
    307310         
    308311        //cleanup waves 
     
    321324        Make/O/D/n=(num) xwave_CYL_SHS,ywave_CYL_SHS 
    322325        xwave_CYL_SHS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    323         Make/O/D coef_CYL_SHS = {0.01,20.0,400,3.0e-6,0.05,0.2,0.01} 
    324         make/o/t parameters_CYL_SHS = {"volume fraction","radius (A)","length (A)","contrast (A^-2)","perturbation parameter (0.1)","stickiness, tau","incoh. bkg (cm^-1)"} 
     326        Make/O/D coef_CYL_SHS = {0.01,20.0,400,1e-6,6.3e-6,0.05,0.2,0.01} 
     327        make/o/t parameters_CYL_SHS = {"volume fraction","radius (A)","length (A)","SLD cylinder (A^-2)","SLD solvent (A^-2)","perturbation parameter (0.1)","stickiness, tau","incoh. bkg (cm^-1)"} 
    325328        Edit parameters_CYL_SHS,coef_CYL_SHS 
    326329         
     
    350353         
    351354        // Setup parameter table for model function 
    352         Make/O/D smear_coef_CYL_SHS = {0.01,20.0,400,3.0e-6,0.05,0.2,0.01} 
    353         make/o/t smear_parameters_CYL_SHS = {"volume fraction","radius (A)","length (A)","contrast (A^-2)","perturbation parameter (0.1)","stickiness, tau","incoh. bkg (cm^-1)"} 
     355        Make/O/D smear_coef_CYL_SHS = {0.01,20.0,400,1e-6,6.3e-6,0.05,0.2,0.01} 
     356        make/o/t smear_parameters_CYL_SHS = {"volume fraction","radius (A)","length (A)","SLD cylinder (A^-2)","SLD solvent (A^-2)","perturbation parameter (0.1)","stickiness, tau","incoh. bkg (cm^-1)"} 
    354357        Edit smear_parameters_CYL_SHS,smear_coef_CYL_SHS                                         
    355358         
     
    382385         
    383386        //setup form factor coefficient wave 
    384         Make/O/D/N=5 form_CYL_SHS 
     387        Make/O/D/N=6 form_CYL_SHS 
    385388        form_CYL_SHS[0] = 1 
    386389        form_CYL_SHS[1] = w[1] 
    387390        form_CYL_SHS[2] = w[2] 
    388391        form_CYL_SHS[3] = w[3] 
    389         form_CYL_SHS[4] = 0 
     392        form_CYL_SHS[4] = w[4] 
     393        form_CYL_SHS[5] = 0 
    390394         
    391395        //setup structure factor coefficient wave 
     
    393397        struct_CYL_SHS[0] = 0.5*DiamCyl(len,rad) 
    394398        struct_CYL_SHS[1] = w[0] 
    395         struct_CYL_SHS[2] = w[4] 
    396         struct_CYL_SHS[3] = w[5] 
     399        struct_CYL_SHS[2] = w[5] 
     400        struct_CYL_SHS[3] = w[6] 
    397401         
    398402        //calculate each and combine 
     
    402406        yw = temp_CYL_SHS_PQ * temp_CYL_SHS_SQ 
    403407        yw *= w[0] 
    404         yw += w[6] 
     408        yw += w[7] 
    405409         
    406410        //cleanup waves 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/HollowCylinders.ipf

    r166 r236  
    1919        Make/O/D/n=(num) xwave_Hcyl,ywave_Hcyl 
    2020        xwave_Hcyl =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    21         Make/O/D coef_Hcyl = {1.,20.,30.,400,3.0e-6,0.01} 
    22         make/o/t parameters_Hcyl = {"scale","core radius (A)","shell radius (A)","length (A)","contrast (A^-2)","incoh. bkg (cm^-1)"} 
     21        Make/O/D coef_Hcyl = {1.,20.,30.,400,1.0e-6,6.3e-6,0.01} 
     22        make/o/t parameters_Hcyl = {"scale","core radius (A)","shell radius (A)","length (A)","SLD shell (A^-2)","SLD solvent (in/out)","incoh. bkg (cm^-1)"} 
    2323        Edit parameters_Hcyl,coef_Hcyl 
    2424        Variable/G root:g_hcyl 
     
    4848         
    4949        // Setup parameter table for model function 
    50         Make/O/D smear_coef_Hcyl = {1.,20.,30.,400,3.0e-6,0.01} 
    51         make/o/t smear_parameters_Hcyl = {"scale","core radius (A)","shell radius (A)","length (A)","contrast (A^-2)","incoh. bkg (cm^-1)"} 
     50        Make/O/D smear_coef_Hcyl = {1.,20.,30.,400,1.0e-6,6.3e-6,0.01} 
     51        make/o/t smear_parameters_Hcyl = {"scale","core radius (A)","shell radius (A)","length (A)","SLD shell (A^-2)","SLD solvent (in/out)","incoh. bkg (cm^-1)"} 
    5252        Edit smear_parameters_Hcyl,smear_coef_Hcyl 
    5353         
     
    9696        //[4] contrast (A^-2) 
    9797        //[5] background (cm^-1) 
    98         Variable scale,length,delrho,bkg,rcore,rshell,contrast 
     98        Variable scale,length,delrho,bkg,rcore,rshell,contrast,sldc,slds 
    9999        scale = w[0] 
    100100        rcore = w[1] 
    101101        rshell = w[2] 
    102102        length = w[3] 
    103         contrast = w[4] 
    104         bkg = w[5] 
     103        sldc = w[4] 
     104        slds = w[5] 
     105        contrast = sldc - slds 
     106        bkg = w[6] 
    105107// 
    106108// the OUTPUT form factor is <f^2>/Vcyl [cm-1] 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Models_2D/Cylinder_2D.ipf

    r230 r236  
    2828//      make/O/T/N=11 parameters_Cyl2D 
    2929//      Make/O/D/N=11 coef_Cyl2D 
    30         make/O/T/N=10 parameters_Cyl2D 
    31         Make/O/D/N=10 coef_Cyl2D 
     30        make/O/T/N=11 parameters_Cyl2D 
     31        Make/O/D/N=11 coef_Cyl2D 
    3232        coef_Cyl2D[0] = 1.0 
    3333        coef_Cyl2D[1] = 20.0 
    3434        coef_Cyl2D[2] = 60.0 
    35         coef_Cyl2D[3] = 6.0e-6 
    36         coef_Cyl2D[4] = 0.0 
    37         coef_Cyl2D[5] = 1.57 
    38         coef_Cyl2D[6] = 0.0 
     35        coef_Cyl2D[3] = 1e-6 
     36        coef_Cyl2D[4] = 6.3e-6 
     37        coef_Cyl2D[5] = 0.0 
     38        coef_Cyl2D[6] = 1.57 
    3939        coef_Cyl2D[7] = 0.0 
    4040        coef_Cyl2D[8] = 0.0 
    4141        coef_Cyl2D[9] = 0.0 
     42        coef_Cyl2D[10] = 0.0 
    4243         
    4344        // currently, the number of integration points is hard-wired to be 25 in Cylinder2D_T 
    44         //coef_Cyl2D[10] = 25 
     45        //coef_Cyl2D[11] = 25 
    4546        // 
    4647        parameters_Cyl2D[0] = "Scale" 
    4748        parameters_Cyl2D[1] = "Radius" 
    4849        parameters_Cyl2D[2] = "Length" 
    49         parameters_Cyl2D[3] = "Contrast" 
    50         parameters_Cyl2D[4] = "Background" 
    51         parameters_Cyl2D[5] = "Axis Theta" 
    52         parameters_Cyl2D[6] = "Axis Phi" 
     50        parameters_Cyl2D[3] = "SLD cylinder (A^-2)" 
     51        parameters_Cyl2D[4] = "SLD solvent" 
     52        parameters_Cyl2D[5] = "Background" 
     53        parameters_Cyl2D[6] = "Axis Theta" 
     54        parameters_Cyl2D[7] = "Axis Phi" 
    5355         
    54         parameters_Cyl2D[8] = "Sigma of polydisp in Theta [rad]"                //***** 
    55         parameters_Cyl2D[9] = "Sigma of polydisp in Phi [rad]"                  //***** 
    56         parameters_Cyl2D[7] = "Sigma of polydisp in Radius [A]"         //***** 
     56        parameters_Cyl2D[9] = "Sigma of polydisp in Theta [rad]"                //***** 
     57        parameters_Cyl2D[10] = "Sigma of polydisp in Phi [rad]"                 //***** 
     58        parameters_Cyl2D[8] = "Sigma of polydisp in Radius [A]"         //***** 
    5759         
    58 //      parameters_Cyl2D[10] = "number of integration points" 
     60//      parameters_Cyl2D[11] = "number of integration points" 
    5961 
    6062        Edit parameters_Cyl2D,coef_Cyl2D                                         
     
    102104//#if exists("CylinderModel_D") 
    103105// 
    104 //      Make/O/D/N=11 Cyl2D_tmp                         // there seems to be no speed penalty for doing this... 
     106//      Make/O/D/N=12 Cyl2D_tmp                         // there seems to be no speed penalty for doing this... 
    105107//      Cyl2D_tmp = cw 
    106 //      Cyl2D_tmp[10] = 25                                      // hard-wire the number of integration points 
     108//      Cyl2D_tmp[11] = 25                                      // hard-wire the number of integration points 
    107109//       
    108110//      zw= CylinderModel_D(Cyl2D_tmp,xw,yw) 
     
    123125#if exists("Cylinder_2DX")                      //to hide the function if XOP not installed 
    124126 
    125         Make/O/D/N=11 Cyl2D_tmp                         // there seems to be no speed penalty for doing this... 
     127        Make/O/D/N=12 Cyl2D_tmp                         // there seems to be no speed penalty for doing this... 
    126128        Cyl2D_tmp = cw 
    127         Cyl2D_tmp[10] = 25                                      // hard-wire the number of integration points 
    128         Cyl2D_tmp[4] = 0                                                // send a background of zero 
     129        Cyl2D_tmp[11] = 25                                      // hard-wire the number of integration points 
     130        Cyl2D_tmp[5] = 0                                                // send a background of zero 
    129131         
    130         zw[p1,p2]= Cylinder_2DX(Cyl2D_tmp,xw,yw) + cw[4]                //add in the proper background here 
     132        zw[p1,p2]= Cylinder_2DX(Cyl2D_tmp,xw,yw) + cw[5]                //add in the proper background here 
    131133 
    132134#endif 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Models_2D/Ellipsoid2D.ipf

    r230 r236  
    2929//      make/O/T/N=12 parameters_Ellip2D 
    3030//      Make/O/D/N=12 coef_Ellip2D 
    31         make/O/T/N=11 parameters_Ellip2D 
    32         Make/O/D/N=11 coef_Ellip2D 
     31        make/O/T/N=12 parameters_Ellip2D 
     32        Make/O/D/N=12 coef_Ellip2D 
    3333         
    3434        coef_Ellip2D[0] = 1.0 
     
    3636        coef_Ellip2D[2] = 60.0 
    3737        coef_Ellip2D[3] = 1.0e-6 
    38         coef_Ellip2D[4] = 0.0 
    39         coef_Ellip2D[5] = 1.57 
    40         coef_Ellip2D[6] = 0.0 
     38        coef_Ellip2D[4] = 6.3e-6 
     39        coef_Ellip2D[5] = 0.0 
     40        coef_Ellip2D[6] = 1.57 
    4141        coef_Ellip2D[7] = 0.0 
    4242        coef_Ellip2D[8] = 0.0 
    4343        coef_Ellip2D[9] = 0.0 
    4444        coef_Ellip2D[10] = 0.0 
     45        coef_Ellip2D[11] = 0.0 
    4546        // hard-wire the number of integration points 
    46 //      coef_Ellip2D[11] = 10 
     47//      coef_Ellip2D[12] = 10 
    4748         
    4849        parameters_Ellip2D[0] = "Scale" 
    4950        parameters_Ellip2D[1] = "Radius_a (rotation axis)" 
    5051        parameters_Ellip2D[2] = "Radius_b" 
    51         parameters_Ellip2D[3] = "Contrast" 
    52         parameters_Ellip2D[4] = "Background" 
    53         parameters_Ellip2D[5] = "Axis Theta" 
    54         parameters_Ellip2D[6] = "Axis Phi" 
    55         parameters_Ellip2D[7] = "Sigma of polydisp in R_a [Angstrom]" 
    56         parameters_Ellip2D[8] = "Sigma of polydisp in R_b [Angstrom]" 
    57         parameters_Ellip2D[9] = "Sigma of polydisp in Theta [rad]" 
    58         parameters_Ellip2D[10] = "Sigma of polydisp in Phi [rad]" 
     52        parameters_Ellip2D[3] = "SLD cylinder (A^-2)" 
     53        parameters_Ellip2D[4] = "SLD solvent" 
     54        parameters_Ellip2D[5] = "Background" 
     55        parameters_Ellip2D[6] = "Axis Theta" 
     56        parameters_Ellip2D[7] = "Axis Phi" 
     57        parameters_Ellip2D[8] = "Sigma of polydisp in R_a [Angstrom]" 
     58        parameters_Ellip2D[9] = "Sigma of polydisp in R_b [Angstrom]" 
     59        parameters_Ellip2D[10] = "Sigma of polydisp in Theta [rad]" 
     60        parameters_Ellip2D[11] = "Sigma of polydisp in Phi [rad]" 
    5961         
    60 //      parameters_Ellip2D[11] = "Num of polydisp points" 
     62//      parameters_Ellip2D[12] = "Num of polydisp points" 
    6163 
    6264         
     
    105107//#if exists("EllipsoidModel_D") 
    106108// 
    107 //      Make/O/D/N=12 Ellip2D_tmp 
     109//      Make/O/D/N=13 Ellip2D_tmp 
    108110//      Ellip2D_tmp = cw 
    109 //      Ellip2D_tmp[11] = 25 
     111//      Ellip2D_tmp[12] = 25 
    110112//       
    111113//      zw = EllipsoidModel_D(Ellip2D_tmp,xw,yw) 
     
    126128#if exists("Ellipsoid_2DX")                     //to hide the function if XOP not installed 
    127129 
    128         Make/O/D/N=12 Ellip2D_tmp 
     130        Make/O/D/N=13 Ellip2D_tmp 
    129131        Ellip2D_tmp = cw 
    130         Ellip2D_tmp[11] = 25 
    131         Ellip2D_tmp[4] = 0              //pass in a zero background and add it in later 
     132        Ellip2D_tmp[12] = 25 
     133        Ellip2D_tmp[5] = 0              //pass in a zero background and add it in later 
    132134         
    133         zw[p1,p2]= Ellipsoid_2DX(Ellip2D_tmp,xw,yw) + cw[4] 
     135        zw[p1,p2]= Ellipsoid_2DX(Ellip2D_tmp,xw,yw) + cw[5] 
    134136         
    135137#endif 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Models_2D/EllipticalCylinder2D.ipf

    r230 r236  
    2727        //make/O/T/N=14 parameters_EllCyl2D 
    2828        //Make/O/D/N=14 coef_EllCyl2D 
    29         make/O/T/N=13 parameters_EllCyl2D 
    30         Make/O/D/N=13 coef_EllCyl2D 
     29        make/O/T/N=14 parameters_EllCyl2D 
     30        Make/O/D/N=14 coef_EllCyl2D 
    3131         
    3232        coef_EllCyl2D[0] = 1.0 
     
    3535        coef_EllCyl2D[3] = 400.0 
    3636        coef_EllCyl2D[4] = 3e-6 
    37         coef_EllCyl2D[5] = 0.0 
    38         coef_EllCyl2D[6] = 1.57 
    39         coef_EllCyl2D[7] = 0.0 
     37        coef_EllCyl2D[5] = 6.3e-6 
     38        coef_EllCyl2D[6] = 0.0 
     39        coef_EllCyl2D[7] = 1.57 
    4040        coef_EllCyl2D[8] = 0.0 
    4141        coef_EllCyl2D[9] = 0.0 
     
    4343        coef_EllCyl2D[11] = 0.0 
    4444        coef_EllCyl2D[12] = 0.0 
     45        coef_EllCyl2D[13] = 0.0 
    4546         
    4647        // now hard-wire the # of integration points 
    47         //coef_EllCyl2D[13] = 25 
     48        //coef_EllCyl2D[14] = 25 
    4849                 
    4950        parameters_EllCyl2D[0] = "Scale" 
     
    5152        parameters_EllCyl2D[2] = "R_ratio (major/minor)" 
    5253        parameters_EllCyl2D[3] = "Length" 
    53         parameters_EllCyl2D[4] = "Contrast" 
    54         parameters_EllCyl2D[5] = "Background" 
    55         parameters_EllCyl2D[6] = "Axis Theta" 
    56         parameters_EllCyl2D[7] = "Axis Phi" 
    57         parameters_EllCyl2D[8] = "Ellipse Psi" 
    58         parameters_EllCyl2D[9] = "Sigma of polydisp in R_minor [Angstrom]" 
    59         parameters_EllCyl2D[10] = "Sigma of polydisp in R_ratio" 
    60         parameters_EllCyl2D[11] = "Sigma of polydisp in Theta [rad]" 
    61         parameters_EllCyl2D[12] = "Sigma of polydisp in Phi [rad]" 
    62         //parameters_EllCyl2D[13] = "Num of polydisp points" 
     54        parameters_EllCyl2D[4] = "SLD cylinder (A^-2)" 
     55        parameters_EllCyl2D[5] = "SLD solvent" 
     56        parameters_EllCyl2D[6] = "Background" 
     57        parameters_EllCyl2D[7] = "Axis Theta" 
     58        parameters_EllCyl2D[8] = "Axis Phi" 
     59        parameters_EllCyl2D[9] = "Ellipse Psi" 
     60        parameters_EllCyl2D[10] = "Sigma of polydisp in R_minor [Angstrom]" 
     61        parameters_EllCyl2D[11] = "Sigma of polydisp in R_ratio" 
     62        parameters_EllCyl2D[12] = "Sigma of polydisp in Theta [rad]" 
     63        parameters_EllCyl2D[13] = "Sigma of polydisp in Phi [rad]" 
     64        //parameters_EllCyl2D[14] = "Num of polydisp points" 
    6365         
    6466        Edit parameters_EllCyl2D,coef_EllCyl2D                                   
     
    106108//#if exists("EllipticalCylinderModel_D") 
    107109// 
    108 //      Make/O/D/N=14 EllCyl2D_tmp 
     110//      Make/O/D/N=15 EllCyl2D_tmp 
    109111//      EllCyl2D_tmp = cw 
    110 //      EllCyl2D_tmp[13] = 25 
     112//      EllCyl2D_tmp[14] = 25 
    111113//       
    112114//      zw = EllipticalCylinderModel_D(EllCyl2D_tmp,xw,yw) 
     
    127129#if exists("EllipticalCylinder_2DX")                    //to hide the function if XOP not installed 
    128130 
    129         Make/O/D/N=14 EllCyl2D_tmp 
     131        Make/O/D/N=15 EllCyl2D_tmp 
    130132        EllCyl2D_tmp = cw 
    131         EllCyl2D_tmp[13] = 25 
    132         EllCyl2D_tmp[5] = 0             //pass in a zero background and add it in later 
     133        EllCyl2D_tmp[14] = 25 
     134        EllCyl2D_tmp[6] = 0             //pass in a zero background and add it in later 
    133135         
    134         zw[p1,p2]= EllipticalCylinder_2DX(EllCyl2D_tmp,xw,yw) + cw[5] 
     136        zw[p1,p2]= EllipticalCylinder_2DX(EllCyl2D_tmp,xw,yw) + cw[6] 
    135137         
    136138#endif 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Models_2D/Sphere_2D.ipf

    r230 r236  
    2424        SetDataFolder $("root:"+str) 
    2525         
    26         Make/O/D coef_sf2D = {1.,60,1e-6,0.01}                                           
    27         make/o/t parameters_sf2D = {"scale","Radius (A)","contrast (-2)","bkgd (cm-1)"}                 
     26        Make/O/D coef_sf2D = {1.,60,1e-6,6.3e-6,0.01}                                            
     27        make/o/t parameters_sf2D = {"scale","Radius (A)","SLD sphere (A-2)","SLD solvent","bkgd (cm-1)"}                 
    2828        Edit parameters_sf2D,coef_sf2D                           
    2929         
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/NewModels_2006/Cylinder_PolyLength.ipf

    r166 r236  
    2525        make/o/d/n=(num) xwave_cypl,ywave_cypl 
    2626        xwave_cypl = alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    27         make/o/d coef_cypl = {1.,20.,1000,0.2,3.0e-6,0.01} 
    28         make/o/t parameters_cypl = {"scale","radius (A)","length (A)","polydispersity of Length","SLD diff (A^-2)","incoh. bkg (cm^-1)"} 
     27        make/o/d coef_cypl = {1.,20.,1000,0.2,1e-6,6.3e-6,0.01} 
     28        make/o/t parameters_cypl = {"scale","radius (A)","length (A)","polydispersity of Length","SLD cylinder (A^-2)","SLD solvent (A^-2)","incoh. bkg (cm^-1)"} 
    2929        Edit parameters_cypl,coef_cypl 
    3030         
     
    5353         
    5454        // Setup parameter table for model function 
    55         make/o/D smear_coef_cypl = {1.,20.,1000,0.2,3.0e-6,0.01} 
    56         make/o/t smear_parameters_cypl = {"scale","radius (A)","length (A)","polydispersity of Length","SLD diff (A^-2)","incoh. bkg (cm^-1)"} 
     55        make/o/D smear_coef_cypl = {1.,20.,1000,0.2,1e-6,6.3e-6,0.01} 
     56        make/o/t smear_parameters_cypl = {"scale","radius (A)","length (A)","polydispersity of Length","SLD cylinder (A^-2)","SLD solvent (A^-2)","incoh. bkg (cm^-1)"} 
    5757        Edit smear_parameters_cypl,smear_coef_cypl 
    5858         
     
    105105        //[4] contrast (A^-2) 
    106106        //[5] background (cm^-1) 
    107         Variable scale,radius,pd,delrho,bkg,zz,length 
     107        Variable scale,radius,pd,delrho,bkg,zz,length,sldc,slds 
    108108        scale = w[0] 
    109109        radius = w[1] 
    110110        length = w[2] 
    111111        pd = w[3] 
    112         delrho = w[4] 
    113         bkg = w[5] 
     112        sldc = w[4] 
     113        slds = w[5] 
     114        delrho = sldc - slds 
     115        bkg = w[6] 
    114116         
    115117        zz = (1/pd)^2-1 
     
    168170        // Using 5 Gauss points          
    169171                zi = ( zGau[ii]*(vb-va) + vb + va )/2.0          
    170                 yyy = wtGau[ii] * len_kernel(qq,radius,length,zz,delrho,zi) 
     172                yyy = wtGau[ii] * len_kernel(qq,radius,length,zz,sldc,slds,zi) 
    171173                summ = yyy + summ 
    172174                ii+=1 
     
    194196End             //End of function PolyRadCylForm() 
    195197 
    196 Function len_kernel(qw,rad,len_avg,zz,delrho,len) 
    197         Variable qw,rad,len_avg,zz,delrho,len 
     198Function len_kernel(qw,rad,len_avg,zz,sldc,slds,len) 
     199        Variable qw,rad,len_avg,zz,sldc,slds,len 
    198200         
    199201        Variable Pq,vcyl,dl 
     
    201203        //calculate the orientationally averaged P(q) for the input rad 
    202204        //this is correct - see K&C (1983) or Lin &Tsao JACryst (1996)29 170. 
    203         Make/O/n=5 kernpar 
     205        Make/O/n=6 kernpar 
    204206        Wave kp = kernpar 
    205207        kp[0] = 1               //scale fixed at 1 
    206208        kp[1] = rad 
    207209        kp[2] = len 
    208         kp[3] = delrho 
    209         kp[4] = 0               //bkg fixed at 0 
     210        kp[3] = sldc 
     211        kp[4] = slds 
     212        kp[5] = 0               //bkg fixed at 0 
    210213         
    211214#if exists("CylinderFormX") 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/NewModels_2006/Cylinder_PolyRadius.ipf

    r211 r236  
    2525        make/o/d/n=(num) xwave_cypr,ywave_cypr 
    2626        xwave_cypr = alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    27         make/o/d coef_cypr = {1.,20.,400,0.2,3.0e-6,0.01} 
    28         make/o/t parameters_cypr = {"scale","radius (A)","length (A)","polydispersity of Radius","SLD diff (A^-2)","incoh. bkg (cm^-1)"} 
     27        make/o/d coef_cypr = {1.,20.,400,0.2,1e-6,6.3e-6,0.01} 
     28        make/o/t parameters_cypr = {"scale","radius (A)","length (A)","polydispersity of Radius","SLD cylinder (A^-2)","SLD solvent (A^-2)","incoh. bkg (cm^-1)"} 
    2929        Edit parameters_cypr,coef_cypr 
    3030         
     
    5454         
    5555        // Setup parameter table for model function 
    56         make/o/D smear_coef_cypr = {1.,20.,400,0.2,3.0e-6,0.01} 
    57         make/o/t smear_parameters_cypr = {"scale","radius (A)","length (A)","polydispersity of Radius","SLD diff (A^-2)","incoh. bkg (cm^-1)"} 
     56        make/o/D smear_coef_cypr = {1.,20.,400,0.2,1e-6,6.3e-6,0.01} 
     57        make/o/t smear_parameters_cypr = {"scale","radius (A)","length (A)","polydispersity of Radius","SLD cylinder (A^-2)","SLD solvent (A^-2)","incoh. bkg (cm^-1)"} 
    5858        Edit smear_parameters_cypr,smear_coef_cypr 
    5959         
     
    8282// simply calls the original single point calculation with 
    8383// a wave assignment (this will behave nicely if given point ranges) 
    84 Function xCyl_PolyRadius(cw,yw,xw) : FitFunc 
    85         Wave cw,yw,xw 
    86          
    87 #if exists("Cyl_PolyRadiusX") 
    88         yw = Cyl_PolyRadiusX(cw,xw) 
    89 #else 
    90         yw = fCyl_PolyRadius(cw,xw) 
    91 #endif 
    92         return(0) 
    93 End 
     84//Function Cyl_PolyRadius(cw,yw,xw) : FitFunc 
     85//      Wave cw,yw,xw 
     86//       
     87//#if exists("Cyl_PolyRadiusX") 
     88//      yw = Cyl_PolyRadiusX(cw,xw) 
     89//#else 
     90//      yw = fCyl_PolyRadius(cw,xw) 
     91//#endif 
     92//      return(0) 
     93//End 
    9494 
    9595Function fCyl_PolyRadius(w,x) :FitFunc 
     
    102102        //[2] Length (A) 
    103103        //[3] polydispersity (0<p<1) 
    104         //[4] contrast (A^-2) 
    105         //[5] background (cm^-1) 
    106         Variable scale,radius,pd,delrho,bkg,zz,length 
     104        //[4] sld cylinder (A^-2) 
     105        //[5] sld solvent 
     106        //[6] background (cm^-1) 
     107        Variable scale,radius,pd,delrho,bkg,zz,length,sldc,slds 
    107108        scale = w[0] 
    108109        radius = w[1] 
    109110        length = w[2] 
    110111        pd = w[3] 
    111         delrho = w[4] 
    112         bkg = w[5] 
    113          
     112        sldc = w[4] 
     113        slds = w[5] 
     114        bkg = w[6] 
     115         
     116        delrho = sldc - slds 
    114117        zz = (1/pd)^2-1 
    115118// 
     
    172175        // Using 5 Gauss points          
    173176                zi = ( zGau[ii]*(vb-va) + vb + va )/2.0          
    174                 yyy = wtGau[ii] * rad_kernel(qq,radius,length,zz,delrho,zi) 
     177                yyy = wtGau[ii] * rad_kernel(qq,radius,length,zz,sldc,slds,zi) 
    175178                summ = yyy + summ 
    176179                ii+=1 
     
    198201End             //End of function PolyRadCylForm() 
    199202 
    200 Function rad_kernel(qw,ravg,len,zz,delrho,rad) 
    201         Variable qw,ravg,len,zz,delrho,rad 
     203Function rad_kernel(qw,ravg,len,zz,sldc,slds,rad) 
     204        Variable qw,ravg,len,zz,sldc,slds,rad 
    202205         
    203206        Variable Pq,vcyl,dr 
     
    205208        //calculate the orientationally averaged P(q) for the input rad 
    206209        //this is correct - see K&C (1983) or Lin &Tsao JACryst (1996)29 170. 
    207         Make/O/D/n=5 kernpar 
     210        Make/O/D/n=6 kernpar 
    208211        Wave kp = kernpar 
    209212        kp[0] = 1               //scale fixed at 1 
    210213        kp[1] = rad 
    211214        kp[2] = len 
    212         kp[3] = delrho 
    213         kp[4] = 0               //bkg fixed at 0 
     215        kp[3] = sldc 
     216        kp[4] = slds 
     217        kp[5] = 0               //bkg fixed at 0 
    214218         
    215219#if exists("CylinderFormX") 
     
    287291        Variable p1,p2 
    288292         
    289 #if exists("Cyl_PolyRadiusX") 
     293#if exists("Cyl_PolyRadiusX")                   //this check is done in the calling function, simply hide from compiler 
    290294        yw[p1,p2] = Cyl_PolyRadiusX(cw,xw) 
    291 #else 
    292         yw[p1,p2] = fCyl_PolyRadius(cw,xw) 
     295//#else 
     296//      yw[p1,p2] = fCyl_PolyRadius(cw,xw) 
    293297#endif 
    294298 
     
    307311        Wave cw,yw,xw 
    308312         
     313#if exists("Cyl_PolyRadiusX") 
     314 
    309315        Variable npt=numpnts(yw) 
    310316        Variable i,nthreads= ThreadProcessorCount 
     
    326332//      Print "elapsed time = ",(StopMSTimer(-2) - t1)/1e6 
    327333         
     334#else 
     335                yw = fCyl_PolyRadius(cw,xw)             //the Igor, non-XOP, non-threaded calculation 
     336#endif 
    328337        return(0) 
    329338End 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/NewModels_2006/EllipticalCylinder.ipf

    r166 r236  
    2727        Make/O/D/n=(num) xwave_ecf,ywave_ecf 
    2828        xwave_ecf =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    29         Make/O/D coef_ecf = {1.,20.,1.5,400,3.0e-6,0.0} 
    30         make/o/t parameters_ecf = {"scale","minor radius (A)","nu = major/minor (-)","length ()","SLD diff (A^-2)","incoh. bkg (cm^-1)"} 
     29        Make/O/D coef_ecf = {1.,20.,1.5,400,1.0e-6,6.3e-6,0.0} 
     30        make/o/t parameters_ecf = {"scale","minor radius (A)","nu = major/minor (-)","length ()","SLD cylinder (A^-2)","SLD solvent (A^-2)","incoh. bkg (cm^-1)"} 
    3131        Edit parameters_ecf,coef_ecf 
    3232         
     
    5656         
    5757        // Setup parameter table for model function 
    58         Make/O/D smear_coef_ecf =  {1.,20.,1.5,400,3.0e-6,0.0} 
    59         make/o/t smear_parameters_ecf = {"scale","minor radius (A)","nu = major/minor (-)","length ()","SLD diff (A^-2)","incoh. bkg (cm^-1)"} 
     58        Make/O/D smear_coef_ecf =  {1.,20.,1.5,400,1.0e-6,6.3e-6,0.0} 
     59        make/o/t smear_parameters_ecf = {"scale","minor radius (A)","nu = major/minor (-)","length ()","SLD cylinder (A^-2)","SLD solvent (A^-2)","incoh. bkg (cm^-1)"} 
    6060        Edit smear_parameters_ecf,smear_coef_ecf 
    6161         
     
    102102        Variable x 
    103103         
    104         Variable inten,scale,rad,nu,len,contr,bkg,ii 
     104        Variable inten,scale,rad,nu,len,contr,bkg,ii,sldc,slds 
    105105        scale = w[0] 
    106106        rad = w[1] 
    107107        nu = w[2] 
    108108        len = w[3] 
    109         contr = w[4] 
    110         bkg = w[5] 
     109        sldc = w[4] 
     110        slds = w[5] 
     111        contr = sldc - slds 
     112        bkg = w[6] 
    111113         
    112114        inten = IntegrateFn20(EllipCyl_Integrand,0,1,w,x) 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/NewModels_2006/FlexCyl_EllipCross.ipf

    r166 r236  
    2424        Make/O/D/n=(num) xwave_fleell,ywave_fleell 
    2525        xwave_fleell =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    26         Make/O/D coef_fleell = {1.,1000,100,20,1.5,3.0e-6,0.0001} 
    27         make/o/t parameters_fleell = {"scale","Contour Length (A)","Kuhn Length, b (A)","Minor Radius (a) (A)","Axis Ratio = major/a","contrast (A^-2)","bkgd (arb)"} 
     26        Make/O/D coef_fleell = {1.,1000,100,20,1.5,1e-6,6.3e-6,0.0001} 
     27        make/o/t parameters_fleell = {"scale","Contour Length (A)","Kuhn Length, b (A)","Minor Radius (a) (A)","Axis Ratio = major/a","SLD cylinder (A^-2)","SLD solvent (A^-2)","bkgd (arb)"} 
    2828        Edit parameters_fleell,coef_fleell 
    2929         
     
    5252         
    5353        // Setup parameter table for model function 
    54         Make/O/D smear_coef_fleell = {1.,1000,100,20,1.5,3.0e-6,0.0001} 
    55         make/o/t smear_parameters_fleell = {"scale","ContourLength (A)","KuhnLength, b (A)","Minor Radius (a) (A)","Axis Ratio = major/a","contrast (A^-2)","bkgd (arb)"} 
     54        Make/O/D smear_coef_fleell = {1.,1000,100,20,1.5,1e-6,6.3e-6,0.0001} 
     55        make/o/t smear_parameters_fleell = {"scale","Contour Length (A)","Kuhn Length, b (A)","Minor Radius (a) (A)","Axis Ratio = major/a","SLD cylinder (A^-2)","SLD solvent (A^-2)","bkgd (arb)"} 
    5656        Edit smear_parameters_fleell,smear_coef_fleell                                  //display parameters in a table 
    5757         
     
    102102        //ww[3] = rad [A] cross-sectional radius 
    103103        //ww[4] = ellRatio = major/minor axis (greater than one) 
    104         //ww[5] = contrast [A^-2] 
    105         //ww[6] = bkg [cm-1] 
    106         Variable scale,L,B,bkg,rad,qr,cont,ellRatio 
     104        //ww[5] = sld cylinder [A^-2] 
     105        //ww[6] = sld solvent 
     106        //ww[7] = bkg [cm-1] 
     107        Variable scale,L,B,bkg,rad,qr,cont,ellRatio,sldc,slds 
    107108         
    108109        scale = ww[0] 
     
    111112        rad = ww[3] 
    112113        ellRatio = ww[4] 
    113         cont = ww[5] 
    114         bkg = ww[6] 
     114        sldc = ww[5] 
     115        slds = ww[6] 
     116        bkg = ww[7] 
     117         
     118        cont = sldc-slds 
    115119        qr = x*rad              //used for cross section contribution only 
    116120         
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/NewModels_2006/FlexCyl_PolyLen.ipf

    r166 r236  
    1717        Make/O/D/n=(num) xwave_flepl,ywave_flepl 
    1818        xwave_flepl =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    19         Make/O/D coef_flepl = {1.,1000,0.001,100,20,3.0e-6,0.0001} 
    20         make/o/t parameters_flepl =  {"scale","Contour Length (A)","polydispersity of Contour Length","Kuhn Length, b (A)","Radius (A)","contrast (A^-2)","bkgd (cm^-1)"} 
     19        Make/O/D coef_flepl = {1.,1000,0.001,100,20,1e-6,6.3e-6,0.0001} 
     20        make/o/t parameters_flepl =  {"scale","Contour Length (A)","polydispersity of Contour Length","Kuhn Length, b (A)","Radius (A)","SLD cylinder (A^-2)","SLD solvent (A^-2)","bkgd (cm^-1)"} 
    2121        Edit parameters_flepl,coef_flepl 
    2222         
     
    4545         
    4646        // Setup parameter table for model function 
    47         Make/O/D smear_coef_flepl = {1.,1000,0.001,100,20,3.0e-6,0.0001}                //CH#4 
    48         make/o/t smear_parameters_flepl = {"scale","Contour Length (A)","polydispersity of Contour Length","Kuhn Length, b (A)","Radius (A)","contrast (A^-2)","bkgd (cm^-1)"} 
     47        Make/O/D smear_coef_flepl = {1.,1000,0.001,100,20,1e-6,6.3e-6,0.0001}           //CH#4 
     48        make/o/t smear_parameters_flepl = {"scale","Contour Length (A)","polydispersity of Contour Length","Kuhn Length, b (A)","Radius (A)","SLD cylinder (A^-2)","SLD solvent (A^-2)","bkgd (cm^-1)"} 
    4949        Edit smear_parameters_flepl,smear_coef_flepl                                    //display parameters in a table 
    5050         
     
    9999        Variable x 
    100100       
    101         Variable scale,radius,pd,delrho,bkg,zz,length,lb 
     101        Variable scale,radius,pd,delrho,bkg,zz,length,lb,sldc,slds 
    102102        scale = w[0] 
    103103        length = w[1] 
     
    105105        lb = w[3] 
    106106        radius = w[4] 
    107         delrho = w[5] 
    108         bkg = w[6] 
     107        sldc = w[5] 
     108        slds = w[6] 
     109        bkg = w[7] 
     110         
     111        delrho = sldc-slds 
    109112         
    110113        zz = (1/pd)^2-1 
     
    157160   do 
    158161                zi = ( zGau[ii]*(vb-va) + vb + va )/2.0          
    159                 yyy = wtGau[ii] * fle_kernel(qq,radius,length,lb,zz,delrho,zi) 
     162                yyy = wtGau[ii] * fle_kernel(qq,radius,length,lb,zz,sldc,slds,zi) 
    160163                summ = yyy + summ 
    161164                ii+=1 
     
    183186End             //End of function PolyLenExclVolCyl(w,x) 
    184187 
    185 Function fle_kernel(qw,rad,len_avg,lb,zz,delrho,len_i) 
    186         Variable qw,rad,len_avg,lb,zz,delrho,len_i 
     188Function fle_kernel(qw,rad,len_avg,lb,zz,sldc,slds,len_i) 
     189        Variable qw,rad,len_avg,lb,zz,sldc,slds,len_i 
    187190         
    188191        //ww[0] = scale 
     
    190193        //ww[2] = B [A] 
    191194        //ww[3] = rad [A] cross-sectional radius 
    192         //ww[4] = contrast [A^-2] 
    193         //ww[5] = bkg [cm-1] 
     195        //ww[4] = sld cyl [A^-2] 
     196        //ww[5] = sld solv 
     197        //ww[6] = bkg [cm-1] 
    194198        Variable Pq,vcyl,dl 
    195         Make/O/n=6 fle_ker 
     199        Make/O/n=7 fle_ker 
    196200        Wave kp = fle_ker 
    197201        kp[0] = 1               //scale fixed at 1 
     
    199203        kp[2] = lb 
    200204        kp[3] = rad 
    201         kp[4] = delrho 
    202         kp[5] = 0               //bkg fixed at 0 
     205        kp[4] = sldc 
     206        kp[5] = slds 
     207        kp[6] = 0               //bkg fixed at 0 
    203208         
    204209#if exists("FlexExclVolCylX") 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/NewModels_2006/FlexCyl_PolyRadius.ipf

    r166 r236  
    1515        Make/O/D/n=(num) xwave_fcpr,ywave_fcpr 
    1616        xwave_fcpr = alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    17         Make/O/D coef_fcpr = {1.,1000,100,20,0.2,3.0e-6,0.0001} 
    18         make/o/t parameters_fcpr = {"scale","Contour Length (A)","Kuhn Length, b (A)","Radius (A)","polydispersity of radius","contrast (A^-2)","bkgd (cm^-1)"} 
     17        Make/O/D coef_fcpr = {1.,1000,100,20,0.2,1e-6,6.3e-6,0.0001} 
     18        make/o/t parameters_fcpr = {"scale","Contour Length (A)","Kuhn Length, b (A)","Radius (A)","polydispersity of radius","SLD cylinder (A^-2)","SLD solvent (A^-2)","bkgd (cm^-1)"} 
    1919        Edit parameters_fcpr,coef_fcpr 
    2020         
     
    4343         
    4444        // Setup parameter table for model function 
    45         Make/O/D smear_coef_fcpr = {1.,1000,100,20,0.2,3.0e-6,0.0001}                    
    46         make/o/t smear_parameters_fcpr = {"scale","Contour Length (A)","Kuhn Length, b (A)","Radius (A)","polydispersity of radius","contrast (A^-2)","bkgd (cm^-1)"}            
     45        Make/O/D smear_coef_fcpr = {1.,1000,100,20,0.2,1e-6,6.3e-6,0.0001}                       
     46        make/o/t smear_parameters_fcpr = {"scale","Contour Length (A)","Kuhn Length, b (A)","Radius (A)","polydispersity of radius","SLD cylinder (A^-2)","SLD solvent (A^-2)","bkgd (cm^-1)"}           
    4747        Edit smear_parameters_fcpr,smear_coef_fcpr                                       
    4848         
     
    9494        //[3] radius (A) 
    9595        //[4] polydispersity of radius (0<p<1) 
    96         //[5] contrast (A^-2) 
    97         //[6] background (cm^-1) 
    98         Variable scale,radius,pd,delrho,bkg,zz,Lc,Lb 
     96        //[5] sld cylinder (A^-2) 
     97        //[6] sld solvent 
     98        //[7] background (cm^-1) 
     99        Variable scale,radius,pd,delrho,bkg,zz,Lc,Lb,sldc,slds 
    99100        scale = w[0] 
    100101        Lc = w[1] 
     
    102103        radius = w[3] 
    103104        pd = w[4] 
    104         delrho = w[5] 
    105         bkg = w[6] 
    106          
     105        sldc = w[5] 
     106        slds = w[6] 
     107        bkg = w[7] 
     108         
     109        delrho = sldc - slds 
    107110        zz = (1/pd)^2-1 
    108111// 
     
    165168        // Using 5 Gauss points          
    166169                zi = ( zGau[ii]*(vb-va) + vb + va )/2.0          
    167                 yyy = wtGau[ii] * fle_rad_kernel(qq,radius,Lc,Lb,zz,delrho,zi) 
     170                yyy = wtGau[ii] * fle_rad_kernel(qq,radius,Lc,Lb,zz,sldc,slds,zi) 
    168171                summ = yyy + summ 
    169172                ii+=1 
     
    191194End             //End of function PolyRadCylForm() 
    192195 
    193 Function fle_rad_kernel(qw,ravg,Lc,Lb,zz,delrho,rad) 
    194         Variable qw,ravg,Lc,Lb,zz,delrho,rad 
     196Function fle_rad_kernel(qw,ravg,Lc,Lb,zz,sldc,slds,rad) 
     197        Variable qw,ravg,Lc,Lb,zz,sldc,slds,rad 
    195198         
    196199        Variable Pq,vcyl,dr 
     
    198201        //calculate the orientationally averaged P(q) for the input rad 
    199202        //this is correct - see K&C (1983) or Lin &Tsao JACryst (1996)29 170. 
    200         Make/O/n=6 kernpar 
     203        Make/O/n=7 kernpar 
    201204        Wave kp = kernpar 
    202205        kp[0] = 1               //scale fixed at 1 
     
    204207        kp[2] = Lb 
    205208        kp[3] = rad 
    206         kp[4] = delrho 
    207         kp[5] = 0               //bkg fixed at 0 
     209        kp[4] = sldc 
     210        kp[5] = slds 
     211        kp[6] = 0               //bkg fixed at 0 
    208212         
    209213#if exists("FlexExclVolCylX") 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/NewModels_2006/FlexibleCylinder.ipf

    r166 r236  
    2727        Make/O/D/n=(num) xwave_fle,ywave_fle 
    2828        xwave_fle =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    29         Make/O/D coef_fle = {1.,1000,100,20,3.0e-6,0.0001} 
    30         make/o/t parameters_fle = {"scale","Contour Length (A)","Kuhn Length, b (A)","Radius (A)","contrast (A^-2)","bkgd (cm^-1)"} 
     29        Make/O/D coef_fle = {1.,1000,100,20,1.0e-6,6.3e-6,0.0001} 
     30        make/o/t parameters_fle = {"scale","Contour Length (A)","Kuhn Length, b (A)","Radius (A)","SLD cylinder (A^-2)","SLD solvent (A^-2)","bkgd (cm^-1)"} 
    3131        Edit parameters_fle,coef_fle 
    3232         
     
    5656         
    5757        // Setup parameter table for model function 
    58         Make/O/D smear_coef_fle = {1.,1000,100,20,3.0e-6,0.0001}                                         
    59         make/o/t smear_parameters_fle = {"scale","ContourLength (A)","KuhnLength, b (A)","Radius (A)","contrast (A^-2)","bkgd (cm^-1)"}          
     58        Make/O/D smear_coef_fle = {1.,1000,100,20,1.0e-6,6.3e-6,0.0001}                                  
     59        make/o/t smear_parameters_fle = {"scale","Contour Length (A)","Kuhn Length, b (A)","Radius (A)","SLD cylinder (A^-2)","SLD solvent (A^-2)","bkgd (cm^-1)"}               
    6060        Edit smear_parameters_fle,smear_coef_fle                                         
    6161         
     
    103103        //ww[2] = B [A] 
    104104        //ww[3] = rad [A] cross-sectional radius 
    105         //ww[4] = contrast [A^-2] 
    106         //ww[5] = bkg [cm-1] 
    107         Variable scale,L,B,bkg,rad,qr,cont 
     105        //ww[4] = sld cylinder 
     106        //ww[5] = sld solvent [A^-2] 
     107        //ww[6] = bkg [cm-1] 
     108        Variable scale,L,B,bkg,rad,qr,cont,sldc,slds 
    108109         
    109110        scale = ww[0] 
     
    111112        B = ww[2] 
    112113        rad = ww[3] 
    113         cont = ww[4] 
    114         bkg = ww[5] 
     114        sldc = ww[4] 
     115        slds = ww[5] 
     116        bkg = ww[6] 
    115117        qr = x*rad              //used for cross section contribution only 
     118         
     119        cont = sldc-slds 
    116120         
    117121        Variable flex,crossSect 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/NewModels_2006/GaussSpheres.ipf

    r169 r236  
    103103         
    104104//temp set scale=1 and bkg=0 for quadrature calc 
    105         Make/O/D/N=4 sphere_temp 
     105        Make/O/D/N=5 sphere_temp 
    106106        sphere_temp[0] = 1 
    107107        sphere_temp[1] = rad            //changed in loop 
    108         sphere_temp[2] = delrho 
    109         sphere_temp[3] = 0 
     108        sphere_temp[2] = rho 
     109        sphere_temp[3] = rhos 
     110        sphere_temp[4] = 0 
    110111         
    111112        //could use 5 pt quadrature to integrate over the size distribution, since it's a gaussian 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/NewModels_2006/LamellarFF.ipf

    r168 r236  
    2929        Make/O/D/n=(num) xwave_LamellarFF, ywave_LamellarFF 
    3030        xwave_LamellarFF =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    31         Make/O/D coef_LamellarFF = {1,50,0.15,6e-6,0}                   //CH#2 
    32         make/o/t parameters_LamellarFF = {"Scale","Bilayer Thick (delta) (A)","polydisp of thickness","contrast (A^-2)","Incoherent Bgd (cm-1)"}        //CH#3 
     31        Make/O/D coef_LamellarFF = {1,50,0.15,1e-6,6.3e-6,0}                    //CH#2 
     32        make/o/t parameters_LamellarFF = {"Scale","Bilayer Thick (delta) (A)","polydisp of thickness","SLD bilayer (A^-2)","SLD solvent (A^-2)","Incoherent Bgd (cm-1)"}        //CH#3 
    3333        Edit parameters_LamellarFF, coef_LamellarFF 
    3434        ModifyTable width(parameters_LamellarFF)=160 
     
    6060         
    6161        // Setup parameter table for model function 
    62         Make/O/D smear_coef_LamellarFF = {1,50,0.15,6e-6,0}             //CH#4 
    63         make/o/t smear_parameters_LamellarFF = {"Scale","Bilayer Thick (delta) (A)","polydisp of thickness","contrast (A^-2)","Incoherent Bgd (cm-1)"} 
     62        Make/O/D smear_coef_LamellarFF = {1,50,0.15,1e-6,6.3e-6,0}              //CH#4 
     63        make/o/t smear_parameters_LamellarFF = {"Scale","Bilayer Thick (delta) (A)","polydisp of thickness","SLD bilayer (A^-2)","SLD solvent (A^-2)","Incoherent Bgd (cm-1)"} 
    6464        Edit smear_parameters_LamellarFF,smear_coef_LamellarFF                                  //display parameters in a table 
    6565         
     
    112112//[1]Bilay Thick (delta) 
    113113//[2] polydispersity of thickness 
    114 //[3]contrast 
    115 //[4]Incoherent Bgd (cm-1) 
     114//[3] sld bilayer 
     115//[4] sld solv 
     116//[5]Incoherent Bgd (cm-1) 
    116117         
    117118//      give them nice names 
    118         Variable scale,dd,del,sig,contr,NN,Cp,bkg 
     119        Variable scale,dd,del,sig,contr,NN,Cp,bkg,sldb,slds 
    119120        scale = w[0] 
    120121        del = w[1] 
    121122        sig = w[2]*del 
    122         contr = w[3] 
    123         bkg = w[4] 
     123        sldb = w[3] 
     124        slds = w[4] 
     125        bkg = w[5] 
    124126         
     127        contr = sldb - slds 
    125128//      local variables 
    126129        Variable inten, qval,Pq,Sq,ii,alpha,temp,t1,t2,t3,dQ 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/NewModels_2006/LamellarPS.ipf

    r166 r236  
    5959        Make/O/D/n=(num) xwave_LamellarPS, ywave_LamellarPS 
    6060        xwave_LamellarPS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    61         Make/O/D coef_LamellarPS = {1,400,30,0.15,6e-6,20,0.1,0}                        //CH#2 
    62         make/o/t parameters_LamellarPS = {"Scale","Lamellar spacing, D (A)","Bilayer Thick (delta) (A)","polydisp of Bilayer Thickness","contrast (A^-2)","# of Lamellar plates","Caille parameter","Incoherent Bgd (cm-1)"}    //CH#3 
     61        Make/O/D coef_LamellarPS = {1,400,30,0.15,1e-6,6.3e-6,20,0.1,0}                 //CH#2 
     62        make/o/t parameters_LamellarPS = {"Scale","Lamellar spacing, D (A)","Bilayer Thick (delta) (A)","polydisp of Bilayer Thickness","SLD bilayer (A^-2)","SLD solvent (A^-2)","# of Lamellar plates","Caille parameter","Incoherent Bgd (cm-1)"}    //CH#3 
    6363        Edit parameters_LamellarPS, coef_LamellarPS 
    6464        ModifyTable width(parameters_LamellarPS)=160 
     
    7575        Duplicate/O coef_LamellarPS epsilon_LamellarPS 
    7676        epsilon_LamellarPS = 1e-4 
    77         epsilon_LamellarPS[5] = 1               //to make the derivative useful  
     77        epsilon_LamellarPS[6] = 1               //to make the derivative useful  
    7878        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2) 
    7979         
     
    150150         
    151151//      give them nice names 
    152         Variable scale,dd,del,sig,contr,NN,Cp,bkg 
     152        Variable scale,dd,del,sig,contr,NN,Cp,bkg,sldb,slds 
    153153        scale = w[0] 
    154154        dd = w[1] 
    155155        del = w[2] 
    156156        sig = w[3]*del 
    157         contr = w[4] 
    158         NN = trunc(w[5])                //be sure that NN is an integer 
    159         Cp = w[6] 
    160         bkg = w[7] 
     157        sldb = w[4] 
     158        slds = w[5] 
     159        contr = sldb-slds 
     160        NN = trunc(w[6])                //be sure that NN is an integer 
     161        Cp = w[7] 
     162        bkg = w[8] 
    161163         
    162164//      local variables 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/NewModels_2006/LogNormalSphere.ipf

    r169 r236  
    108108        sphere_temp[0] = 1 
    109109        sphere_temp[1] = rad            //changed in loop 
    110         sphere_temp[2] = delrho 
    111         sphere_temp[3] = 0 
     110        sphere_temp[2] = rho 
     111        sphere_temp[3] = rhos 
     112        sphere_temp[4] = 0 
    112113         
    113114        //currently using 20 pts... 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/NewModels_2006/Parallelepiped.ipf

    r166 r236  
    3535        Make/O/D/n=(num) xwave_Parallelepiped, ywave_Parallelepiped 
    3636        xwave_Parallelepiped =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    37         Make/O/D coef_Parallelepiped = {1,35,75,400,6e-6,0}                     //CH#2 
    38         make/o/t parameters_Parallelepiped = {"Scale Factor","Shortest Edge A ()","B ()","Longest Edge C ()","Contrast (^-2)","Incoherent Bgd (cm-1)"}      //CH#3 
     37        Make/O/D coef_Parallelepiped = {1,35,75,400,1e-6,6.3e-6,0}                      //CH#2 
     38        make/o/t parameters_Parallelepiped = {"Scale Factor","Shortest Edge A ()","B ()","Longest Edge C ()","SLD particle (^-2)","SLD solvent (A^-2)","Incoherent Bgd (cm-1)"}     //CH#3 
    3939        Edit parameters_Parallelepiped, coef_Parallelepiped 
    4040         
     
    6565         
    6666        // Setup parameter table for model function 
    67         Make/O/D smear_coef_Parallelepiped = {1,35,75,400,6e-6,0}               //CH#4 
    68         make/o/t smear_parameters_Parallelepiped = {"Scale Factor","Shortest Edge A ()","B ()","Longest Edge C ()","Contrast (^-2)","Incoherent Bgd (cm-1)"} 
     67        Make/O/D smear_coef_Parallelepiped = {1,35,75,400,1e-6,6.3e-6,0}                //CH#4 
     68        make/o/t smear_parameters_Parallelepiped = {"Scale Factor","Shortest Edge A ()","B ()","Longest Edge C ()","SLD particle (^-2)","SLD solvent (A^-2)","Incoherent Bgd (cm-1)"} 
    6969        Edit smear_parameters_Parallelepiped,smear_coef_Parallelepiped                                  //display parameters in a table 
    7070         
     
    117117        //[5] incoherent background (cm^-1) 
    118118//      give them nice names 
    119         Variable scale,aa,bb,cc,contr,bkg,inten,qq,ii,arg,mu 
     119        Variable scale,aa,bb,cc,contr,bkg,inten,qq,ii,arg,mu,sldp,slds 
    120120        scale = w[0] 
    121121        aa = w[1] 
    122122        bb = w[2] 
    123123        cc = w[3] 
    124         contr = w[4] 
    125         bkg = w[5] 
    126          
     124        sldp = w[4] 
     125        slds = w[5] 
     126        bkg = w[6] 
     127         
     128        contr = sldp - slds 
    127129//      mu = bb*x               //scale in terms of B 
    128130//      aa = aa/bb 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/NewModels_2006/TriaxialEllipsoid.ipf

    r166 r236  
    3131        Make/O/D/n=(num) xwave_triax, ywave_triax 
    3232        xwave_triax =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    33         Make/O/D coef_triax = {1,35,100,400,6e-6,0}                     //CH#2 
    34         make/o/t parameters_triax = {"Scale Factor","Semi-axis A [smallest]()","Semi-axis B ()","Semi-axis C [largest]()","Contrast (^-2)","Incoherent Bgd (cm-1)"} //CH#3 
     33        Make/O/D coef_triax = {1,35,100,400,1e-6,6.3e-6,0}                      //CH#2 
     34        make/o/t parameters_triax = {"Scale Factor","Semi-axis A [smallest]()","Semi-axis B ()","Semi-axis C [largest]()","SLD ellipsoid (^-2)","SLD solvent (A^-2)","Incoherent Bgd (cm-1)"}       //CH#3 
    3535        Edit parameters_triax, coef_triax 
    3636         
     
    6262         
    6363        // Setup parameter table for model function 
    64         Make/O/D smear_coef_triax = {1,35,100,400,6e-6,0}               //CH#4 
    65         make/o/t smear_parameters_triax = {"Scale Factor","A ()","B ()","C ()","Contrast (^-2)","Incoherent Bgd (cm-1)"} 
     64        Make/O/D smear_coef_triax = {1,35,100,400,1e-6,6.3e-6,0}                //CH#4 
     65        make/o/t smear_parameters_triax = {"Scale Factor","Semi-axis A [smallest]()","Semi-axis B ()","Semi-axis C [largest]()","SLD ellipsoid (^-2)","SLD solvent (A^-2)","Incoherent Bgd (cm-1)"} 
    6666        Edit smear_parameters_triax,smear_coef_triax                                    //display parameters in a table 
    6767         
     
    112112        //[2] semi-axis B (A) 
    113113        //[3] semi-axis C (A) 
    114         //[4] contrast (A^-2) 
    115         //[5] incoherent background (cm^-1) 
     114        //[4] sld ellipsoid (A^-2) 
     115        //[5] sld solvent 
     116        //[6] incoherent background (cm^-1) 
    116117//      give them nice names 
    117         Variable scale,aa,bb,cc,contr,bkg,inten,qq,ii,arg,mu 
     118        Variable scale,aa,bb,cc,contr,bkg,inten,qq,ii,arg,mu,slde,slds 
    118119        scale = w[0] 
    119120        aa = w[1] 
    120121        bb = w[2] 
    121122        cc = w[3] 
    122         contr = w[4] 
    123         bkg = w[5] 
     123        slde = w[4] 
     124        slds = w[5] 
     125        bkg = w[6] 
     126         
     127        contr = slde-slds 
    124128         
    125129        Variable/G root:gDumY=0,root:gDumX=0 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/OblateCS_and_Struct.ipf

    r166 r236  
    2020        Make/O/D/n=(num) xwave_OEF_HS,ywave_OEF_HS 
    2121        xwave_OEF_HS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    22         Make/O/D coef_OEF_HS = {0.01,100,50,110,60,1e-6,2e-6,0.0001} 
    23         make/o/t parameters_OEF_HS = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","Contrast (core-shell) (A-2)","Constrast (shell-solvent) (A-2)","bkg (cm-1)"} 
     22        Make/O/D coef_OEF_HS = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,0.0001} 
     23        make/o/t parameters_OEF_HS = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A^-2)","bkg (cm-1)"} 
    2424        Edit parameters_OEF_HS,coef_OEF_HS 
    2525         
     
    4949         
    5050        // Setup parameter table for model function 
    51         Make/O/D smear_coef_OEF_HS = {0.01,100,50,110,60,1e-6,2e-6,0.0001} 
    52         make/o/t smear_parameters_OEF_HS = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","Contrast (core-shell) (A-2)","Constrast (shell-solvent) (A-2)","bkg (cm-1)"} 
     51        Make/O/D smear_coef_OEF_HS = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,0.0001} 
     52        make/o/t smear_parameters_OEF_HS = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A^-2)","bkg (cm-1)"} 
    5353        Edit smear_parameters_OEF_HS,smear_coef_OEF_HS                                   
    5454         
     
    8181         
    8282        //setup form factor coefficient wave 
    83         Make/O/D/N=8 form_OEF_HS 
     83        Make/O/D/N=9 form_OEF_HS 
    8484        form_OEF_HS[0] = 1 
    8585        form_OEF_HS[1] = w[1] 
     
    8989        form_OEF_HS[5] = w[5] 
    9090        form_OEF_HS[6] = w[6] 
    91         form_OEF_HS[7] = 0 
     91        form_OEF_HS[7] = w[7] 
     92        form_OEF_HS[8] = 0 
    9293         
    9394        //setup structure factor coefficient wave 
     
    102103        yw = temp_OEF_HS_PQ * temp_OEF_HS_SQ 
    103104        yw *= w[0] 
    104         yw += w[7] 
     105        yw += w[8] 
    105106         
    106107        //cleanup waves 
     
    118119        Make/O/D/n=(num) xwave_OEF_SW,ywave_OEF_SW 
    119120        xwave_OEF_SW =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    120         Make/O/D coef_OEF_SW = {0.01,100,50,110,60,1e-6,2e-6,1.0,1.2,0.0001} 
    121         make/o/t parameters_OEF_SW = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","Contrast (core-shell) (A-2)","Constrast (shell-solvent) (A-2)","well depth (kT)","well width (diam.)","bkg (cm-1)"} 
     121        Make/O/D coef_OEF_SW = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,1.0,1.2,0.0001} 
     122        make/o/t parameters_OEF_SW = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A^-2)","well depth (kT)","well width (diam.)","bkg (cm-1)"} 
    122123        Edit parameters_OEF_SW,coef_OEF_SW 
    123124         
     
    147148         
    148149        // Setup parameter table for model function 
    149         Make/O/D smear_coef_OEF_SW = {0.01,100,50,110,60,1e-6,2e-6,1.0,1.2,0.0001} 
    150         make/o/t smear_parameters_OEF_SW = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","Contrast (core-shell) (A-2)","Constrast (shell-solvent) (A-2)","well depth (kT)","well width (diam.)","bkg (cm-1)"} 
     150        Make/O/D smear_coef_OEF_SW = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,1.0,1.2,0.0001} 
     151        make/o/t smear_parameters_OEF_SW = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A^-2)","well depth (kT)","well width (diam.)","bkg (cm-1)"} 
    151152        Edit smear_parameters_OEF_SW,smear_coef_OEF_SW                                   
    152153         
     
    179180         
    180181        //setup form factor coefficient wave 
    181         Make/O/D/N=8 form_OEF_SW 
     182        Make/O/D/N=9 form_OEF_SW 
    182183        form_OEF_SW[0] = 1 
    183184        form_OEF_SW[1] = w[1] 
     
    187188        form_OEF_SW[5] = w[5] 
    188189        form_OEF_SW[6] = w[6] 
    189         form_OEF_SW[7] = 0 
     190        form_OEF_SW[7] = w[7] 
     191        form_OEF_SW[8] = 0 
    190192         
    191193        //setup structure factor coefficient wave 
     
    193195        struct_OEF_SW[0] = 0.5*DiamEllip(Ras,Rbs) 
    194196        struct_OEF_SW[1] = w[0] 
    195         struct_OEF_SW[2] = w[7] 
    196         struct_OEF_SW[3] = w[8] 
     197        struct_OEF_SW[2] = w[8] 
     198        struct_OEF_SW[3] = w[9] 
    197199         
    198200        //calculate each and combine 
     
    202204        yw = temp_OEF_SW_PQ * temp_OEF_SW_SQ 
    203205        yw *= w[0] 
    204         yw += w[9] 
     206        yw += w[10] 
    205207         
    206208        //cleanup waves 
     
    223225        Make/O/D/n=(num) xwave_OEF_SC,ywave_OEF_SC 
    224226        xwave_OEF_SC =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    225         Make/O/D coef_OEF_SC = {0.01,100,50,110,60,1e-6,2e-6,20,0,298,78,0.0001} 
    226         make/o/t parameters_OEF_SC = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","Contrast (core-shell) (A-2)","Constrast (shell-solvent) (A-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","bkg (cm-1)"} 
     227        Make/O/D coef_OEF_SC = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,20,0,298,78,0.0001} 
     228        make/o/t parameters_OEF_SC = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A^-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","bkg (cm-1)"} 
    227229        Edit parameters_OEF_SC,coef_OEF_SC 
    228230         
     
    257259         
    258260        // Setup parameter table for model function 
    259         Make/O/D smear_coef_OEF_SC = {0.01,100,50,110,60,1e-6,2e-6,20,0,298,78,0.0001} 
    260         make/o/t smear_parameters_OEF_SC = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","Contrast (core-shell) (A-2)","Constrast (shell-solvent) (A-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","bkg (cm-1)"} 
     261        Make/O/D smear_coef_OEF_SC = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,20,0,298,78,0.0001} 
     262        make/o/t smear_parameters_OEF_SC = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A^-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","bkg (cm-1)"} 
    261263        Edit smear_parameters_OEF_SC,smear_coef_OEF_SC                                   
    262264         
     
    289291         
    290292        //setup form factor coefficient wave 
    291         Make/O/D/N=8 form_OEF_SC 
     293        Make/O/D/N=9 form_OEF_SC 
    292294        form_OEF_SC[0] = 1 
    293295        form_OEF_SC[1] = w[1] 
     
    297299        form_OEF_SC[5] = w[5] 
    298300        form_OEF_SC[6] = w[6] 
    299         form_OEF_SC[7] = 0 
     301        form_OEF_SC[7] = w[7] 
     302        form_OEF_SC[8] = 0 
    300303         
    301304        //setup structure factor coefficient wave 
    302305        Make/O/D/N=6 struct_OEF_SC 
    303306        struct_OEF_SC[0] = DiamEllip(Ras,Rbs) 
    304         struct_OEF_SC[1] = w[7] 
     307        struct_OEF_SC[1] = w[8] 
    305308        struct_OEF_SC[2] = w[0] 
    306         struct_OEF_SC[3] = w[9] 
    307         struct_OEF_SC[4] = w[8] 
    308         struct_OEF_SC[5] = w[10] 
     309        struct_OEF_SC[3] = w[10] 
     310        struct_OEF_SC[4] = w[9] 
     311        struct_OEF_SC[5] = w[11] 
    309312         
    310313        //calculate each and combine 
     
    314317        yw = temp_OEF_SC_PQ * temp_OEF_SC_SQ 
    315318        yw *= w[0] 
    316         yw += w[11] 
     319        yw += w[12] 
    317320         
    318321        //cleanup waves 
     
    331334        Make/O/D/n=(num) xwave_OEF_SHS,ywave_OEF_SHS 
    332335        xwave_OEF_SHS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    333         Make/O/D coef_OEF_SHS = {0.01,100,50,110,60,1e-6,2e-6,0.05,0.2,0.0001} 
    334         make/o/t parameters_OEF_SHS = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","Contrast (core-shell) (A-2)","Constrast (shell-solvent) (A-2)","perturbation parameter (0.1)","stickiness, tau","bkg (cm-1)"} 
     336        Make/O/D coef_OEF_SHS = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,0.05,0.2,0.0001} 
     337        make/o/t parameters_OEF_SHS = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A^-2)","perturbation parameter (0.1)","stickiness, tau","bkg (cm-1)"} 
    335338        Edit parameters_OEF_SHS,coef_OEF_SHS 
    336339         
     
    360363         
    361364        // Setup parameter table for model function 
    362         Make/O/D smear_coef_OEF_SHS = {0.01,100,50,110,60,1e-6,2e-6,0.05,0.2,0.0001} 
    363         make/o/t smear_parameters_OEF_SHS = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","Contrast (core-shell) (A-2)","Constrast (shell-solvent) (A-2)","perturbation parameter (0.1)","stickiness, tau","bkg (cm-1)"} 
     365        Make/O/D smear_coef_OEF_SHS = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,0.05,0.2,0.0001} 
     366        make/o/t smear_parameters_OEF_SHS = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A^-2)","perturbation parameter (0.1)","stickiness, tau","bkg (cm-1)"} 
    364367        Edit smear_parameters_OEF_SHS,smear_coef_OEF_SHS                                         
    365368         
     
    392395         
    393396        //setup form factor coefficient wave 
    394         Make/O/D/N=8 form_OEF_SHS 
     397        Make/O/D/N=9 form_OEF_SHS 
    395398        form_OEF_SHS[0] = 1 
    396399        form_OEF_SHS[1] = w[1] 
     
    400403        form_OEF_SHS[5] = w[5] 
    401404        form_OEF_SHS[6] = w[6] 
    402         form_OEF_SHS[7] = 0 
     405        form_OEF_SHS[7] = w[7] 
     406        form_OEF_SHS[8] = 0 
    403407         
    404408        //setup structure factor coefficient wave 
     
    406410        struct_OEF_SHS[0] = 0.5*DiamEllip(Ras,Rbs) 
    407411        struct_OEF_SHS[1] = w[0] 
    408         struct_OEF_SHS[2] = w[7] 
    409         struct_OEF_SHS[3] = w[8] 
     412        struct_OEF_SHS[2] = w[8] 
     413        struct_OEF_SHS[3] = w[9] 
    410414         
    411415        //calculate each and combine 
     
    415419        yw = temp_OEF_SHS_PQ * temp_OEF_SHS_SQ 
    416420        yw *= w[0] 
    417         yw += w[9] 
     421        yw += w[10] 
    418422         
    419423        //cleanup waves 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/OblateForm.ipf

    r166 r236  
    2020        Make/O/D/n=(num) xwave_oef,ywave_oef 
    2121        xwave_oef =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    22         Make/O/D coef_oef = {1.,200,20,250,30,1e-6,1e-6,0.001} 
    23         make/o/t parameters_oef = {"scale","major core (A)","minor core (A)","major shell (A)","minor shell (A)","Contrast (core-shell) (A-2)","Constrast (shell-solvent) (A-2)","bkg (cm-1)"} 
     22        Make/O/D coef_oef = {1.,200,20,250,30,1e-6,2e-6,6.3e-6,0.001} 
     23        make/o/t parameters_oef = {"scale","major core (A)","minor core (A)","major shell (A)","minor shell (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A^-2)","bkg (cm-1)"} 
    2424        Edit parameters_oef,coef_oef 
    2525        Variable/G root:g_oef 
     
    4949         
    5050        // Setup parameter table for model function 
    51         Make/O/D smear_coef_oef = {1.,200,20,250,30,1e-6,1e-6,0.001} 
    52         make/o/t smear_parameters_oef = {"scale","major core (A)","minor core (A)","major shell (A)","minor shell (A)","Contrast (core-shell) (A-2)","Constrast (shell-solvent) (A-2)","bkg (cm-1)"} 
     51        Make/O/D smear_coef_oef = {1.,200,20,250,30,1e-6,2e-6,6.3e-6,0.001} 
     52        make/o/t smear_parameters_oef = {"scale","major core (A)","minor core (A)","major shell (A)","minor shell (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A^-2)","bkg (cm-1)"} 
    5353        Edit smear_parameters_oef,smear_coef_oef 
    5454         
     
    9797        //[3] trmaj, overall major radius 
    9898        //[4] trmin, overall minor radius 
    99         //[5] delpc, SLD difference (core-shell) [-2] 
    100         //[6] delps, SLD difference (shell-solvent) 
    101         //[7] bkg, [cm-1] 
    102         Variable scale,crmaj,crmin,trmaj,trmin,delpc,delps,bkg 
     99        //[5] sldc, core [-2] 
     100        //[6] slds, shell 
     101        //[7] sld (solvent) 
     102        //[8] bkg, [cm-1] 
     103        Variable scale,crmaj,crmin,trmaj,trmin,delpc,delps,bkg,sldc,slds,sld 
    103104        scale = w[0] 
    104105        crmaj = w[1] 
     
    106107        trmaj = w[3] 
    107108        trmin = w[4] 
    108         delpc = w[5] 
    109         delps = w[6] 
    110         bkg = w[7] 
    111  
     109        sldc = w[5] 
     110        slds = w[6] 
     111        sld = w[7] 
     112        bkg = w[8] 
     113 
     114        delpc = sldc - slds                     //core - shell 
     115        delps = slds - sld                      //shell - solvent 
     116         
    112117// local variables 
    113118        Variable yyy,va,vb,ii,nord,zi,qq,summ,nfn,npro,answer,oblatevol 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/PlotUtilsMacro.ipf

    r234 r236  
    250250                        if(V_Flag == 1) 
    251251                                AppendToGraph $w1 vs $w0 
    252                                 ModifyGraph mode($w1)=3,marker($w1)=19,msize($w1)=2,rgb($w1) =(rr,gg,bb) 
     252                                ModifyGraph mode($w1)=3,marker($w1)=19,msize($w1)=2,rgb($w1) =(rr,gg,bb),tickUnit=1 
    253253                                ErrorBars $w1 Y,wave=($w2,$w2) 
    254254                                ModifyGraph tickUnit(left)=1 
     
    256256                        //new graph 
    257257                                Display $w1 vs $w0 
    258                                 ModifyGraph log=1,mode($w1)=3,marker($w1)=19,msize($w1)=2,rgb($w1)=(rr,gg,bb) 
     258                                ModifyGraph log=1,mode($w1)=3,marker($w1)=19,msize($w1)=2,rgb($w1)=(rr,gg,bb),tickUnit=1 
    259259                                ModifyGraph grid=1,mirror=2,standoff=0 
    260260                                ErrorBars $w1 Y,wave=($w2,$w2) 
     
    265265                // graph window was not target, make new one 
    266266                        Display $w1 vs $w0 
    267                         ModifyGraph log=1,mode($w1)=3,marker($w1)=19,msize($w1)=2,rgb($w1)=(rr,gg,bb) 
     267                        ModifyGraph log=1,mode($w1)=3,marker($w1)=19,msize($w1)=2,rgb($w1)=(rr,gg,bb),tickUnit=1 
    268268                        ModifyGraph grid=1,mirror=2,standoff=0 
    269269                        ErrorBars $w1 Y,wave=($w2,$w2) 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/PolyHardSphereInten.ipf

    r166 r236  
    2121        Make/O/D/n=(num) xwave_phs,ywave_phs 
    2222        xwave_phs =alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    23         Make/O/D coef_phs = {100,0.12,0.1,2.0e-6,0.1} 
    24         make/o/t parameters_phs = {"Radius (A)","polydispersity","volume fraction","contrast (A^-2)","background (cm^-1)"} 
     23        Make/O/D coef_phs = {100,0.12,0.1,1e-6,6.3e-6,0.1} 
     24        make/o/t parameters_phs = {"Radius (A)","polydispersity","volume fraction","SLD sphere (A^-2)","SLD solvent (A^-2)","background (cm^-1)"} 
    2525        Edit parameters_phs,coef_phs 
    2626        Variable/G root:g_phs 
     
    5050         
    5151        // Setup parameter table for model function 
    52         Make/O/D smear_coef_phs = {100,0.12,0.1,2.0e-6,0.1} 
    53         make/o/t smear_parameters_phs = {"Radius (A)","polydispersity","volume fraction","contrast (A^-2)","background (cm^-1)"} 
     52        Make/O/D smear_coef_phs = {100,0.12,0.1,1e-6,6.3e-6,0.1} 
     53        make/o/t smear_parameters_phs = {"Radius (A)","polydispersity","volume fraction","SLD sphere (A^-2)","SLD solvent (A^-2)","background (cm^-1)"} 
    5454        Edit smear_parameters_phs,smear_coef_phs 
    5555         
     
    111111          
    112112        //* reassign names to the variable set */ 
    113         Variable rad,z2,phi,cont,bkg,sigma 
     113        Variable rad,z2,phi,cont,bkg,sigma,sld,slds 
    114114          
    115115        rad = w[0]              // radius (A) 
     
    117117        z2 = w[1]               //polydispersity (0<z2<1) 
    118118        phi = w[2]              // volume fraction (0<phi<1) 
    119         cont = w[3]*1.0e4               // contrast (odd units) 
    120         bkg = w[4]              // background (1/cm) 
     119        sld = w[3] 
     120        slds = w[4] 
     121        cont = (sld - slds)*1.0e4               // contrast (odd units) 
     122        bkg = w[5]              // background (1/cm) 
    121123 
    122124        zz=1/(z2*z2)-1.0 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/PolyRectSphere_and_Struct.ipf

    r166 r236  
    1919        Make/O/D/n=(num) xwave_RECT_HS,ywave_RECT_HS 
    2020        xwave_RECT_HS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    21         Make/O/D coef_RECT_HS = {0.1,60,0.1,6e-6,0.0001} 
    22         make/o/t parameters_RECT_HS = {"volume fraction","avg radius (A)","polydispersity","contrast (A-2)","bkg (cm-1)"} 
     21        Make/O/D coef_RECT_HS = {0.1,60,0.1,1e-6,6.3e-6,0.0001} 
     22        make/o/t parameters_RECT_HS = {"volume fraction","avg radius (A)","polydispersity","SLD sphere (A^-2)","SLD solvent (A^-2)","bkg (cm-1)"} 
    2323        Edit/K=1 parameters_RECT_HS,coef_RECT_HS 
    2424         
     
    4848         
    4949        // Setup parameter table for model function 
    50         Make/O/D smear_coef_RECT_HS = {0.1,60,0.1,6e-6,0.0001} 
    51         make/o/t smear_parameters_RECT_HS = {"volume fraction","avg radius (A)","polydispersity","contrast (A-2)","bkg (cm-1)"} 
     50        Make/O/D smear_coef_RECT_HS = {0.1,60,0.1,1e-6,6.3e-6,0.0001} 
     51        make/o/t smear_parameters_RECT_HS = {"volume fraction","avg radius (A)","polydispersity","SLD sphere (A^-2)","SLD solvent (A^-2)","bkg (cm-1)"} 
    5252        Edit smear_parameters_RECT_HS,smear_coef_RECT_HS                                         
    5353         
     
    7878         
    7979        //setup form factor coefficient wave 
    80         Make/O/D/N=5 form_RECT_HS 
     80        Make/O/D/N=6 form_RECT_HS 
    8181        form_RECT_HS[0] = 1 
    8282        form_RECT_HS[1] = w[1] 
    8383        form_RECT_HS[2] = w[2] 
    8484        form_RECT_HS[3] = w[3] 
    85         form_RECT_HS[4] = 0 
     85        form_RECT_HS[4] = w[4] 
     86        form_RECT_HS[5] = 0 
    8687         
    8788        //calculate the diameter of the effective one-component sphere 
     
    105106        yw = temp_RECT_HS_PQ * temp_RECT_HS_SQ 
    106107        yw *= w[0] 
    107         yw += w[4] 
     108        yw += w[5] 
    108109         
    109110        //cleanup waves 
     
    122123        Make/O/D/n=(num) xwave_RECT_SW,ywave_RECT_SW 
    123124        xwave_RECT_SW =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    124         Make/O/D coef_RECT_SW = {0.1,60,0.1,6e-6,1.0,1.2,0.0001} 
    125         make/o/t parameters_RECT_SW = {"volume fraction","avg radius(A)","polydispersity","contrast (A-2)","well depth (kT)","well width (diam.)","bkg (cm-1)"} 
     125        Make/O/D coef_RECT_SW = {0.1,60,0.1,1e-6,6.3e-6,1.0,1.2,0.0001} 
     126        make/o/t parameters_RECT_SW = {"volume fraction","avg radius(A)","polydispersity","SLD sphere (A^-2)","SLD solvent (A^-2)","well depth (kT)","well width (diam.)","bkg (cm-1)"} 
    126127        Edit/K=1 parameters_RECT_SW,coef_RECT_SW 
    127128         
     
    151152         
    152153        // Setup parameter table for model function 
    153         Make/O/D smear_coef_RECT_SW = {0.1,60,0.1,6e-6,1.0,1.2,0.0001} 
    154         make/o/t smear_parameters_RECT_SW = {"volume fraction","avg radius(A)","polydispersity","contrast (A-2)","well depth (kT)","well width (diam.)","bkg (cm-1)"} 
     154        Make/O/D smear_coef_RECT_SW = {0.1,60,0.1,1e-6,6.3e-6,1.0,1.2,0.0001} 
     155        make/o/t smear_parameters_RECT_SW = {"volume fraction","avg radius(A)","polydispersity","SLD sphere (A^-2)","SLD solvent (A^-2)","well depth (kT)","well width (diam.)","bkg (cm-1)"} 
    155156        Edit smear_parameters_RECT_SW,smear_coef_RECT_SW                                         
    156157         
     
    181182         
    182183        //setup form factor coefficient wave 
    183         Make/O/D/N=5 form_RECT_SW 
     184        Make/O/D/N=6 form_RECT_SW 
    184185        form_RECT_SW[0] = 1 
    185186        form_RECT_SW[1] = w[1] 
    186187        form_RECT_SW[2] = w[2] 
    187188        form_RECT_SW[3] = w[3] 
    188         form_RECT_SW[4] = 0 
     189        form_RECT_SW[4] = w[4] 
     190        form_RECT_SW[5] = 0 
    189191         
    190192        //calculate the diameter of the effective one-component sphere 
     
    201203        struct_RECT_SW[0] = diam/2 
    202204        struct_RECT_SW[1] = w[0] 
    203         struct_RECT_SW[2] = w[4] 
    204         struct_RECT_SW[3] = w[5] 
     205        struct_RECT_SW[2] = w[5] 
     206        struct_RECT_SW[3] = w[6] 
    205207         
    206208        //calculate each and combine 
     
    210212        yw = temp_RECT_SW_PQ * temp_RECT_SW_SQ 
    211213        yw *= w[0] 
    212         yw += w[6] 
     214        yw += w[7] 
    213215         
    214216        //cleanup waves 
     
    233235        Make/O/D/n=(num) xwave_RECT_SC,ywave_RECT_SC 
    234236        xwave_RECT_SC =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    235         Make/O/D coef_RECT_SC = {0.1,60,0.1,6e-6,10,0,298,78,0.0001} 
    236         make/o/t parameters_RECT_SC = {"volume fraction","avg radius (A)","polydispersity","contrast (A-2)","charge","Monovalent salt (M)","Temperature (K)","dielectric const.","bkg (cm-1)"} 
     237        Make/O/D coef_RECT_SC = {0.1,60,0.1,1e-6,6.3e-6,10,0,298,78,0.0001} 
     238        make/o/t parameters_RECT_SC = {"volume fraction","avg radius (A)","polydispersity","SLD sphere (A^-2)","SLD solvent (A^-2)","charge","Monovalent salt (M)","Temperature (K)","dielectric const.","bkg (cm-1)"} 
    237239        Edit/K=1 parameters_RECT_SC,coef_RECT_SC 
    238240         
     
    267269         
    268270        // Setup parameter table for model function 
    269         Make/O/D smear_coef_RECT_SC = {0.1,60,0.1,6e-6,10,0,298,78,0.0001} 
    270         make/o/t smear_parameters_RECT_SC = {"volume fraction","avg radius (A)","polydispersity","contrast (A-2)","charge","Monovalent salt (M)","Temperature (K)","dielectric const.","bkg (cm-1)"} 
     271        Make/O/D smear_coef_RECT_SC = {0.1,60,0.1,1e-6,6.3e-6,10,0,298,78,0.0001} 
     272        make/o/t smear_parameters_RECT_SC = {"volume fraction","avg radius (A)","polydispersity","SLD sphere (A^-2)","SLD solvent (A^-2)","charge","Monovalent salt (M)","Temperature (K)","dielectric const.","bkg (cm-1)"} 
    271273        Edit smear_parameters_RECT_SC,smear_coef_RECT_SC                                         
    272274         
     
    297299         
    298300        //setup form factor coefficient wave 
    299         Make/O/D/N=5 form_RECT_SC 
     301        Make/O/D/N=6 form_RECT_SC 
    300302        form_RECT_SC[0] = 1 
    301303        form_RECT_SC[1] = w[1] 
    302304        form_RECT_SC[2] = w[2] 
    303305        form_RECT_SC[3] = w[3] 
    304         form_RECT_SC[4] = 0 
     306        form_RECT_SC[4] = w[4] 
     307        form_RECT_SC[5] = 0 
    305308         
    306309        //calculate the diameter of the effective one-component sphere 
     
    316319        Make/O/D/N=6 struct_RECT_SC 
    317320        struct_RECT_SC[0] = diam 
    318         struct_RECT_SC[1] = w[4] 
     321        struct_RECT_SC[1] = w[5] 
    319322        struct_RECT_SC[2] = w[0] 
    320         struct_RECT_SC[3] = w[6] 
    321         struct_RECT_SC[4] = w[5] 
    322         struct_RECT_SC[5] = w[7] 
     323        struct_RECT_SC[3] = w[7] 
     324        struct_RECT_SC[4] = w[6] 
     325        struct_RECT_SC[5] = w[8] 
    323326         
    324327        //calculate each and combine 
     
    328331        yw = temp_RECT_SC_PQ * temp_RECT_SC_SQ 
    329332        yw *= w[0] 
    330         yw += w[8] 
     333        yw += w[9] 
    331334         
    332335        //cleanup waves 
     
    345348        Make/O/D/n=(num) xwave_RECT_SHS,ywave_RECT_SHS 
    346349        xwave_RECT_SHS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    347         Make/O/D coef_RECT_SHS = {0.1,60,0.1,6e-6,0.05,0.2,0.0001} 
    348         make/o/t parameters_RECT_SHS = {"volume fraction","avg radius(A)","polydispersity","contrast (A-2)","perturbation parameter (0.1)","stickiness, tau","bkg (cm-1)"} 
     350        Make/O/D coef_RECT_SHS = {0.1,60,0.1,1e-6,6.3e-6,0.05,0.2,0.0001} 
     351        make/o/t parameters_RECT_SHS = {"volume fraction","avg radius(A)","polydispersity","SLD sphere (A^-2)","SLD solvent (A^-2)","perturbation parameter (0.1)","stickiness, tau","bkg (cm-1)"} 
    349352        Edit/K=1 parameters_RECT_SHS,coef_RECT_SHS 
    350353         
     
    374377         
    375378        // Setup parameter table for model function 
    376         Make/O/D smear_coef_RECT_SHS = {0.1,60,0.1,6e-6,0.05,0.2,0.0001} 
    377         make/o/t smear_parameters_RECT_SHS = {"volume fraction","avg radius(A)","polydispersity","contrast (A-2)","perturbation parameter (0.1)","stickiness, tau","bkg (cm-1)"} 
     379        Make/O/D smear_coef_RECT_SHS = {0.1,60,0.1,1e-6,6.3e-6,0.05,0.2,0.0001} 
     380        make/o/t smear_parameters_RECT_SHS = {"volume fraction","avg radius(A)","polydispersity","SLD sphere (A^-2)","SLD solvent (A^-2)","perturbation parameter (0.1)","stickiness, tau","bkg (cm-1)"} 
    378381        Edit smear_parameters_RECT_SHS,smear_coef_RECT_SHS                                       
    379382         
     
    404407         
    405408        //setup form factor coefficient wave 
    406         Make/O/D/N=5 form_RECT_SHS 
     409        Make/O/D/N=6 form_RECT_SHS 
    407410        form_RECT_SHS[0] = 1 
    408411        form_RECT_SHS[1] = w[1] 
    409412        form_RECT_SHS[2] = w[2] 
    410413        form_RECT_SHS[3] = w[3] 
    411         form_RECT_SHS[4] = 0 
     414        form_RECT_SHS[4] = w[4] 
     415        form_RECT_SHS[5] = 0 
    412416         
    413417        //calculate the diameter of the effective one-component sphere 
     
    424428        struct_RECT_SHS[0] = diam/2 
    425429        struct_RECT_SHS[1] = w[0] 
    426         struct_RECT_SHS[2] = w[4] 
    427         struct_RECT_SHS[3] = w[5] 
     430        struct_RECT_SHS[2] = w[5] 
     431        struct_RECT_SHS[3] = w[6] 
    428432         
    429433        //calculate each and combine 
     
    433437        yw = temp_RECT_SHS_PQ * temp_RECT_SHS_SQ 
    434438        yw *= w[0] 
    435         yw += w[6] 
     439        yw += w[7] 
    436440         
    437441        //cleanup waves 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/ProlateCS_and_Struct.ipf

    r166 r236  
    1919        Make/O/D/n=(num) xwave_PEF_HS,ywave_PEF_HS 
    2020        xwave_PEF_HS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    21         Make/O/D coef_PEF_HS = {0.01,100,50,110,60,1e-6,2e-6,0.0001} 
    22         make/o/t parameters_PEF_HS = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","Contrast (core-shell) (A-2)","Constrast (shell-solvent) (A-2)","bkg (cm-1)"} 
     21        Make/O/D coef_PEF_HS = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,0.0001} 
     22        make/o/t parameters_PEF_HS = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A-2)","bkg (cm-1)"} 
    2323        Edit parameters_PEF_HS,coef_PEF_HS 
    2424         
     
    4848         
    4949        // Setup parameter table for model function 
    50         Make/O/D smear_coef_PEF_HS = {0.01,100,50,110,60,1e-6,2e-6,0.0001} 
    51         make/o/t smear_parameters_PEF_HS = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","Contrast (core-shell) (A-2)","Constrast (shell-solvent) (A-2)","bkg (cm-1)"} 
     50        Make/O/D smear_coef_PEF_HS = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,0.0001} 
     51        make/o/t smear_parameters_PEF_HS = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A-2)","bkg (cm-1)"} 
    5252        Edit smear_parameters_PEF_HS,smear_coef_PEF_HS                                   
    5353         
     
    8080         
    8181        //setup form factor coefficient wave 
    82         Make/O/D/N=8 form_PEF_HS 
     82        Make/O/D/N=9 form_PEF_HS 
    8383        form_PEF_HS[0] = 1 
    8484        form_PEF_HS[1] = w[1] 
     
    8888        form_PEF_HS[5] = w[5] 
    8989        form_PEF_HS[6] = w[6] 
    90         form_PEF_HS[7] = 0 
     90        form_PEF_HS[7] = w[7] 
     91        form_PEF_HS[8] = 0 
    9192         
    9293        //setup structure factor coefficient wave 
     
    101102        yw = temp_PEF_HS_PQ *temp_PEF_HS_SQ 
    102103        yw *= w[0] 
    103         yw += w[7] 
     104        yw += w[8] 
    104105         
    105106        //cleanup waves 
     
    117118        Make/O/D/n=(num) xwave_PEF_SW,ywave_PEF_SW 
    118119        xwave_PEF_SW =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    119         Make/O/D coef_PEF_SW = {0.01,100,50,110,60,1e-6,2e-6,1.0,1.2,0.0001} 
    120         make/o/t parameters_PEF_SW = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","Contrast (core-shell) (A-2)","Constrast (shell-solvent) (A-2)","well depth (kT)","well width (diam.)","bkg (cm-1)"} 
     120        Make/O/D coef_PEF_SW = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,1.0,1.2,0.0001} 
     121        make/o/t parameters_PEF_SW = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A-2)","well depth (kT)","well width (diam.)","bkg (cm-1)"} 
    121122        Edit parameters_PEF_SW,coef_PEF_SW 
    122123         
     
    146147         
    147148        // Setup parameter table for model function 
    148         Make/O/D smear_coef_PEF_SW = {0.01,100,50,110,60,1e-6,2e-6,1.0,1.2,0.0001} 
    149         make/o/t smear_parameters_PEF_SW = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","Contrast (core-shell) (A-2)","Constrast (shell-solvent) (A-2)","well depth (kT)","well width (diam.)","bkg (cm-1)"} 
     149        Make/O/D smear_coef_PEF_SW = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,1.0,1.2,0.0001} 
     150        make/o/t smear_parameters_PEF_SW = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A-2)","well depth (kT)","well width (diam.)","bkg (cm-1)"} 
    150151        Edit smear_parameters_PEF_SW,smear_coef_PEF_SW                                   
    151152         
     
    178179         
    179180        //setup form factor coefficient wave 
    180         Make/O/D/N=8 form_PEF_SW 
     181        Make/O/D/N=9 form_PEF_SW 
    181182        form_PEF_SW[0] = 1 
    182183        form_PEF_SW[1] = w[1] 
     
    186187        form_PEF_SW[5] = w[5] 
    187188        form_PEF_SW[6] = w[6] 
    188         form_PEF_SW[7] = 0 
     189        form_PEF_SW[7] = w[7] 
     190        form_PEF_SW[8] = 0 
    189191         
    190192        //setup structure factor coefficient wave 
     
    192194        struct_PEF_SW[0] = 0.5*DiamEllip(Ras,Rbs) 
    193195        struct_PEF_SW[1] = w[0] 
    194         struct_PEF_SW[2] = w[7] 
    195         struct_PEF_SW[3] = w[8] 
     196        struct_PEF_SW[2] = w[8] 
     197        struct_PEF_SW[3] = w[9] 
    196198         
    197199        //calculate each and combine 
     
    201203        yw = temp_PEF_SW_PQ * temp_PEF_SW_SQ 
    202204        yw *= w[0] 
    203         yw += w[9] 
     205        yw += w[10] 
    204206         
    205207        //cleanup waves 
     
    222224        Make/O/D/n=(num) xwave_PEF_SC,ywave_PEF_SC 
    223225        xwave_PEF_SC =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    224         Make/O/D coef_PEF_SC = {0.01,100,50,110,60,1e-6,2e-6,20,0,298,78,0.0001} 
    225         make/o/t parameters_PEF_SC = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","Contrast (core-shell) (A-2)","Constrast (shell-solvent) (A-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","bkg (cm-1)"} 
     226        Make/O/D coef_PEF_SC = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,20,0,298,78,0.0001} 
     227        make/o/t parameters_PEF_SC = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","bkg (cm-1)"} 
    226228        Edit parameters_PEF_SC,coef_PEF_SC 
    227229         
     
    256258         
    257259        // Setup parameter table for model function 
    258         Make/O/D smear_coef_PEF_SC = {0.01,100,50,110,60,1e-6,2e-6,20,0,298,78,0.0001} 
    259         make/o/t smear_parameters_PEF_SC = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","Contrast (core-shell) (A-2)","Constrast (shell-solvent) (A-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","bkg (cm-1)"} 
     260        Make/O/D smear_coef_PEF_SC = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,20,0,298,78,0.0001} 
     261        make/o/t smear_parameters_PEF_SC = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","bkg (cm-1)"} 
    260262        Edit smear_parameters_PEF_SC,smear_coef_PEF_SC                                   
    261263         
     
    288290         
    289291        //setup form factor coefficient wave 
    290         Make/O/D/N=8 form_PEF_SC 
     292        Make/O/D/N=9 form_PEF_SC 
    291293        form_PEF_SC[0] = 1 
    292294        form_PEF_SC[1] = w[1] 
     
    296298        form_PEF_SC[5] = w[5] 
    297299        form_PEF_SC[6] = w[6] 
    298         form_PEF_SC[7] = 0 
     300        form_PEF_SC[7] = w[7] 
     301        form_PEF_SC[8] = 0 
    299302         
    300303        //setup structure factor coefficient wave 
    301304        Make/O/D/N=6 struct_PEF_SC 
    302305        struct_PEF_SC[0] = DiamEllip(Ras,Rbs) 
    303         struct_PEF_SC[1] = w[7] 
     306        struct_PEF_SC[1] = w[8] 
    304307        struct_PEF_SC[2] = w[0] 
    305         struct_PEF_SC[3] = w[9] 
    306         struct_PEF_SC[4] = w[8] 
    307         struct_PEF_SC[5] = w[10] 
     308        struct_PEF_SC[3] = w[10] 
     309        struct_PEF_SC[4] = w[9] 
     310        struct_PEF_SC[5] = w[11] 
    308311         
    309312        //calculate each and combine 
     
    313316        yw = temp_PEF_SC_PQ * temp_PEF_SC_SQ 
    314317        yw *= w[0] 
    315         yw += w[11] 
     318        yw += w[12] 
    316319         
    317320        //cleanup waves 
     
    330333        Make/O/D/n=(num) xwave_PEF_SHS,ywave_PEF_SHS 
    331334        xwave_PEF_SHS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    332         Make/O/D coef_PEF_SHS = {0.01,100,50,110,60,1e-6,2e-6,0.05,0.2,0.0001} 
    333         make/o/t parameters_PEF_SHS = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","Contrast (core-shell) (A-2)","Constrast (shell-solvent) (A-2)","perturbation parameter (0.1)","stickiness, tau","bkg (cm-1)"} 
     335        Make/O/D coef_PEF_SHS = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,0.05,0.2,0.0001} 
     336        make/o/t parameters_PEF_SHS = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A-2)","perturbation parameter (0.1)","stickiness, tau","bkg (cm-1)"} 
    334337        Edit parameters_PEF_SHS,coef_PEF_SHS 
    335338         
     
    359362         
    360363        // Setup parameter table for model function 
    361         Make/O/D smear_coef_PEF_SHS = {0.01,100,50,110,60,1e-6,2e-6,0.05,0.2,0.0001} 
    362         make/o/t smear_parameters_PEF_SHS = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","Contrast (core-shell) (A-2)","Constrast (shell-solvent) (A-2)","perturbation parameter (0.1)","stickiness, tau","bkg (cm-1)"} 
     364        Make/O/D smear_coef_PEF_SHS = {0.01,100,50,110,60,1e-6,2e-6,6.3e-6,0.05,0.2,0.0001} 
     365        make/o/t smear_parameters_PEF_SHS = {"volume fraction","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A-2)","perturbation parameter (0.1)","stickiness, tau","bkg (cm-1)"} 
    363366        Edit smear_parameters_PEF_SHS,smear_coef_PEF_SHS                                         
    364367         
     
    391394         
    392395        //setup form factor coefficient wave 
    393         Make/O/D/N=8 form_PEF_SHS 
     396        Make/O/D/N=9 form_PEF_SHS 
    394397        form_PEF_SHS[0] = 1 
    395398        form_PEF_SHS[1] = w[1] 
     
    399402        form_PEF_SHS[5] = w[5] 
    400403        form_PEF_SHS[6] = w[6] 
    401         form_PEF_SHS[7] = 0 
     404        form_PEF_SHS[7] = w[7] 
     405        form_PEF_SHS[8] = 0 
    402406         
    403407        //setup structure factor coefficient wave 
     
    405409        struct_PEF_SHS[0] = 0.5*DiamEllip(Ras,Rbs) 
    406410        struct_PEF_SHS[1] = w[0] 
    407         struct_PEF_SHS[2] = w[7] 
    408         struct_PEF_SHS[3] = w[8] 
     411        struct_PEF_SHS[2] = w[8] 
     412        struct_PEF_SHS[3] = w[9] 
    409413         
    410414        //calculate each and combine 
     
    414418        yw = temp_PEF_SHS_PQ * temp_PEF_SHS_SQ 
    415419        yw *= w[0] 
    416         yw += w[9] 
     420        yw += w[10] 
    417421         
    418422        //cleanup waves 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/ProlateForm.ipf

    r166 r236  
    1919        Make/O/D/n=(num) xwave_pef,ywave_pef 
    2020        xwave_pef =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    21         Make/O/D coef_pef = {1.,100,50,110,60,1e-6,2e-6,0.001} 
    22         make/o/t parameters_pef = {"scale","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","Contrast (core-shell) (A-2)","Constrast (shell-solvent) (A-2)","bkg (cm-1)"} 
     21        Make/O/D coef_pef = {1.,100,50,110,60,1e-6,2e-6,6.3e-6,0.001} 
     22        make/o/t parameters_pef = {"scale","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A-2)","bkg (cm-1)"} 
    2323        Edit parameters_pef,coef_pef 
    2424        Variable/G root:g_pef 
     
    4848         
    4949        // Setup parameter table for model function 
    50         Make/O/D smear_coef_pef = {1.,100,50,110,60,1e-6,2e-6,0.001} 
    51         make/o/t smear_parameters_pef = {"scale","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","Contrast (core-shell) (A-2)","Contrast (shell-solvent) (A-2)","bkg (cm-1)"} 
     50        Make/O/D smear_coef_pef = {1.,100,50,110,60,1e-6,2e-6,6.3e-6,0.001} 
     51        make/o/t smear_parameters_pef = {"scale","major core radius (A)","minor core radius (A)","major shell radius (A)","minor shell radius (A)","SLD core (A-2)","SLD shell (A-2)","SLD solvent (A-2)","bkg (cm-1)"} 
    5252        Edit smear_parameters_pef,smear_coef_pef 
    5353         
     
    9595        //[3] trmaj, overall major radius 
    9696        //[4] trmin, overall minor radius 
    97         //[5] delpc, SLD difference (core-shell)        [-2] 
    98         //[6] delps, SLD difference (shell-solvent) 
    99         //[7] bkg [cm-1] 
    100         Variable scale,crmaj,crmin,trmaj,trmin,delpc,delps,bkg 
     97        //[5] sld core, [A^-2] 
     98        //[6] sld shell,  
     99        //[7] sld solvent 
     100        //[8] bkg [cm-1] 
     101        Variable scale,crmaj,crmin,trmaj,trmin,delpc,delps,bkg,sldc,slds,sld 
    101102        scale = w[0] 
    102103        crmaj = w[1] 
     
    104105        trmaj = w[3] 
    105106        trmin = w[4] 
    106         delpc = w[5] 
    107         delps = w[6] 
    108         bkg = w[7] 
    109  
     107        sldc = w[5] 
     108        slds = w[6] 
     109        sld = w[7] 
     110        bkg = w[8] 
     111 
     112        delpc = sldc - slds                     //core - shell 
     113        delps = slds - sld                      //shell - solvent 
    110114// local variables 
    111115        Variable yyy,va,vb,ii,nord,zi,qq,summ,nfn,npro,answer,prolatevol 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/RectPolySpheres.ipf

    r217 r236  
    2121        Make/O/D/n=(num) xwave_rect,ywave_rect 
    2222        xwave_rect =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    23         Make/O/D coef_rect = {1,60,0.12,3.0e-6,0.} 
    24         make/o/t parameters_rect = {"scale","Radius (A)","polydispersity","contrast (A^-2)","background (cm^-1)"} 
     23        Make/O/D coef_rect = {1,60,0.12,1e-6,6.3e-6,0.} 
     24        make/o/t parameters_rect = {"scale","Radius (A)","polydispersity","SLD sphere (A^-2)","SLD solvent (A^-2)","background (cm^-1)"} 
    2525        Edit parameters_rect,coef_rect 
    2626        Variable/G root:g_rect 
     
    5252         
    5353        // Setup parameter table for model function 
    54         Make/O/D smear_coef_rect = {1,60,0.12,3.0e-6,0.} 
    55         make/o/t smear_parameters_rect = {"scale","Radius (A)","polydispersity","contrast (A^-2)","background (cm^-1)"} 
     54        Make/O/D smear_coef_rect = {1,60,0.12,1e-6,6.3e-6,0.} 
     55        make/o/t smear_parameters_rect = {"scale","Radius (A)","polydispersity","SLD sphere (A^-2)","SLD solvent (A^-2)","background (cm^-1)"} 
    5656        Edit smear_parameters_rect,smear_coef_rect 
    5757         
     
    9494          
    9595        //* reassign names to the variable set */ 
    96          Variable scale,rad,pd,cont,bkg 
     96         Variable scale,rad,pd,cont,bkg,sld,slds 
    9797          
    9898        scale = w[0] 
    9999        rad = w[1]              // radius (A) 
    100100        pd = w[2]               //polydispersity of rectangular distribution 
    101         cont = w[3]             // contrast (A^-2) 
    102         bkg = w[4]              // background (1/cm) 
    103  
     101        sld = w[3]              // contrast (A^-2) 
     102        slds = w[4] 
     103        bkg = w[5]              // background (1/cm) 
     104 
     105        cont = sld - slds 
    104106// local variables 
    105107        Variable inten,h1,qw,qr,width,sig,averad3,Vavg,Rg2 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Sphere.ipf

    r166 r236  
    2020        Make/O/D/n=(num) xwave_sf,ywave_sf                                       
    2121        xwave_sf = alog(log(qmin) + x*((log(qmax)-log(qmin))/num))                                       
    22         Make/O/D coef_sf = {1.,60,1e-6,0.01}                                             
    23         make/o/t parameters_sf = {"scale","Radius (A)","contrast (-2)","bkgd (cm-1)"}           
     22        Make/O/D coef_sf = {1.,60,1e-6,6.3e-6,0.01}                                              
     23        make/o/t parameters_sf = {"scale","Radius (A)","SLD sphere (A-2)","SLD solvent (A-2)","bkgd (cm-1)"}             
    2424        Edit parameters_sf,coef_sf       
    2525        Variable/G root:g_sf=0                   
     
    4848         
    4949        // Setup parameter table for model function 
    50         make/o/t smear_parameters_sf = {"scale","Radius (A)","contrast (-2)","bkgd (cm-1)"} 
    51         Make/O/D smear_coef_sf = {1.,60,1e-6,0.0}                                        
     50        Make/O/D smear_coef_sf = {1.,60,1e-6,6.3e-6,0.01}                                        
     51        make/o/t smear_parameters_sf = {"scale","Radius (A)","SLD sphere (A-2)","SLD solvent (A-2)","bkgd (cm-1)"} 
    5252        Edit smear_parameters_sf,smear_coef_sf                                   
    5353         
     
    9393        //[0] scale 
    9494        //[1] radius () 
    95         //[2] delrho (-2) 
    96         //[3] background (cm-1) 
    97          
    98         Variable scale,radius,delrho,bkg                                 
     95        //[2] sld sphere (-2) 
     96        //[3] sld solv 
     97        //[4] background (cm-1) 
     98         
     99        Variable scale,radius,delrho,bkg,sldSph,sldSolv          
    99100        scale = w[0] 
    100101        radius = w[1] 
    101         delrho = w[2] 
    102         bkg = w[3] 
    103          
     102        sldSph = w[2] 
     103        sldSolv = w[3] 
     104        bkg = w[4] 
     105         
     106        delrho = sldSph - sldSolv 
    104107        // calculates scale * f^2/Vol where f=Vol*3*delrho*((sin(qr)-qrcos(qr))/qr^3 
    105108        // and is rescaled to give [=] cm^-1 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Sphere_and_Struct.ipf

    r166 r236  
    2020        Make/O/D/n=(num) xwave_S_HS,ywave_S_HS                                   
    2121        xwave_S_HS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))                                    
    22         Make/O/D coef_S_HS = {0.1,60,1e-6,0.01}                                          
    23         make/o/t parameters_S_HS = {"volume fraction","Radius (A)","contrast (-2)","bkgd (cm-1)"}               
     22        Make/O/D coef_S_HS = {0.1,60,1e-6,6.3e-6,0.01}                                           
     23        make/o/t parameters_S_HS = {"volume fraction","Radius (A)","SLD sphere (A-2)","SLD solvent (A-2)","bkgd (cm-1)"}                 
    2424        Edit/K=1 parameters_S_HS,coef_S_HS 
    2525        Variable/G root:g_S_HS                                           
     
    4949         
    5050        // Setup parameter table for model function 
    51         Make/O/D smear_coef_S_HS = {0.1,60,1e-6,0.01}                                            
    52         make/o/t smear_parameters_S_HS = {"volume fraction","Radius (A)","contrast (-2)","bkgd (cm-1)"}                 
     51        Make/O/D smear_coef_S_HS = {0.1,60,1e-6,6.3e-6,0.01}                                             
     52        make/o/t smear_parameters_S_HS = {"volume fraction","Radius (A)","SLD sphere (A-2)","SLD solvent (A-2)","bkgd (cm-1)"}           
    5353        Edit smear_parameters_S_HS,smear_coef_S_HS                                       
    5454         
     
    7878                 
    7979        //setup form factor coefficient wave 
    80         Make/O/D/N=4 form_S_HS 
     80        Make/O/D/N=5 form_S_HS 
    8181        form_S_HS[0] = 1 
    8282        form_S_HS[1] = w[1] 
    8383        form_S_HS[2] = w[2] 
    84         form_S_HS[3] = 0 
     84        form_S_HS[3] = w[3] 
     85        form_S_HS[4] = 0 
    8586         
    8687        //setup structure factor coefficient wave 
     
    9596        yw = temp_S_HS_PQ * temp_S_HS_SQ 
    9697        yw *= w[0] 
    97         yw += w[3] 
     98        yw += w[4] 
    9899         
    99100        //cleanup waves 
     
    116117        Make/O/D/n=(num) xwave_S_SW,ywave_S_SW                                   
    117118        xwave_S_SW =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))                                    
    118         Make/O/D coef_S_SW = {0.1,60,1e-6,1.0,1.2,0.01}                                          
    119         make/o/t parameters_S_SW = {"volume fraction","Radius (A)","contrast (-2)","well depth (kT)","well width (diam.)","bkgd (cm-1)"}                
     119        Make/O/D coef_S_SW = {0.1,60,1e-6,6.3e-6,1.0,1.2,0.01}                                           
     120        make/o/t parameters_S_SW = {"volume fraction","Radius (A)","SLD sphere (A-2)","SLD solvent (A-2)","well depth (kT)","well width (diam.)","bkgd (cm-1)"}          
    120121        Edit/K=1 parameters_S_SW,coef_S_SW       
    121122        Variable/G root:g_S_SW                                                   
     
    144145         
    145146        // Setup parameter table for model function 
    146         Make/O/D smear_coef_S_SW = {0.1,60,1e-6,1.0,1.2,0.01}                                            
    147         make/o/t smear_parameters_S_SW = {"volume fraction","Radius (A)","contrast (-2)","well depth (kT)","well width (diam.)","bkgd (cm-1)"}          
     147        Make/O/D smear_coef_S_SW = {0.1,60,1e-6,6.3e-6,1.0,1.2,0.01}                                             
     148        make/o/t smear_parameters_S_SW = {"volume fraction","Radius (A)","SLD sphere (A-2)","SLD solvent (A-2)","well depth (kT)","well width (diam.)","bkgd (cm-1)"}            
    148149        Edit smear_parameters_S_SW,smear_coef_S_SW                                       
    149150         
     
    173174                 
    174175        //setup form factor coefficient wave 
    175         Make/O/D/N=4 form_S_SW 
     176        Make/O/D/N=5 form_S_SW 
    176177        form_S_SW[0] = 1 
    177178        form_S_SW[1] = w[1] 
    178179        form_S_SW[2] = w[2] 
    179         form_S_SW[3] = 0 
     180        form_S_SW[3] = w[3] 
     181        form_S_SW[4] = 0 
    180182         
    181183        //setup structure factor coefficient wave 
     
    183185        struct_S_SW[0] = w[1] 
    184186        struct_S_SW[1] = w[0] 
    185         struct_S_SW[2] = w[3] 
    186         struct_S_SW[3] = w[4] 
     187        struct_S_SW[2] = w[4] 
     188        struct_S_SW[3] = w[5] 
    187189         
    188190        //calculate each and combine 
     
    192194        yw = temp_S_SW_PQ * temp_S_SW_SQ 
    193195        yw *= w[0] 
    194         yw += w[5] 
     196        yw += w[6] 
    195197         
    196198        //cleanup waves 
     
    215217        Make/O/D/n=(num) xwave_S_SC,ywave_S_SC                                   
    216218        xwave_S_SC =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))                            
    217         Make/O/D coef_S_SC = {0.2,50,3e-6,20,0,298,78,0.0001}                                            
    218         make/o/t parameters_S_SC = {"volume fraction","Radius (A)","contrast (-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","bkgd (cm-1)"}              
     219        Make/O/D coef_S_SC = {0.2,50,1e-6,6.3e-6,20,0,298,78,0.0001}                                             
     220        make/o/t parameters_S_SC = {"volume fraction","Radius (A)","SLD sphere (A-2)","SLD solvent (A-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","bkgd (cm-1)"}                
    219221        Edit/K=1 parameters_S_SC,coef_S_SC 
    220222        Variable/G root:g_S_SC                                                   
     
    249251         
    250252        // Setup parameter table for model function 
    251         Make/O/D smear_coef_S_SC = {0.2,50,3e-6,20,0,298,78,0.0001}                                              
    252         make/o/t smear_parameters_S_SC = {"volume fraction","Radius (A)","contrast (-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","bkgd (cm-1)"}                
     253        Make/O/D smear_coef_S_SC = {0.2,50,1e-6,6.3e-6,20,0,298,78,0.0001}                                               
     254        make/o/t smear_parameters_S_SC = {"volume fraction","Radius (A)","SLD sphere (A-2)","SLD solvent (A-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","bkgd (cm-1)"}          
    253255        Edit smear_parameters_S_SC,smear_coef_S_SC                                       
    254256         
     
    278280 
    279281        //setup form factor coefficient wave 
    280         Make/O/D/N=4 form_S_SC 
     282        Make/O/D/N=5 form_S_SC 
    281283        form_S_SC[0] = 1 
    282284        form_S_SC[1] = w[1] 
    283285        form_S_SC[2] = w[2] 
    284         form_S_SC[3] = 0 
     286        form_S_SC[3] = w[3] 
     287        form_S_SC[4] = 0 
    285288         
    286289        //setup structure factor coefficient wave 
    287290        Make/O/D/N=6 struct_S_SC 
    288291        struct_S_SC[0] = 2*w[1]         //diameter 
    289         struct_S_SC[1] = w[3] 
     292        struct_S_SC[1] = w[4] 
    290293        struct_S_SC[2] = w[0] 
    291         struct_S_SC[3] = w[5] 
    292         struct_S_SC[4] = w[4] 
    293         struct_S_SC[5] = w[6] 
     294        struct_S_SC[3] = w[6] 
     295        struct_S_SC[4] = w[5] 
     296        struct_S_SC[5] = w[7] 
    294297         
    295298        //calculate each and combine 
     
    299302        yw = temp_S_SC_PQ * temp_S_SC_SQ 
    300303        yw *= w[0] 
    301         yw += w[7] 
     304        yw += w[8] 
    302305         
    303306        //cleanup waves 
     
    319322        Make/O/D/n=(num) xwave_S_SHS,ywave_S_SHS                                         
    320323        xwave_S_SHS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num))                                   
    321         Make/O/D coef_S_SHS = {0.1,60,1e-6,0.05,0.2,0.01}                                                
    322         make/o/t parameters_S_SHS = {"volume fraction","Radius (A)","contrast (-2)","perturbation parameter (0.1)","stickiness, tau","bkgd (cm-1)"}             
     324        Make/O/D coef_S_SHS = {0.1,60,1e-6,6.3e-6,0.05,0.2,0.01}                                                 
     325        make/o/t parameters_S_SHS = {"volume fraction","Radius (A)","SLD sphere (A-2)","SLD solvent (A-2)","perturbation parameter (0.1)","stickiness, tau","bkgd (cm-1)"}               
    323326        Edit/K=1 parameters_S_SHS,coef_S_SHS 
    324327        Variable/G root:g_S_SHS                                          
     
    348351         
    349352        // Setup parameter table for model function 
    350         Make/O/D smear_coef_S_SHS = {0.1,60,1e-6,0.05,0.2,0.01}                                          
    351         make/o/t smear_parameters_S_SHS = {"volume fraction","Radius (A)","contrast (-2)","perturbation parameter (0.1)","stickiness, tau","bkgd (cm-1)"}               
     353        Make/O/D smear_coef_S_SHS = {0.1,60,1e-6,6.3e-6,0.05,0.2,0.01}                                           
     354        make/o/t smear_parameters_S_SHS = {"volume fraction","Radius (A)","SLD sphere (A-2)","SLD solvent (A-2)","perturbation parameter (0.1)","stickiness, tau","bkgd (cm-1)"}                 
    352355        Edit smear_parameters_S_SHS,smear_coef_S_SHS                                     
    353356         
     
    377380         
    378381        //setup form factor coefficient wave 
    379         Make/O/D/N=4 form_S_SHS 
     382        Make/O/D/N=5 form_S_SHS 
    380383        form_S_SHS[0] = 1 
    381384        form_S_SHS[1] = w[1] 
    382385        form_S_SHS[2] = w[2] 
    383         form_S_SHS[3] = 0 
     386        form_S_SHS[3] = w[3] 
     387        form_S_SHS[4] = 0 
    384388         
    385389        //setup structure factor coefficient wave 
     
    387391        struct_S_SHS[0] = w[1] 
    388392        struct_S_SHS[1] = w[0] 
    389         struct_S_SHS[2] = w[3] 
    390         struct_S_SHS[3] = w[4] 
     393        struct_S_SHS[2] = w[4] 
     394        struct_S_SHS[3] = w[5] 
    391395         
    392396        //calculate each and combine 
     
    396400        yw = temp_S_SHS_PQ * temp_S_SHS_SQ 
    397401        yw *= w[0] 
    398         yw += w[5] 
     402        yw += w[6] 
    399403         
    400404        //cleanup waves 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/UnifEllipsoid_and_Struct.ipf

    r166 r236  
    2020        Make/O/D/n=(num) xwave_EOR_HS,ywave_EOR_HS 
    2121        xwave_EOR_HS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    22         Make/O/D coef_EOR_HS = {0.01,20.,400,3.0e-6,0.01} 
    23         make/o/t parameters_EOR_HS = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","contrast (A^-2)","incoh. bkg (cm^-1)"} 
     22        Make/O/D coef_EOR_HS = {0.01,20.,400,1e-6,6.3e-6,0.01} 
     23        make/o/t parameters_EOR_HS = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","SLD ellipsoid (A^-2)","SLD solvent (A^-2)","incoh. bkg (cm^-1)"} 
    2424        Edit parameters_EOR_HS,coef_EOR_HS 
    2525         
     
    4848         
    4949        // Setup parameter table for model function 
    50         Make/O/D smear_coef_EOR_HS = {0.01,20.,400,3.0e-6,0.01} 
    51         make/o/t smear_parameters_EOR_HS = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","contrast (A^-2)","incoh. bkg (cm^-1)"} 
     50        Make/O/D smear_coef_EOR_HS = {0.01,20.,400,1e-6,6.3e-6,0.01} 
     51        make/o/t smear_parameters_EOR_HS = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","SLD ellipsoid (A^-2)","SLD solvent (A^-2)","incoh. bkg (cm^-1)"} 
    5252        Edit smear_parameters_EOR_HS,smear_coef_EOR_HS                                   
    5353         
     
    8181         
    8282        //setup form factor coefficient wave 
    83         Make/O/D/N=5 form_EOR_HS 
     83        Make/O/D/N=6 form_EOR_HS 
    8484        form_EOR_HS[0] = 1 
    8585        form_EOR_HS[1] = w[1] 
    8686        form_EOR_HS[2] = w[2] 
    8787        form_EOR_HS[3] = w[3] 
    88         form_EOR_HS[4] = 0 
     88        form_EOR_HS[4] = w[4] 
     89        form_EOR_HS[5] = 0 
    8990         
    9091        //setup structure factor coefficient wave 
     
    99100        yw = temp_EOR_HS_PQ * temp_EOR_HS_SQ 
    100101        yw *= w[0] 
    101         yw += w[4] 
     102        yw += w[5] 
    102103         
    103104        //cleanup waves 
     
    115116        Make/O/D/n=(num) xwave_EOR_SW,ywave_EOR_SW 
    116117        xwave_EOR_SW =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    117         Make/O/D coef_EOR_SW = {0.01,20.,400,3.0e-6,1.0,1.2,0.01} 
    118         make/o/t parameters_EOR_SW = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","contrast (A^-2)","well depth (kT)","well width (diam.)","incoh. bkg (cm^-1)"} 
     118        Make/O/D coef_EOR_SW = {0.01,20.,400,1e-6,6.3e-6,1.0,1.2,0.01} 
     119        make/o/t parameters_EOR_SW = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","SLD ellipsoid (A^-2)","SLD solvent (A^-2)","well depth (kT)","well width (diam.)","incoh. bkg (cm^-1)"} 
    119120        Edit parameters_EOR_SW,coef_EOR_SW 
    120121         
     
    144145         
    145146        // Setup parameter table for model function 
    146         Make/O/D smear_coef_EOR_SW = {0.01,20.,400,3.0e-6,1.0,1.2,0.01} 
    147         make/o/t smear_parameters_EOR_SW = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","contrast (A^-2)","well depth (kT)","well width (diam.)","incoh. bkg (cm^-1)"} 
     147        Make/O/D smear_coef_EOR_SW = {0.01,20.,400,1e-6,6.3e-6,1.0,1.2,0.01} 
     148        make/o/t smear_parameters_EOR_SW = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","SLD ellipsoid (A^-2)","SLD solvent (A^-2)","well depth (kT)","well width (diam.)","incoh. bkg (cm^-1)"} 
    148149        Edit smear_parameters_EOR_SW,smear_coef_EOR_SW                                   
    149150         
     
    176177         
    177178        //setup form factor coefficient wave 
    178         Make/O/D/N=5 form_EOR_SW 
     179        Make/O/D/N=6 form_EOR_SW 
    179180        form_EOR_SW[0] = 1 
    180181        form_EOR_SW[1] = w[1] 
    181182        form_EOR_SW[2] = w[2] 
    182183        form_EOR_SW[3] = w[3] 
    183         form_EOR_SW[4] = 0 
     184        form_EOR_SW[4] = w[4] 
     185        form_EOR_SW[5] = 0 
    184186         
    185187        //setup structure factor coefficient wave 
     
    187189        struct_EOR_SW[0] = 0.5*DiamEllip(aa,bb) 
    188190        struct_EOR_SW[1] = w[0] 
    189         struct_EOR_SW[2] = w[4] 
    190         struct_EOR_SW[3] = w[5] 
     191        struct_EOR_SW[2] = w[5] 
     192        struct_EOR_SW[3] = w[6] 
    191193         
    192194        //calculate each and combine 
     
    196198        yw = temp_EOR_SW_PQ * temp_EOR_SW_SQ 
    197199        yw *= w[0] 
    198         yw += w[6] 
     200        yw += w[7] 
    199201         
    200202        //cleanup waves 
     
    217219        Make/O/D/n=(num) xwave_EOR_SC,ywave_EOR_SC 
    218220        xwave_EOR_SC =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    219         Make/O/D coef_EOR_SC = {0.01,20.,400,3.0e-6,20,0,298,78,0.01} 
    220         make/o/t parameters_EOR_SC = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","contrast (A^-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","incoh. bkg (cm^-1)"} 
     221        Make/O/D coef_EOR_SC = {0.01,20.,400,1e-6,6.3e-6,20,0,298,78,0.01} 
     222        make/o/t parameters_EOR_SC = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","SLD ellipsoid (A^-2)","SLD solvent (A^-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","incoh. bkg (cm^-1)"} 
    221223        Edit parameters_EOR_SC,coef_EOR_SC 
    222224 
     
    251253         
    252254        // Setup parameter table for model function 
    253         Make/O/D smear_coef_EOR_SC = {0.01,20.,400,3.0e-6,20,0,298,78,0.01} 
    254         make/o/t smear_parameters_EOR_SC = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","contrast (A^-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","incoh. bkg (cm^-1)"} 
     255        Make/O/D smear_coef_EOR_SC = {0.01,20.,400,1e-6,6.3e-6,20,0,298,78,0.01} 
     256        make/o/t smear_parameters_EOR_SC = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","SLD ellipsoid (A^-2)","SLD solvent (A^-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","incoh. bkg (cm^-1)"} 
    255257        Edit smear_parameters_EOR_SC,smear_coef_EOR_SC                                   
    256258         
     
    283285         
    284286        //setup form factor coefficient wave 
    285         Make/O/D/N=5 form_EOR_SC 
     287        Make/O/D/N=6 form_EOR_SC 
    286288        form_EOR_SC[0] = 1 
    287289        form_EOR_SC[1] = w[1] 
    288290        form_EOR_SC[2] = w[2] 
    289291        form_EOR_SC[3] = w[3] 
    290         form_EOR_SC[4] = 0 
     292        form_EOR_SC[4] = w[4] 
     293        form_EOR_SC[5] = 0 
    291294         
    292295        //setup structure factor coefficient wave 
    293296        Make/O/D/N=6 struct_EOR_SC 
    294297        struct_EOR_SC[0] = DiamEllip(aa,bb) 
    295         struct_EOR_SC[1] = w[4] 
     298        struct_EOR_SC[1] = w[5] 
    296299        struct_EOR_SC[2] = w[0] 
    297         struct_EOR_SC[3] = w[6] 
    298         struct_EOR_SC[4] = w[5] 
    299         struct_EOR_SC[5] = w[7] 
     300        struct_EOR_SC[3] = w[7] 
     301        struct_EOR_SC[4] = w[6] 
     302        struct_EOR_SC[5] = w[8] 
    300303         
    301304        //calculate each and combine 
     
    305308        yw = temp_EOR_SC_PQ * temp_EOR_SC_SQ 
    306309        yw *= w[0] 
    307         yw += w[8] 
     310        yw += w[9] 
    308311         
    309312        //cleanup waves 
     
    321324        Make/O/D/n=(num) xwave_EOR_SHS,ywave_EOR_SHS 
    322325        xwave_EOR_SHS =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    323         Make/O/D coef_EOR_SHS = {0.01,20.,400,3.0e-6,0.05,0.2,0.01} 
    324         make/o/t parameters_EOR_SHS = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","contrast (A^-2)","perturbation parameter (0.1)","stickiness, tau","incoh. bkg (cm^-1)"} 
     326        Make/O/D coef_EOR_SHS = {0.01,20.,400,1e-6,6.3e-6,0.05,0.2,0.01} 
     327        make/o/t parameters_EOR_SHS = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","SLD ellipsoid (A^-2)","SLD solvent (A^-2)","perturbation parameter (0.1)","stickiness, tau","incoh. bkg (cm^-1)"} 
    325328        Edit parameters_EOR_SHS,coef_EOR_SHS 
    326329         
     
    350353         
    351354        // Setup parameter table for model function 
    352         Make/O/D smear_coef_EOR_SHS = {0.01,20.,400,3.0e-6,0.05,0.2,0.01} 
    353         make/o/t smear_parameters_EOR_SHS = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","contrast (A^-2)","perturbation parameter (0.1)","stickiness, tau","incoh. bkg (cm^-1)"} 
     355        Make/O/D smear_coef_EOR_SHS = {0.01,20.,400,1e-6,6.3e-6,0.05,0.2,0.01} 
     356        make/o/t smear_parameters_EOR_SHS = {"volume fraction","R(a) rotation axis (A)","R(b) (A)","SLD ellipsoid (A^-2)","SLD solvent (A^-2)","perturbation parameter (0.1)","stickiness, tau","incoh. bkg (cm^-1)"} 
    354357        Edit smear_parameters_EOR_SHS,smear_coef_EOR_SHS                                         
    355358         
     
    382385         
    383386        //setup form factor coefficient wave 
    384         Make/O/D/N=5 form_EOR_SHS 
     387        Make/O/D/N=6 form_EOR_SHS 
    385388        form_EOR_SHS[0] = 1 
    386389        form_EOR_SHS[1] = w[1] 
    387390        form_EOR_SHS[2] = w[2] 
    388391        form_EOR_SHS[3] = w[3] 
    389         form_EOR_SHS[4] = 0 
     392        form_EOR_SHS[4] = w[4] 
     393        form_EOR_SHS[5] = 0 
    390394         
    391395        //setup structure factor coefficient wave 
     
    393397        struct_EOR_SHS[0] = 0.5*DiamEllip(aa,bb) 
    394398        struct_EOR_SHS[1] = w[0] 
    395         struct_EOR_SHS[2] = w[4] 
    396         struct_EOR_SHS[3] = w[5] 
     399        struct_EOR_SHS[2] = w[5] 
     400        struct_EOR_SHS[3] = w[6] 
    397401         
    398402        //calculate each and combine 
     
    402406        yw = temp_EOR_SHS_PQ *temp_EOR_SHS_SQ 
    403407        yw *= w[0] 
    404         yw += w[6] 
     408        yw += w[7] 
    405409         
    406410        //cleanup waves 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/UniformEllipsoid.ipf

    r166 r236  
    1919        Make/O/D/n=(num) xwave_eor,ywave_eor 
    2020        xwave_eor =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    21         Make/O/D coef_eor = {1.,20.,400,3.0e-6,0.01} 
    22         make/o/t parameters_eor = {"scale","R a (rotation axis) (A)","R b (A)","Contrast (A^-2)","incoh. bkg (cm^-1)"} 
     21        Make/O/D coef_eor = {1.,20.,400,1e-6,6.3e-6,0.01} 
     22        make/o/t parameters_eor = {"scale","R a (rotation axis) (A)","R b (A)","SLD ellipsoid (A^-2)","SLD solvent (A^-2)","incoh. bkg (cm^-1)"} 
    2323        Edit parameters_eor,coef_eor 
    2424        Variable/G root:g_eor 
     
    4848         
    4949        // Setup parameter table for model function 
    50         Make/O/D smear_coef_eor = {1.,20.,400,3.0e-6,0.01} 
    51         make/o/t smear_parameters_eor = {"scale","R a (rotation axis) (A)","R b (A)","Contrast (A^-2)","incoh. bkg (cm^-1)"} 
     50        Make/O/D smear_coef_eor = {1.,20.,400,1e-6,6.3e-6,0.01} 
     51        make/o/t smear_parameters_eor = {"scale","R a (rotation axis) (A)","R b (A)","SLD ellipsoid (A^-2)","SLD solvent (A^-2)","incoh. bkg (cm^-1)"} 
    5252        Edit smear_parameters_eor,smear_coef_eor 
    5353         
     
    9393        //[1] Axis of rotation 
    9494        //[2] two equal radii 
    95         //[3] contrast (A^-2) 
     95        //[3] sld ellipsoid 
     96        //[3] sld solvent (A^-2) 
    9697        //[4] background (cm^-1) 
    97         Variable scale, ra,vra,delrho,bkg 
     98        Variable scale, ra,vra,delrho,bkg,slde,slds 
    9899        scale = w[0] 
    99100        vra = w[1] 
    100101        ra = w[2] 
    101         delrho = w[3] 
    102         bkg = w[4] 
     102        slde = w[3] 
     103        slds = w[4] 
     104        bkg = w[5] 
     105         
     106        delrho = slde - slds 
     107 
    103108        //if vra < ra, OBLATE 
    104109        //if vra > ra, PROLATE 
Note: See TracChangeset for help on using the changeset viewer.