Changeset 682
- Timestamp:
- Apr 12, 2010 9:26:51 AM (12 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/NewModels_2009
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/NewModels_2009/FuzzySpheres_Sq_v40.ipf
r656 r682 16 16 // 17 17 // AJJ Feb 2010 18 // added the lorentzian SRK APR 2010. this is a little different than other P*S, since the 19 // Lorentzian is not scaled by phi, but rather is added on to the high q independently. 20 // -- so it must be tacked on at the end, just like the form factor 18 21 19 22 … … 36 39 Make/O/D/N=(num) xwave_fuzz_HS,ywave_fuzz_HS 37 40 xwave_fuzz_HS = alog( log(qmin) + x*((log(qmax)-log(qmin))/num) ) 38 Make/O/D coef_fuzz_HS = {0.01,60,0.2,10,1e-6,3e-6, 0.001}39 make/O/T parameters_fuzz_HS = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)"," bkg (cm-1 sr-1)"}41 Make/O/D coef_fuzz_HS = {0.01,60,0.2,10,1e-6,3e-6,1,50,0.001} 42 make/O/T parameters_fuzz_HS = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","Lorentz Scale","Lorentz length","bkg (cm-1 sr-1)"} 40 43 Edit parameters_fuzz_HS,coef_fuzz_HS 41 44 … … 64 67 65 68 // Setup parameter table for model function 66 Make/O/D smear_coef_fuzz_HS = {0.01,60,0.2,10,1e-6,3e-6, 0.001}67 make/o/t smear_parameters_fuzz_HS = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)"," bkg (cm-1 sr-1)"}69 Make/O/D smear_coef_fuzz_HS = {0.01,60,0.2,10,1e-6,3e-6,1,50,0.001} 70 make/o/t smear_parameters_fuzz_HS = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","Lorentz Scale","Lorentz length","bkg (cm-1 sr-1)"} 68 71 Edit smear_parameters_fuzz_HS,smear_coef_fuzz_HS 69 72 … … 94 97 95 98 //setup form factor coefficient wave 96 Make/O/D/N= 7form_fuzz_HS97 form_fuzz_HS[0] = 199 Make/O/D/N=9 form_fuzz_HS 100 form_fuzz_HS[0] = w[0] // send the real volume fraction in here, so the scaling is done correctly 98 101 form_fuzz_HS[1] = w[1] 99 102 form_fuzz_HS[2] = w[2] … … 101 104 form_fuzz_HS[4] = w[4] 102 105 form_fuzz_HS[5] = w[5] 103 form_fuzz_HS[6] = 0 106 form_fuzz_HS[6] = w[6] // w[6] is the Lorentzian scale 107 form_fuzz_HS[7] = w[7] 108 form_fuzz_HS[8] = 0 104 109 105 110 //calculate the diameter of the effective one-component sphere … … 120 125 Duplicate/O xw tmp_fuzz_HS_PQ,tmp_fuzz_HS_SQ 121 126 FuzzySpheres(form_fuzz_HS,tmp_fuzz_HS_PQ,xw) 127 122 128 HardSphereStruct(struct_fuzz_HS,tmp_fuzz_HS_SQ,xw) 123 129 yw = tmp_fuzz_HS_PQ * tmp_fuzz_HS_SQ 124 yw *= w[0] 125 yw += w[6] 130 131 // yw *= w[0] // scaling is done in FuzzySpheres 132 yw += w[8] 126 133 127 134 //cleanup waves … … 140 147 Make/O/D/N=(num) xwave_fuzz_SW,ywave_fuzz_SW 141 148 xwave_fuzz_SW = alog( log(qmin) + x*((log(qmax)-log(qmin))/num) ) 142 Make/O/D coef_fuzz_SW = {0.01,60,0.2,10,1e-6,3e-6,1 .0,1.2,0.001}143 make/O/T parameters_fuzz_SW = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)"," well depth (kT)","well width (diam.)","bkg (cm-1 sr-1)"}149 Make/O/D coef_fuzz_SW = {0.01,60,0.2,10,1e-6,3e-6,1,50,1.0,1.2,0.001} 150 make/O/T parameters_fuzz_SW = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","Lorentz Scale","Lorentz length","well depth (kT)","well width (diam.)","bkg (cm-1 sr-1)"} 144 151 Edit parameters_fuzz_SW,coef_fuzz_SW 145 152 … … 168 175 169 176 // Setup parameter table for model function 170 Make/O/D smear_coef_fuzz_SW = {0.01,60,0.2,10,1e-6,3e-6,1 .0,1.2,0.001}171 make/o/t smear_parameters_fuzz_SW = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)"," well depth (kT)","well width (diam.)","bkg (cm-1 sr-1)"}177 Make/O/D smear_coef_fuzz_SW = {0.01,60,0.2,10,1e-6,3e-6,1,50,1.0,1.2,0.001} 178 make/o/t smear_parameters_fuzz_SW = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","Lorentz Scale","Lorentz length","well depth (kT)","well width (diam.)","bkg (cm-1 sr-1)"} 172 179 Edit smear_parameters_fuzz_SW,smear_coef_fuzz_SW 173 180 … … 197 204 198 205 //setup form factor coefficient wave 199 Make/O/D/N= 7form_fuzz_SW200 form_fuzz_SW[0] = 1206 Make/O/D/N=9 form_fuzz_SW 207 form_fuzz_SW[0] = w[0] 201 208 form_fuzz_SW[1] = w[1] 202 209 form_fuzz_SW[2] = w[2] … … 204 211 form_fuzz_SW[4] = w[4] 205 212 form_fuzz_SW[5] = w[5] 206 form_fuzz_SW[6] = 0 213 form_fuzz_SW[6] = w[6] 214 form_fuzz_SW[7] = w[7] 215 form_fuzz_SW[8] = 0 207 216 208 217 //calculate the diameter of the effective one-component sphere … … 218 227 struct_fuzz_SW[0] = diam/2 219 228 struct_fuzz_SW[1] = w[0] 220 struct_fuzz_SW[2] = w[ 6]221 struct_fuzz_SW[3] = w[ 7]229 struct_fuzz_SW[2] = w[8] 230 struct_fuzz_SW[3] = w[9] 222 231 223 232 //calculate each and combine … … 226 235 SquareWellStruct(struct_fuzz_SW,tmp_fuzz_SW_SQ,xw) 227 236 yw = tmp_fuzz_SW_PQ * tmp_fuzz_SW_SQ 228 yw *= w[0] 229 yw += w[8] 237 238 // yw *= w[0] // scaling is done in FuzzySpheres 239 yw += w[10] 230 240 231 241 //cleanup waves … … 250 260 Make/O/D/N=(num) xwave_fuzz_SC,ywave_fuzz_SC 251 261 xwave_fuzz_SC = alog( log(qmin) + x*((log(qmax)-log(qmin))/num) ) 252 Make/O/D coef_fuzz_SC = {0.01,60,0.2,10,1e-6,3e-6, 20,0,298,78,0.001}253 make/O/T parameters_fuzz_SC = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)"," charge","movalent salt(M)","Temperature (K)","dielectric const","bkg (cm-1 sr-1)"}262 Make/O/D coef_fuzz_SC = {0.01,60,0.2,10,1e-6,3e-6,1,50,20,0,298,78,0.001} 263 make/O/T parameters_fuzz_SC = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","Lorentz Scale","Lorentz length","charge","movalent salt(M)","Temperature (K)","dielectric const","bkg (cm-1 sr-1)"} 254 264 Edit parameters_fuzz_SC,coef_fuzz_SC 255 265 … … 283 293 284 294 // Setup parameter table for model function 285 Make/O/D smear_coef_fuzz_SC = {0.01,60,0.2,10,1e-6,3e-6, 20,0,298,78,0.001}286 make/o/t smear_parameters_fuzz_SC = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)"," charge","movalent salt(M)","Temperature (K)","dielectric const","bkg (cm-1 sr-1)"}295 Make/O/D smear_coef_fuzz_SC = {0.01,60,0.2,10,1e-6,3e-6,1,50,20,0,298,78,0.001} 296 make/o/t smear_parameters_fuzz_SC = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","Lorentz Scale","Lorentz length","charge","movalent salt(M)","Temperature (K)","dielectric const","bkg (cm-1 sr-1)"} 287 297 Edit smear_parameters_fuzz_SC,smear_coef_fuzz_SC 288 298 … … 312 322 313 323 //setup form factor coefficient wave 314 Make/O/D/N= 7form_fuzz_SC315 form_fuzz_SC[0] = 1324 Make/O/D/N=9 form_fuzz_SC 325 form_fuzz_SC[0] = w[0] 316 326 form_fuzz_SC[1] = w[1] 317 327 form_fuzz_SC[2] = w[2] … … 319 329 form_fuzz_SC[4] = w[4] 320 330 form_fuzz_SC[5] = w[5] 321 form_fuzz_SC[6] = 0 331 form_fuzz_SC[6] = w[6] 332 form_fuzz_SC[7] = w[7] 333 form_fuzz_SC[8] = 0 322 334 323 335 //calculate the diameter of the effective one-component sphere … … 332 344 Make/O/D/N=6 struct_fuzz_SC 333 345 struct_fuzz_SC[0] = diam 334 struct_fuzz_SC[1] = w[ 6]346 struct_fuzz_SC[1] = w[8] 335 347 struct_fuzz_SC[2] = w[0] 336 struct_fuzz_SC[3] = w[ 8]337 struct_fuzz_SC[4] = w[ 7]338 struct_fuzz_SC[5] = w[ 9]348 struct_fuzz_SC[3] = w[10] 349 struct_fuzz_SC[4] = w[9] 350 struct_fuzz_SC[5] = w[11] 339 351 340 352 //calculate each and combine … … 343 355 HayterPenfoldMSA(struct_fuzz_SC,tmp_fuzz_SC_SQ,xw) 344 356 yw = tmp_fuzz_SC_PQ * tmp_fuzz_SC_SQ 345 yw *= w[0] 346 yw += w[10] 357 358 // yw *= w[0] // scaling is done in FuzzySpheres 359 yw += w[12] 347 360 348 361 //cleanup waves … … 361 374 Make/O/D/N=(num) xwave_fuzz_SHS,ywave_fuzz_SHS 362 375 xwave_fuzz_SHS = alog( log(qmin) + x*((log(qmax)-log(qmin))/num) ) 363 Make/O/D coef_fuzz_SHS = {0.01,60,0.2,10,1e-6,3e-6, 0.05,0.2,0.001}364 make/O/T parameters_fuzz_SHS = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)"," perturbation parameter (0.1)","stickiness, tau","bkg (cm-1 sr-1)"}376 Make/O/D coef_fuzz_SHS = {0.01,60,0.2,10,1e-6,3e-6,1,50,0.05,0.2,0.001} 377 make/O/T parameters_fuzz_SHS = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","Lorentz Scale","Lorentz length","perturbation parameter (0.1)","stickiness, tau","bkg (cm-1 sr-1)"} 365 378 Edit parameters_fuzz_SHS,coef_fuzz_SHS 366 379 … … 389 402 390 403 // Setup parameter table for model function 391 Make/O/D smear_coef_fuzz_SHS = {0.01,60,0.2,10,1e-6,3e-6, 0.05,0.2,0.001}392 make/o/t smear_parameters_fuzz_SHS = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)"," perturbation parameter (0.1)","stickiness, tau","bkg (cm-1 sr-1)"}404 Make/O/D smear_coef_fuzz_SHS = {0.01,60,0.2,10,1e-6,3e-6,1,50,0.05,0.2,0.001} 405 make/o/t smear_parameters_fuzz_SHS = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","Lorentz Scale","Lorentz length","perturbation parameter (0.1)","stickiness, tau","bkg (cm-1 sr-1)"} 393 406 Edit smear_parameters_fuzz_SHS,smear_coef_fuzz_SHS 394 407 … … 418 431 419 432 //setup form factor coefficient wave 420 Make/O/D/N= 7form_fuzz_SHS421 form_fuzz_SHS[0] = 1433 Make/O/D/N=9 form_fuzz_SHS 434 form_fuzz_SHS[0] = w[0] 422 435 form_fuzz_SHS[1] = w[1] 423 436 form_fuzz_SHS[2] = w[2] … … 425 438 form_fuzz_SHS[4] = w[4] 426 439 form_fuzz_SHS[5] = w[5] 427 form_fuzz_SHS[6] = 0 440 form_fuzz_SHS[6] = w[6] 441 form_fuzz_SHS[7] = w[7] 442 form_fuzz_SHS[8] = 0 428 443 429 444 //calculate the diameter of the effective one-component sphere … … 439 454 struct_fuzz_SHS[0] = diam/2 440 455 struct_fuzz_SHS[1] = w[0] 441 struct_fuzz_SHS[2] = w[ 6]442 struct_fuzz_SHS[3] = w[ 7]456 struct_fuzz_SHS[2] = w[8] 457 struct_fuzz_SHS[3] = w[9] 443 458 444 459 //calculate each and combine … … 447 462 StickyHS_Struct(struct_fuzz_SHS,tmp_fuzz_SHS_SQ,xw) 448 463 yw = tmp_fuzz_SHS_PQ * tmp_fuzz_SHS_SQ 449 yw *= w[0] 450 yw += w[8] 464 465 // yw *= w[0] // scaling is done in FuzzySpheres 466 yw += w[10] 451 467 452 468 //cleanup waves -
sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/NewModels_2009/FuzzySpheres_v40.ipf
r679 r682 13 13 // SRK JUL 2009 14 14 // 15 // Include lorentzian term for *high* Q component of the scattering .15 // Include lorentzian term for *high* Q component of the scattering, calculate here, removing the #include 16 16 // 17 17 // AJJ Feb 2010 18 18 19 #include "Lorentz_model_v40"19 //#include "Lorentz_model_v40" 20 20 21 21 Proc PlotFuzzySpheres(num,qmin,qmax) … … 99 99 100 100 Variable scale,rad,pd,sig,rho,rhos,bkg,delrho,sig_surf,lor_sf,lor_len 101 101 Variable I0, L 102 I0 = w[0] 103 L = w[1] 104 102 105 //set up the coefficient values 103 106 scale=w[0] … … 109 112 rhos=w[5] 110 113 delrho=rho-rhos 114 I0 = w[6] //for the Lorentzian 115 L = w[7] 111 116 bkg=w[8] 112 117 … … 187 192 inten *= scale 188 193 189 //Lorentzian term 190 Make/O/N=3 tmp_lor 191 tmp_lor[0] = w[6] 192 tmp_lor[1] = w[7] 193 tmp_lor[2] = 0 194 195 inten+=fLorentz_model(tmp_lor,xx) 194 //Lorentzian term 195 inten += I0/(1 + (xx*L)^2) 196 196 197 197 198 inten+=bkg
Note: See TracChangeset
for help on using the changeset viewer.