Changeset 236
- Timestamp:
- Jan 11, 2008 5:07:24 PM (15 years ago)
- 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 19 19 make/o/D/n=(num) xwave_cyl,ywave_cyl 20 20 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)"} 23 23 Edit parameters_cyl,coef_cyl 24 24 Variable/G root:g_cyl … … 48 48 49 49 // 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)"} 52 52 Edit smear_parameters_cyl,smear_coef_cyl 53 53 … … 93 93 //[1] cylinder RADIUS (A) 94 94 //[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 98 99 scale = w[0] 99 100 radius = w[1] 100 101 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 103 107 // 104 108 // 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 19 19 Make/O/D/n=(num) xwave_CYL_HS,ywave_CYL_HS 20 20 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)"} 23 23 Edit parameters_CYL_HS,coef_CYL_HS 24 24 … … 48 48 49 49 // 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)"} 52 52 Edit smear_parameters_CYL_HS,smear_coef_CYL_HS 53 53 … … 80 80 81 81 //setup form factor coefficient wave 82 Make/O/D/N= 5form_CYL_HS82 Make/O/D/N=6 form_CYL_HS 83 83 form_CYL_HS[0] = 1 84 84 form_CYL_HS[1] = w[1] 85 85 form_CYL_HS[2] = w[2] 86 86 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 88 89 89 90 //setup structure factor coefficient wave … … 98 99 yw = temp_CYL_HS_PQ * temp_CYL_HS_SQ 99 100 yw *= w[0] 100 yw += w[ 4]101 yw += w[5] 101 102 102 103 //cleanup waves (don't do this - it takes a lot of time...) … … 114 115 Make/O/D/n=(num) xwave_CYL_SW,ywave_CYL_SW 115 116 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)"} 118 119 Edit parameters_CYL_SW,coef_CYL_SW 119 120 … … 143 144 144 145 // 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)"} 147 148 Edit smear_parameters_CYL_SW,smear_coef_CYL_SW 148 149 … … 175 176 176 177 //setup form factor coefficient wave 177 Make/O/D/N= 5form_CYL_SW178 Make/O/D/N=6 form_CYL_SW 178 179 form_CYL_SW[0] = 1 179 180 form_CYL_SW[1] = w[1] 180 181 form_CYL_SW[2] = w[2] 181 182 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 183 185 184 186 //setup structure factor coefficient wave … … 186 188 struct_CYL_SW[0] = 0.5*DiamCyl(len,rad) 187 189 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] 190 192 191 193 //calculate each and combine … … 195 197 yw = temp_CYL_SW_PQ * temp_CYL_SW_SQ 196 198 yw *= w[0] 197 yw += w[ 6]199 yw += w[7] 198 200 199 201 //cleanup waves … … 216 218 Make/O/D/n=(num) xwave_CYL_SC,ywave_CYL_SC 217 219 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)"} 220 222 Edit parameters_CYL_SC,coef_CYL_SC 221 223 … … 250 252 251 253 // 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)"} 254 256 Edit smear_parameters_CYL_SC,smear_coef_CYL_SC 255 257 … … 282 284 283 285 //setup form factor coefficient wave 284 Make/O/D/N= 5form_CYL_SC286 Make/O/D/N=6 form_CYL_SC 285 287 form_CYL_SC[0] = 1 286 288 form_CYL_SC[1] = w[1] 287 289 form_CYL_SC[2] = w[2] 288 290 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 290 293 291 294 //setup structure factor coefficient wave 292 295 Make/O/D/N=6 struct_CYL_SC 293 296 struct_CYL_SC[0] = DiamCyl(len,rad) 294 struct_CYL_SC[1] = w[ 4]297 struct_CYL_SC[1] = w[5] 295 298 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] 299 302 300 303 //calculate each and combine … … 304 307 yw = temp_CYL_SC_PQ * temp_CYL_SC_SQ 305 308 yw *= w[0] 306 yw += w[ 8]309 yw += w[9] 307 310 308 311 //cleanup waves … … 321 324 Make/O/D/n=(num) xwave_CYL_SHS,ywave_CYL_SHS 322 325 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)"} 325 328 Edit parameters_CYL_SHS,coef_CYL_SHS 326 329 … … 350 353 351 354 // 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)"} 354 357 Edit smear_parameters_CYL_SHS,smear_coef_CYL_SHS 355 358 … … 382 385 383 386 //setup form factor coefficient wave 384 Make/O/D/N= 5form_CYL_SHS387 Make/O/D/N=6 form_CYL_SHS 385 388 form_CYL_SHS[0] = 1 386 389 form_CYL_SHS[1] = w[1] 387 390 form_CYL_SHS[2] = w[2] 388 391 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 390 394 391 395 //setup structure factor coefficient wave … … 393 397 struct_CYL_SHS[0] = 0.5*DiamCyl(len,rad) 394 398 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] 397 401 398 402 //calculate each and combine … … 402 406 yw = temp_CYL_SHS_PQ * temp_CYL_SHS_SQ 403 407 yw *= w[0] 404 yw += w[ 6]408 yw += w[7] 405 409 406 410 //cleanup waves -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/HollowCylinders.ipf
r166 r236 19 19 Make/O/D/n=(num) xwave_Hcyl,ywave_Hcyl 20 20 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)"} 23 23 Edit parameters_Hcyl,coef_Hcyl 24 24 Variable/G root:g_hcyl … … 48 48 49 49 // 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)"} 52 52 Edit smear_parameters_Hcyl,smear_coef_Hcyl 53 53 … … 96 96 //[4] contrast (A^-2) 97 97 //[5] background (cm^-1) 98 Variable scale,length,delrho,bkg,rcore,rshell,contrast 98 Variable scale,length,delrho,bkg,rcore,rshell,contrast,sldc,slds 99 99 scale = w[0] 100 100 rcore = w[1] 101 101 rshell = w[2] 102 102 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] 105 107 // 106 108 // 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 28 28 // make/O/T/N=11 parameters_Cyl2D 29 29 // Make/O/D/N=11 coef_Cyl2D 30 make/O/T/N=1 0parameters_Cyl2D31 Make/O/D/N=1 0coef_Cyl2D30 make/O/T/N=11 parameters_Cyl2D 31 Make/O/D/N=11 coef_Cyl2D 32 32 coef_Cyl2D[0] = 1.0 33 33 coef_Cyl2D[1] = 20.0 34 34 coef_Cyl2D[2] = 60.0 35 coef_Cyl2D[3] = 6.0e-636 coef_Cyl2D[4] = 0.037 coef_Cyl2D[5] = 1.5738 coef_Cyl2D[6] = 0.035 coef_Cyl2D[3] = 1e-6 36 coef_Cyl2D[4] = 6.3e-6 37 coef_Cyl2D[5] = 0.0 38 coef_Cyl2D[6] = 1.57 39 39 coef_Cyl2D[7] = 0.0 40 40 coef_Cyl2D[8] = 0.0 41 41 coef_Cyl2D[9] = 0.0 42 coef_Cyl2D[10] = 0.0 42 43 43 44 // currently, the number of integration points is hard-wired to be 25 in Cylinder2D_T 44 //coef_Cyl2D[1 0] = 2545 //coef_Cyl2D[11] = 25 45 46 // 46 47 parameters_Cyl2D[0] = "Scale" 47 48 parameters_Cyl2D[1] = "Radius" 48 49 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" 53 55 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]" //***** 57 59 58 // parameters_Cyl2D[1 0] = "number of integration points"60 // parameters_Cyl2D[11] = "number of integration points" 59 61 60 62 Edit parameters_Cyl2D,coef_Cyl2D … … 102 104 //#if exists("CylinderModel_D") 103 105 // 104 // Make/O/D/N=1 1Cyl2D_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... 105 107 // Cyl2D_tmp = cw 106 // Cyl2D_tmp[1 0] = 25 // hard-wire the number of integration points108 // Cyl2D_tmp[11] = 25 // hard-wire the number of integration points 107 109 // 108 110 // zw= CylinderModel_D(Cyl2D_tmp,xw,yw) … … 123 125 #if exists("Cylinder_2DX") //to hide the function if XOP not installed 124 126 125 Make/O/D/N=1 1Cyl2D_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... 126 128 Cyl2D_tmp = cw 127 Cyl2D_tmp[1 0] = 25 // hard-wire the number of integration points128 Cyl2D_tmp[ 4] = 0 // send a background of zero129 Cyl2D_tmp[11] = 25 // hard-wire the number of integration points 130 Cyl2D_tmp[5] = 0 // send a background of zero 129 131 130 zw[p1,p2]= Cylinder_2DX(Cyl2D_tmp,xw,yw) + cw[ 4] //add in the proper background here132 zw[p1,p2]= Cylinder_2DX(Cyl2D_tmp,xw,yw) + cw[5] //add in the proper background here 131 133 132 134 #endif -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Models_2D/Ellipsoid2D.ipf
r230 r236 29 29 // make/O/T/N=12 parameters_Ellip2D 30 30 // Make/O/D/N=12 coef_Ellip2D 31 make/O/T/N=1 1parameters_Ellip2D32 Make/O/D/N=1 1coef_Ellip2D31 make/O/T/N=12 parameters_Ellip2D 32 Make/O/D/N=12 coef_Ellip2D 33 33 34 34 coef_Ellip2D[0] = 1.0 … … 36 36 coef_Ellip2D[2] = 60.0 37 37 coef_Ellip2D[3] = 1.0e-6 38 coef_Ellip2D[4] = 0.039 coef_Ellip2D[5] = 1.5740 coef_Ellip2D[6] = 0.038 coef_Ellip2D[4] = 6.3e-6 39 coef_Ellip2D[5] = 0.0 40 coef_Ellip2D[6] = 1.57 41 41 coef_Ellip2D[7] = 0.0 42 42 coef_Ellip2D[8] = 0.0 43 43 coef_Ellip2D[9] = 0.0 44 44 coef_Ellip2D[10] = 0.0 45 coef_Ellip2D[11] = 0.0 45 46 // hard-wire the number of integration points 46 // coef_Ellip2D[1 1] = 1047 // coef_Ellip2D[12] = 10 47 48 48 49 parameters_Ellip2D[0] = "Scale" 49 50 parameters_Ellip2D[1] = "Radius_a (rotation axis)" 50 51 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]" 59 61 60 // parameters_Ellip2D[1 1] = "Num of polydisp points"62 // parameters_Ellip2D[12] = "Num of polydisp points" 61 63 62 64 … … 105 107 //#if exists("EllipsoidModel_D") 106 108 // 107 // Make/O/D/N=1 2Ellip2D_tmp109 // Make/O/D/N=13 Ellip2D_tmp 108 110 // Ellip2D_tmp = cw 109 // Ellip2D_tmp[1 1] = 25111 // Ellip2D_tmp[12] = 25 110 112 // 111 113 // zw = EllipsoidModel_D(Ellip2D_tmp,xw,yw) … … 126 128 #if exists("Ellipsoid_2DX") //to hide the function if XOP not installed 127 129 128 Make/O/D/N=1 2Ellip2D_tmp130 Make/O/D/N=13 Ellip2D_tmp 129 131 Ellip2D_tmp = cw 130 Ellip2D_tmp[1 1] = 25131 Ellip2D_tmp[ 4] = 0 //pass in a zero background and add it in later132 Ellip2D_tmp[12] = 25 133 Ellip2D_tmp[5] = 0 //pass in a zero background and add it in later 132 134 133 zw[p1,p2]= Ellipsoid_2DX(Ellip2D_tmp,xw,yw) + cw[ 4]135 zw[p1,p2]= Ellipsoid_2DX(Ellip2D_tmp,xw,yw) + cw[5] 134 136 135 137 #endif -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Models_2D/EllipticalCylinder2D.ipf
r230 r236 27 27 //make/O/T/N=14 parameters_EllCyl2D 28 28 //Make/O/D/N=14 coef_EllCyl2D 29 make/O/T/N=1 3parameters_EllCyl2D30 Make/O/D/N=1 3coef_EllCyl2D29 make/O/T/N=14 parameters_EllCyl2D 30 Make/O/D/N=14 coef_EllCyl2D 31 31 32 32 coef_EllCyl2D[0] = 1.0 … … 35 35 coef_EllCyl2D[3] = 400.0 36 36 coef_EllCyl2D[4] = 3e-6 37 coef_EllCyl2D[5] = 0.038 coef_EllCyl2D[6] = 1.5739 coef_EllCyl2D[7] = 0.037 coef_EllCyl2D[5] = 6.3e-6 38 coef_EllCyl2D[6] = 0.0 39 coef_EllCyl2D[7] = 1.57 40 40 coef_EllCyl2D[8] = 0.0 41 41 coef_EllCyl2D[9] = 0.0 … … 43 43 coef_EllCyl2D[11] = 0.0 44 44 coef_EllCyl2D[12] = 0.0 45 coef_EllCyl2D[13] = 0.0 45 46 46 47 // now hard-wire the # of integration points 47 //coef_EllCyl2D[1 3] = 2548 //coef_EllCyl2D[14] = 25 48 49 49 50 parameters_EllCyl2D[0] = "Scale" … … 51 52 parameters_EllCyl2D[2] = "R_ratio (major/minor)" 52 53 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" 63 65 64 66 Edit parameters_EllCyl2D,coef_EllCyl2D … … 106 108 //#if exists("EllipticalCylinderModel_D") 107 109 // 108 // Make/O/D/N=1 4EllCyl2D_tmp110 // Make/O/D/N=15 EllCyl2D_tmp 109 111 // EllCyl2D_tmp = cw 110 // EllCyl2D_tmp[1 3] = 25112 // EllCyl2D_tmp[14] = 25 111 113 // 112 114 // zw = EllipticalCylinderModel_D(EllCyl2D_tmp,xw,yw) … … 127 129 #if exists("EllipticalCylinder_2DX") //to hide the function if XOP not installed 128 130 129 Make/O/D/N=1 4EllCyl2D_tmp131 Make/O/D/N=15 EllCyl2D_tmp 130 132 EllCyl2D_tmp = cw 131 EllCyl2D_tmp[1 3] = 25132 EllCyl2D_tmp[ 5] = 0 //pass in a zero background and add it in later133 EllCyl2D_tmp[14] = 25 134 EllCyl2D_tmp[6] = 0 //pass in a zero background and add it in later 133 135 134 zw[p1,p2]= EllipticalCylinder_2DX(EllCyl2D_tmp,xw,yw) + cw[ 5]136 zw[p1,p2]= EllipticalCylinder_2DX(EllCyl2D_tmp,xw,yw) + cw[6] 135 137 136 138 #endif -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Models_2D/Sphere_2D.ipf
r230 r236 24 24 SetDataFolder $("root:"+str) 25 25 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)"} 28 28 Edit parameters_sf2D,coef_sf2D 29 29 -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/NewModels_2006/Cylinder_PolyLength.ipf
r166 r236 25 25 make/o/d/n=(num) xwave_cypl,ywave_cypl 26 26 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)"} 29 29 Edit parameters_cypl,coef_cypl 30 30 … … 53 53 54 54 // 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)"} 57 57 Edit smear_parameters_cypl,smear_coef_cypl 58 58 … … 105 105 //[4] contrast (A^-2) 106 106 //[5] background (cm^-1) 107 Variable scale,radius,pd,delrho,bkg,zz,length 107 Variable scale,radius,pd,delrho,bkg,zz,length,sldc,slds 108 108 scale = w[0] 109 109 radius = w[1] 110 110 length = w[2] 111 111 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] 114 116 115 117 zz = (1/pd)^2-1 … … 168 170 // Using 5 Gauss points 169 171 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) 171 173 summ = yyy + summ 172 174 ii+=1 … … 194 196 End //End of function PolyRadCylForm() 195 197 196 Function len_kernel(qw,rad,len_avg,zz, delrho,len)197 Variable qw,rad,len_avg,zz, delrho,len198 Function len_kernel(qw,rad,len_avg,zz,sldc,slds,len) 199 Variable qw,rad,len_avg,zz,sldc,slds,len 198 200 199 201 Variable Pq,vcyl,dl … … 201 203 //calculate the orientationally averaged P(q) for the input rad 202 204 //this is correct - see K&C (1983) or Lin &Tsao JACryst (1996)29 170. 203 Make/O/n= 5kernpar205 Make/O/n=6 kernpar 204 206 Wave kp = kernpar 205 207 kp[0] = 1 //scale fixed at 1 206 208 kp[1] = rad 207 209 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 210 213 211 214 #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 25 25 make/o/d/n=(num) xwave_cypr,ywave_cypr 26 26 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)"} 29 29 Edit parameters_cypr,coef_cypr 30 30 … … 54 54 55 55 // 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)"} 58 58 Edit smear_parameters_cypr,smear_coef_cypr 59 59 … … 82 82 // simply calls the original single point calculation with 83 83 // a wave assignment (this will behave nicely if given point ranges) 84 Function xCyl_PolyRadius(cw,yw,xw) : FitFunc85 Wave cw,yw,xw86 87 #if exists("Cyl_PolyRadiusX")88 yw = Cyl_PolyRadiusX(cw,xw)89 #else90 yw = fCyl_PolyRadius(cw,xw)91 #endif92 return(0)93 End84 //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 94 94 95 95 Function fCyl_PolyRadius(w,x) :FitFunc … … 102 102 //[2] Length (A) 103 103 //[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 107 108 scale = w[0] 108 109 radius = w[1] 109 110 length = w[2] 110 111 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 114 117 zz = (1/pd)^2-1 115 118 // … … 172 175 // Using 5 Gauss points 173 176 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) 175 178 summ = yyy + summ 176 179 ii+=1 … … 198 201 End //End of function PolyRadCylForm() 199 202 200 Function rad_kernel(qw,ravg,len,zz, delrho,rad)201 Variable qw,ravg,len,zz, delrho,rad203 Function rad_kernel(qw,ravg,len,zz,sldc,slds,rad) 204 Variable qw,ravg,len,zz,sldc,slds,rad 202 205 203 206 Variable Pq,vcyl,dr … … 205 208 //calculate the orientationally averaged P(q) for the input rad 206 209 //this is correct - see K&C (1983) or Lin &Tsao JACryst (1996)29 170. 207 Make/O/D/n= 5kernpar210 Make/O/D/n=6 kernpar 208 211 Wave kp = kernpar 209 212 kp[0] = 1 //scale fixed at 1 210 213 kp[1] = rad 211 214 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 214 218 215 219 #if exists("CylinderFormX") … … 287 291 Variable p1,p2 288 292 289 #if exists("Cyl_PolyRadiusX") 293 #if exists("Cyl_PolyRadiusX") //this check is done in the calling function, simply hide from compiler 290 294 yw[p1,p2] = Cyl_PolyRadiusX(cw,xw) 291 #else292 yw[p1,p2] = fCyl_PolyRadius(cw,xw)295 //#else 296 // yw[p1,p2] = fCyl_PolyRadius(cw,xw) 293 297 #endif 294 298 … … 307 311 Wave cw,yw,xw 308 312 313 #if exists("Cyl_PolyRadiusX") 314 309 315 Variable npt=numpnts(yw) 310 316 Variable i,nthreads= ThreadProcessorCount … … 326 332 // Print "elapsed time = ",(StopMSTimer(-2) - t1)/1e6 327 333 334 #else 335 yw = fCyl_PolyRadius(cw,xw) //the Igor, non-XOP, non-threaded calculation 336 #endif 328 337 return(0) 329 338 End -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/NewModels_2006/EllipticalCylinder.ipf
r166 r236 27 27 Make/O/D/n=(num) xwave_ecf,ywave_ecf 28 28 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)"} 31 31 Edit parameters_ecf,coef_ecf 32 32 … … 56 56 57 57 // 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)"} 60 60 Edit smear_parameters_ecf,smear_coef_ecf 61 61 … … 102 102 Variable x 103 103 104 Variable inten,scale,rad,nu,len,contr,bkg,ii 104 Variable inten,scale,rad,nu,len,contr,bkg,ii,sldc,slds 105 105 scale = w[0] 106 106 rad = w[1] 107 107 nu = w[2] 108 108 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] 111 113 112 114 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 24 24 Make/O/D/n=(num) xwave_fleell,ywave_fleell 25 25 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)"} 28 28 Edit parameters_fleell,coef_fleell 29 29 … … 52 52 53 53 // 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","Contour Length (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)"} 56 56 Edit smear_parameters_fleell,smear_coef_fleell //display parameters in a table 57 57 … … 102 102 //ww[3] = rad [A] cross-sectional radius 103 103 //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 107 108 108 109 scale = ww[0] … … 111 112 rad = ww[3] 112 113 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 115 119 qr = x*rad //used for cross section contribution only 116 120 -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/NewModels_2006/FlexCyl_PolyLen.ipf
r166 r236 17 17 Make/O/D/n=(num) xwave_flepl,ywave_flepl 18 18 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)"} 21 21 Edit parameters_flepl,coef_flepl 22 22 … … 45 45 46 46 // 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#448 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)"} 49 49 Edit smear_parameters_flepl,smear_coef_flepl //display parameters in a table 50 50 … … 99 99 Variable x 100 100 101 Variable scale,radius,pd,delrho,bkg,zz,length,lb 101 Variable scale,radius,pd,delrho,bkg,zz,length,lb,sldc,slds 102 102 scale = w[0] 103 103 length = w[1] … … 105 105 lb = w[3] 106 106 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 109 112 110 113 zz = (1/pd)^2-1 … … 157 160 do 158 161 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) 160 163 summ = yyy + summ 161 164 ii+=1 … … 183 186 End //End of function PolyLenExclVolCyl(w,x) 184 187 185 Function fle_kernel(qw,rad,len_avg,lb,zz, delrho,len_i)186 Variable qw,rad,len_avg,lb,zz, delrho,len_i188 Function fle_kernel(qw,rad,len_avg,lb,zz,sldc,slds,len_i) 189 Variable qw,rad,len_avg,lb,zz,sldc,slds,len_i 187 190 188 191 //ww[0] = scale … … 190 193 //ww[2] = B [A] 191 194 //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] 194 198 Variable Pq,vcyl,dl 195 Make/O/n= 6fle_ker199 Make/O/n=7 fle_ker 196 200 Wave kp = fle_ker 197 201 kp[0] = 1 //scale fixed at 1 … … 199 203 kp[2] = lb 200 204 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 203 208 204 209 #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 15 15 Make/O/D/n=(num) xwave_fcpr,ywave_fcpr 16 16 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)"} 19 19 Edit parameters_fcpr,coef_fcpr 20 20 … … 43 43 44 44 // 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)"} 47 47 Edit smear_parameters_fcpr,smear_coef_fcpr 48 48 … … 94 94 //[3] radius (A) 95 95 //[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 99 100 scale = w[0] 100 101 Lc = w[1] … … 102 103 radius = w[3] 103 104 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 107 110 zz = (1/pd)^2-1 108 111 // … … 165 168 // Using 5 Gauss points 166 169 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) 168 171 summ = yyy + summ 169 172 ii+=1 … … 191 194 End //End of function PolyRadCylForm() 192 195 193 Function fle_rad_kernel(qw,ravg,Lc,Lb,zz, delrho,rad)194 Variable qw,ravg,Lc,Lb,zz, delrho,rad196 Function fle_rad_kernel(qw,ravg,Lc,Lb,zz,sldc,slds,rad) 197 Variable qw,ravg,Lc,Lb,zz,sldc,slds,rad 195 198 196 199 Variable Pq,vcyl,dr … … 198 201 //calculate the orientationally averaged P(q) for the input rad 199 202 //this is correct - see K&C (1983) or Lin &Tsao JACryst (1996)29 170. 200 Make/O/n= 6kernpar203 Make/O/n=7 kernpar 201 204 Wave kp = kernpar 202 205 kp[0] = 1 //scale fixed at 1 … … 204 207 kp[2] = Lb 205 208 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 208 212 209 213 #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 27 27 Make/O/D/n=(num) xwave_fle,ywave_fle 28 28 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)"} 31 31 Edit parameters_fle,coef_fle 32 32 … … 56 56 57 57 // 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","Contour Length (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)"} 60 60 Edit smear_parameters_fle,smear_coef_fle 61 61 … … 103 103 //ww[2] = B [A] 104 104 //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 108 109 109 110 scale = ww[0] … … 111 112 B = ww[2] 112 113 rad = ww[3] 113 cont = ww[4] 114 bkg = ww[5] 114 sldc = ww[4] 115 slds = ww[5] 116 bkg = ww[6] 115 117 qr = x*rad //used for cross section contribution only 118 119 cont = sldc-slds 116 120 117 121 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 103 103 104 104 //temp set scale=1 and bkg=0 for quadrature calc 105 Make/O/D/N= 4sphere_temp105 Make/O/D/N=5 sphere_temp 106 106 sphere_temp[0] = 1 107 107 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 110 111 111 112 //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 29 29 Make/O/D/n=(num) xwave_LamellarFF, ywave_LamellarFF 30 30 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#232 make/o/t parameters_LamellarFF = {"Scale","Bilayer Thick (delta) (A)","polydisp of thickness"," contrast (A^-2)","Incoherent Bgd (cm-1)"} //CH#331 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 33 33 Edit parameters_LamellarFF, coef_LamellarFF 34 34 ModifyTable width(parameters_LamellarFF)=160 … … 60 60 61 61 // Setup parameter table for model function 62 Make/O/D smear_coef_LamellarFF = {1,50,0.15, 6e-6,0} //CH#463 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)"} 64 64 Edit smear_parameters_LamellarFF,smear_coef_LamellarFF //display parameters in a table 65 65 … … 112 112 //[1]Bilay Thick (delta) 113 113 //[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) 116 117 117 118 // 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 119 120 scale = w[0] 120 121 del = w[1] 121 122 sig = w[2]*del 122 contr = w[3] 123 bkg = w[4] 123 sldb = w[3] 124 slds = w[4] 125 bkg = w[5] 124 126 127 contr = sldb - slds 125 128 // local variables 126 129 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 59 59 Make/O/D/n=(num) xwave_LamellarPS, ywave_LamellarPS 60 60 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#262 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#361 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 63 63 Edit parameters_LamellarPS, coef_LamellarPS 64 64 ModifyTable width(parameters_LamellarPS)=160 … … 75 75 Duplicate/O coef_LamellarPS epsilon_LamellarPS 76 76 epsilon_LamellarPS = 1e-4 77 epsilon_LamellarPS[ 5] = 1 //to make the derivative useful77 epsilon_LamellarPS[6] = 1 //to make the derivative useful 78 78 AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2) 79 79 … … 150 150 151 151 // 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 153 153 scale = w[0] 154 154 dd = w[1] 155 155 del = w[2] 156 156 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] 161 163 162 164 // local variables -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/NewModels_2006/LogNormalSphere.ipf
r169 r236 108 108 sphere_temp[0] = 1 109 109 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 112 113 113 114 //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 35 35 Make/O/D/n=(num) xwave_Parallelepiped, ywave_Parallelepiped 36 36 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#238 make/o/t parameters_Parallelepiped = {"Scale Factor","Shortest Edge A ()","B ()","Longest Edge C ()"," Contrast (^-2)","Incoherent Bgd (cm-1)"} //CH#337 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 39 39 Edit parameters_Parallelepiped, coef_Parallelepiped 40 40 … … 65 65 66 66 // Setup parameter table for model function 67 Make/O/D smear_coef_Parallelepiped = {1,35,75,400, 6e-6,0} //CH#468 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)"} 69 69 Edit smear_parameters_Parallelepiped,smear_coef_Parallelepiped //display parameters in a table 70 70 … … 117 117 //[5] incoherent background (cm^-1) 118 118 // 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 120 120 scale = w[0] 121 121 aa = w[1] 122 122 bb = w[2] 123 123 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 127 129 // mu = bb*x //scale in terms of B 128 130 // 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 31 31 Make/O/D/n=(num) xwave_triax, ywave_triax 32 32 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#234 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#333 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 35 35 Edit parameters_triax, coef_triax 36 36 … … 62 62 63 63 // Setup parameter table for model function 64 Make/O/D smear_coef_triax = {1,35,100,400, 6e-6,0} //CH#465 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)"} 66 66 Edit smear_parameters_triax,smear_coef_triax //display parameters in a table 67 67 … … 112 112 //[2] semi-axis B (A) 113 113 //[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) 116 117 // 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 118 119 scale = w[0] 119 120 aa = w[1] 120 121 bb = w[2] 121 122 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 124 128 125 129 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 20 20 Make/O/D/n=(num) xwave_OEF_HS,ywave_OEF_HS 21 21 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)"} 24 24 Edit parameters_OEF_HS,coef_OEF_HS 25 25 … … 49 49 50 50 // 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)"} 53 53 Edit smear_parameters_OEF_HS,smear_coef_OEF_HS 54 54 … … 81 81 82 82 //setup form factor coefficient wave 83 Make/O/D/N= 8form_OEF_HS83 Make/O/D/N=9 form_OEF_HS 84 84 form_OEF_HS[0] = 1 85 85 form_OEF_HS[1] = w[1] … … 89 89 form_OEF_HS[5] = w[5] 90 90 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 92 93 93 94 //setup structure factor coefficient wave … … 102 103 yw = temp_OEF_HS_PQ * temp_OEF_HS_SQ 103 104 yw *= w[0] 104 yw += w[ 7]105 yw += w[8] 105 106 106 107 //cleanup waves … … 118 119 Make/O/D/n=(num) xwave_OEF_SW,ywave_OEF_SW 119 120 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)"} 122 123 Edit parameters_OEF_SW,coef_OEF_SW 123 124 … … 147 148 148 149 // 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)"} 151 152 Edit smear_parameters_OEF_SW,smear_coef_OEF_SW 152 153 … … 179 180 180 181 //setup form factor coefficient wave 181 Make/O/D/N= 8form_OEF_SW182 Make/O/D/N=9 form_OEF_SW 182 183 form_OEF_SW[0] = 1 183 184 form_OEF_SW[1] = w[1] … … 187 188 form_OEF_SW[5] = w[5] 188 189 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 190 192 191 193 //setup structure factor coefficient wave … … 193 195 struct_OEF_SW[0] = 0.5*DiamEllip(Ras,Rbs) 194 196 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] 197 199 198 200 //calculate each and combine … … 202 204 yw = temp_OEF_SW_PQ * temp_OEF_SW_SQ 203 205 yw *= w[0] 204 yw += w[ 9]206 yw += w[10] 205 207 206 208 //cleanup waves … … 223 225 Make/O/D/n=(num) xwave_OEF_SC,ywave_OEF_SC 224 226 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)"} 227 229 Edit parameters_OEF_SC,coef_OEF_SC 228 230 … … 257 259 258 260 // 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)"} 261 263 Edit smear_parameters_OEF_SC,smear_coef_OEF_SC 262 264 … … 289 291 290 292 //setup form factor coefficient wave 291 Make/O/D/N= 8form_OEF_SC293 Make/O/D/N=9 form_OEF_SC 292 294 form_OEF_SC[0] = 1 293 295 form_OEF_SC[1] = w[1] … … 297 299 form_OEF_SC[5] = w[5] 298 300 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 300 303 301 304 //setup structure factor coefficient wave 302 305 Make/O/D/N=6 struct_OEF_SC 303 306 struct_OEF_SC[0] = DiamEllip(Ras,Rbs) 304 struct_OEF_SC[1] = w[ 7]307 struct_OEF_SC[1] = w[8] 305 308 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[1 0]309 struct_OEF_SC[3] = w[10] 310 struct_OEF_SC[4] = w[9] 311 struct_OEF_SC[5] = w[11] 309 312 310 313 //calculate each and combine … … 314 317 yw = temp_OEF_SC_PQ * temp_OEF_SC_SQ 315 318 yw *= w[0] 316 yw += w[1 1]319 yw += w[12] 317 320 318 321 //cleanup waves … … 331 334 Make/O/D/n=(num) xwave_OEF_SHS,ywave_OEF_SHS 332 335 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)"} 335 338 Edit parameters_OEF_SHS,coef_OEF_SHS 336 339 … … 360 363 361 364 // 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)"} 364 367 Edit smear_parameters_OEF_SHS,smear_coef_OEF_SHS 365 368 … … 392 395 393 396 //setup form factor coefficient wave 394 Make/O/D/N= 8form_OEF_SHS397 Make/O/D/N=9 form_OEF_SHS 395 398 form_OEF_SHS[0] = 1 396 399 form_OEF_SHS[1] = w[1] … … 400 403 form_OEF_SHS[5] = w[5] 401 404 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 403 407 404 408 //setup structure factor coefficient wave … … 406 410 struct_OEF_SHS[0] = 0.5*DiamEllip(Ras,Rbs) 407 411 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] 410 414 411 415 //calculate each and combine … … 415 419 yw = temp_OEF_SHS_PQ * temp_OEF_SHS_SQ 416 420 yw *= w[0] 417 yw += w[ 9]421 yw += w[10] 418 422 419 423 //cleanup waves -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/OblateForm.ipf
r166 r236 20 20 Make/O/D/n=(num) xwave_oef,ywave_oef 21 21 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)"} 24 24 Edit parameters_oef,coef_oef 25 25 Variable/G root:g_oef … … 49 49 50 50 // 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)"} 53 53 Edit smear_parameters_oef,smear_coef_oef 54 54 … … 97 97 //[3] trmaj, overall major radius 98 98 //[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 103 104 scale = w[0] 104 105 crmaj = w[1] … … 106 107 trmaj = w[3] 107 108 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 112 117 // local variables 113 118 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 250 250 if(V_Flag == 1) 251 251 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 253 253 ErrorBars $w1 Y,wave=($w2,$w2) 254 254 ModifyGraph tickUnit(left)=1 … … 256 256 //new graph 257 257 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 259 259 ModifyGraph grid=1,mirror=2,standoff=0 260 260 ErrorBars $w1 Y,wave=($w2,$w2) … … 265 265 // graph window was not target, make new one 266 266 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 268 268 ModifyGraph grid=1,mirror=2,standoff=0 269 269 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 21 21 Make/O/D/n=(num) xwave_phs,ywave_phs 22 22 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)"} 25 25 Edit parameters_phs,coef_phs 26 26 Variable/G root:g_phs … … 50 50 51 51 // 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)"} 54 54 Edit smear_parameters_phs,smear_coef_phs 55 55 … … 111 111 112 112 //* reassign names to the variable set */ 113 Variable rad,z2,phi,cont,bkg,sigma 113 Variable rad,z2,phi,cont,bkg,sigma,sld,slds 114 114 115 115 rad = w[0] // radius (A) … … 117 117 z2 = w[1] //polydispersity (0<z2<1) 118 118 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) 121 123 122 124 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 19 19 Make/O/D/n=(num) xwave_RECT_HS,ywave_RECT_HS 20 20 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)"} 23 23 Edit/K=1 parameters_RECT_HS,coef_RECT_HS 24 24 … … 48 48 49 49 // 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)"} 52 52 Edit smear_parameters_RECT_HS,smear_coef_RECT_HS 53 53 … … 78 78 79 79 //setup form factor coefficient wave 80 Make/O/D/N= 5form_RECT_HS80 Make/O/D/N=6 form_RECT_HS 81 81 form_RECT_HS[0] = 1 82 82 form_RECT_HS[1] = w[1] 83 83 form_RECT_HS[2] = w[2] 84 84 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 86 87 87 88 //calculate the diameter of the effective one-component sphere … … 105 106 yw = temp_RECT_HS_PQ * temp_RECT_HS_SQ 106 107 yw *= w[0] 107 yw += w[ 4]108 yw += w[5] 108 109 109 110 //cleanup waves … … 122 123 Make/O/D/n=(num) xwave_RECT_SW,ywave_RECT_SW 123 124 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)"} 126 127 Edit/K=1 parameters_RECT_SW,coef_RECT_SW 127 128 … … 151 152 152 153 // 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)"} 155 156 Edit smear_parameters_RECT_SW,smear_coef_RECT_SW 156 157 … … 181 182 182 183 //setup form factor coefficient wave 183 Make/O/D/N= 5form_RECT_SW184 Make/O/D/N=6 form_RECT_SW 184 185 form_RECT_SW[0] = 1 185 186 form_RECT_SW[1] = w[1] 186 187 form_RECT_SW[2] = w[2] 187 188 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 189 191 190 192 //calculate the diameter of the effective one-component sphere … … 201 203 struct_RECT_SW[0] = diam/2 202 204 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] 205 207 206 208 //calculate each and combine … … 210 212 yw = temp_RECT_SW_PQ * temp_RECT_SW_SQ 211 213 yw *= w[0] 212 yw += w[ 6]214 yw += w[7] 213 215 214 216 //cleanup waves … … 233 235 Make/O/D/n=(num) xwave_RECT_SC,ywave_RECT_SC 234 236 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)"} 237 239 Edit/K=1 parameters_RECT_SC,coef_RECT_SC 238 240 … … 267 269 268 270 // 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)"} 271 273 Edit smear_parameters_RECT_SC,smear_coef_RECT_SC 272 274 … … 297 299 298 300 //setup form factor coefficient wave 299 Make/O/D/N= 5form_RECT_SC301 Make/O/D/N=6 form_RECT_SC 300 302 form_RECT_SC[0] = 1 301 303 form_RECT_SC[1] = w[1] 302 304 form_RECT_SC[2] = w[2] 303 305 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 305 308 306 309 //calculate the diameter of the effective one-component sphere … … 316 319 Make/O/D/N=6 struct_RECT_SC 317 320 struct_RECT_SC[0] = diam 318 struct_RECT_SC[1] = w[ 4]321 struct_RECT_SC[1] = w[5] 319 322 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] 323 326 324 327 //calculate each and combine … … 328 331 yw = temp_RECT_SC_PQ * temp_RECT_SC_SQ 329 332 yw *= w[0] 330 yw += w[ 8]333 yw += w[9] 331 334 332 335 //cleanup waves … … 345 348 Make/O/D/n=(num) xwave_RECT_SHS,ywave_RECT_SHS 346 349 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)"} 349 352 Edit/K=1 parameters_RECT_SHS,coef_RECT_SHS 350 353 … … 374 377 375 378 // 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)"} 378 381 Edit smear_parameters_RECT_SHS,smear_coef_RECT_SHS 379 382 … … 404 407 405 408 //setup form factor coefficient wave 406 Make/O/D/N= 5form_RECT_SHS409 Make/O/D/N=6 form_RECT_SHS 407 410 form_RECT_SHS[0] = 1 408 411 form_RECT_SHS[1] = w[1] 409 412 form_RECT_SHS[2] = w[2] 410 413 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 412 416 413 417 //calculate the diameter of the effective one-component sphere … … 424 428 struct_RECT_SHS[0] = diam/2 425 429 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] 428 432 429 433 //calculate each and combine … … 433 437 yw = temp_RECT_SHS_PQ * temp_RECT_SHS_SQ 434 438 yw *= w[0] 435 yw += w[ 6]439 yw += w[7] 436 440 437 441 //cleanup waves -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/ProlateCS_and_Struct.ipf
r166 r236 19 19 Make/O/D/n=(num) xwave_PEF_HS,ywave_PEF_HS 20 20 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)"} 23 23 Edit parameters_PEF_HS,coef_PEF_HS 24 24 … … 48 48 49 49 // 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)"} 52 52 Edit smear_parameters_PEF_HS,smear_coef_PEF_HS 53 53 … … 80 80 81 81 //setup form factor coefficient wave 82 Make/O/D/N= 8form_PEF_HS82 Make/O/D/N=9 form_PEF_HS 83 83 form_PEF_HS[0] = 1 84 84 form_PEF_HS[1] = w[1] … … 88 88 form_PEF_HS[5] = w[5] 89 89 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 91 92 92 93 //setup structure factor coefficient wave … … 101 102 yw = temp_PEF_HS_PQ *temp_PEF_HS_SQ 102 103 yw *= w[0] 103 yw += w[ 7]104 yw += w[8] 104 105 105 106 //cleanup waves … … 117 118 Make/O/D/n=(num) xwave_PEF_SW,ywave_PEF_SW 118 119 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)"} 121 122 Edit parameters_PEF_SW,coef_PEF_SW 122 123 … … 146 147 147 148 // 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)"} 150 151 Edit smear_parameters_PEF_SW,smear_coef_PEF_SW 151 152 … … 178 179 179 180 //setup form factor coefficient wave 180 Make/O/D/N= 8form_PEF_SW181 Make/O/D/N=9 form_PEF_SW 181 182 form_PEF_SW[0] = 1 182 183 form_PEF_SW[1] = w[1] … … 186 187 form_PEF_SW[5] = w[5] 187 188 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 189 191 190 192 //setup structure factor coefficient wave … … 192 194 struct_PEF_SW[0] = 0.5*DiamEllip(Ras,Rbs) 193 195 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] 196 198 197 199 //calculate each and combine … … 201 203 yw = temp_PEF_SW_PQ * temp_PEF_SW_SQ 202 204 yw *= w[0] 203 yw += w[ 9]205 yw += w[10] 204 206 205 207 //cleanup waves … … 222 224 Make/O/D/n=(num) xwave_PEF_SC,ywave_PEF_SC 223 225 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)"} 226 228 Edit parameters_PEF_SC,coef_PEF_SC 227 229 … … 256 258 257 259 // 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)"} 260 262 Edit smear_parameters_PEF_SC,smear_coef_PEF_SC 261 263 … … 288 290 289 291 //setup form factor coefficient wave 290 Make/O/D/N= 8form_PEF_SC292 Make/O/D/N=9 form_PEF_SC 291 293 form_PEF_SC[0] = 1 292 294 form_PEF_SC[1] = w[1] … … 296 298 form_PEF_SC[5] = w[5] 297 299 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 299 302 300 303 //setup structure factor coefficient wave 301 304 Make/O/D/N=6 struct_PEF_SC 302 305 struct_PEF_SC[0] = DiamEllip(Ras,Rbs) 303 struct_PEF_SC[1] = w[ 7]306 struct_PEF_SC[1] = w[8] 304 307 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[1 0]308 struct_PEF_SC[3] = w[10] 309 struct_PEF_SC[4] = w[9] 310 struct_PEF_SC[5] = w[11] 308 311 309 312 //calculate each and combine … … 313 316 yw = temp_PEF_SC_PQ * temp_PEF_SC_SQ 314 317 yw *= w[0] 315 yw += w[1 1]318 yw += w[12] 316 319 317 320 //cleanup waves … … 330 333 Make/O/D/n=(num) xwave_PEF_SHS,ywave_PEF_SHS 331 334 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)"} 334 337 Edit parameters_PEF_SHS,coef_PEF_SHS 335 338 … … 359 362 360 363 // 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)"} 363 366 Edit smear_parameters_PEF_SHS,smear_coef_PEF_SHS 364 367 … … 391 394 392 395 //setup form factor coefficient wave 393 Make/O/D/N= 8form_PEF_SHS396 Make/O/D/N=9 form_PEF_SHS 394 397 form_PEF_SHS[0] = 1 395 398 form_PEF_SHS[1] = w[1] … … 399 402 form_PEF_SHS[5] = w[5] 400 403 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 402 406 403 407 //setup structure factor coefficient wave … … 405 409 struct_PEF_SHS[0] = 0.5*DiamEllip(Ras,Rbs) 406 410 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] 409 413 410 414 //calculate each and combine … … 414 418 yw = temp_PEF_SHS_PQ * temp_PEF_SHS_SQ 415 419 yw *= w[0] 416 yw += w[ 9]420 yw += w[10] 417 421 418 422 //cleanup waves -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/ProlateForm.ipf
r166 r236 19 19 Make/O/D/n=(num) xwave_pef,ywave_pef 20 20 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)"} 23 23 Edit parameters_pef,coef_pef 24 24 Variable/G root:g_pef … … 48 48 49 49 // 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)"} 52 52 Edit smear_parameters_pef,smear_coef_pef 53 53 … … 95 95 //[3] trmaj, overall major radius 96 96 //[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 101 102 scale = w[0] 102 103 crmaj = w[1] … … 104 105 trmaj = w[3] 105 106 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 110 114 // local variables 111 115 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 21 21 Make/O/D/n=(num) xwave_rect,ywave_rect 22 22 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)"} 25 25 Edit parameters_rect,coef_rect 26 26 Variable/G root:g_rect … … 52 52 53 53 // 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)"} 56 56 Edit smear_parameters_rect,smear_coef_rect 57 57 … … 94 94 95 95 //* reassign names to the variable set */ 96 Variable scale,rad,pd,cont,bkg 96 Variable scale,rad,pd,cont,bkg,sld,slds 97 97 98 98 scale = w[0] 99 99 rad = w[1] // radius (A) 100 100 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 104 106 // local variables 105 107 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 20 20 Make/O/D/n=(num) xwave_sf,ywave_sf 21 21 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)"} 24 24 Edit parameters_sf,coef_sf 25 25 Variable/G root:g_sf=0 … … 48 48 49 49 // 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)"} 52 52 Edit smear_parameters_sf,smear_coef_sf 53 53 … … 93 93 //[0] scale 94 94 //[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 99 100 scale = w[0] 100 101 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 104 107 // calculates scale * f^2/Vol where f=Vol*3*delrho*((sin(qr)-qrcos(qr))/qr^3 105 108 // 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 20 20 Make/O/D/n=(num) xwave_S_HS,ywave_S_HS 21 21 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)"} 24 24 Edit/K=1 parameters_S_HS,coef_S_HS 25 25 Variable/G root:g_S_HS … … 49 49 50 50 // 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)"} 53 53 Edit smear_parameters_S_HS,smear_coef_S_HS 54 54 … … 78 78 79 79 //setup form factor coefficient wave 80 Make/O/D/N= 4form_S_HS80 Make/O/D/N=5 form_S_HS 81 81 form_S_HS[0] = 1 82 82 form_S_HS[1] = w[1] 83 83 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 85 86 86 87 //setup structure factor coefficient wave … … 95 96 yw = temp_S_HS_PQ * temp_S_HS_SQ 96 97 yw *= w[0] 97 yw += w[ 3]98 yw += w[4] 98 99 99 100 //cleanup waves … … 116 117 Make/O/D/n=(num) xwave_S_SW,ywave_S_SW 117 118 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)"} 120 121 Edit/K=1 parameters_S_SW,coef_S_SW 121 122 Variable/G root:g_S_SW … … 144 145 145 146 // 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)"} 148 149 Edit smear_parameters_S_SW,smear_coef_S_SW 149 150 … … 173 174 174 175 //setup form factor coefficient wave 175 Make/O/D/N= 4form_S_SW176 Make/O/D/N=5 form_S_SW 176 177 form_S_SW[0] = 1 177 178 form_S_SW[1] = w[1] 178 179 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 180 182 181 183 //setup structure factor coefficient wave … … 183 185 struct_S_SW[0] = w[1] 184 186 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] 187 189 188 190 //calculate each and combine … … 192 194 yw = temp_S_SW_PQ * temp_S_SW_SQ 193 195 yw *= w[0] 194 yw += w[ 5]196 yw += w[6] 195 197 196 198 //cleanup waves … … 215 217 Make/O/D/n=(num) xwave_S_SC,ywave_S_SC 216 218 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)"} 219 221 Edit/K=1 parameters_S_SC,coef_S_SC 220 222 Variable/G root:g_S_SC … … 249 251 250 252 // 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)"} 253 255 Edit smear_parameters_S_SC,smear_coef_S_SC 254 256 … … 278 280 279 281 //setup form factor coefficient wave 280 Make/O/D/N= 4form_S_SC282 Make/O/D/N=5 form_S_SC 281 283 form_S_SC[0] = 1 282 284 form_S_SC[1] = w[1] 283 285 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 285 288 286 289 //setup structure factor coefficient wave 287 290 Make/O/D/N=6 struct_S_SC 288 291 struct_S_SC[0] = 2*w[1] //diameter 289 struct_S_SC[1] = w[ 3]292 struct_S_SC[1] = w[4] 290 293 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] 294 297 295 298 //calculate each and combine … … 299 302 yw = temp_S_SC_PQ * temp_S_SC_SQ 300 303 yw *= w[0] 301 yw += w[ 7]304 yw += w[8] 302 305 303 306 //cleanup waves … … 319 322 Make/O/D/n=(num) xwave_S_SHS,ywave_S_SHS 320 323 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)"} 323 326 Edit/K=1 parameters_S_SHS,coef_S_SHS 324 327 Variable/G root:g_S_SHS … … 348 351 349 352 // 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)"} 352 355 Edit smear_parameters_S_SHS,smear_coef_S_SHS 353 356 … … 377 380 378 381 //setup form factor coefficient wave 379 Make/O/D/N= 4form_S_SHS382 Make/O/D/N=5 form_S_SHS 380 383 form_S_SHS[0] = 1 381 384 form_S_SHS[1] = w[1] 382 385 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 384 388 385 389 //setup structure factor coefficient wave … … 387 391 struct_S_SHS[0] = w[1] 388 392 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] 391 395 392 396 //calculate each and combine … … 396 400 yw = temp_S_SHS_PQ * temp_S_SHS_SQ 397 401 yw *= w[0] 398 yw += w[ 5]402 yw += w[6] 399 403 400 404 //cleanup waves -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/UnifEllipsoid_and_Struct.ipf
r166 r236 20 20 Make/O/D/n=(num) xwave_EOR_HS,ywave_EOR_HS 21 21 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)"} 24 24 Edit parameters_EOR_HS,coef_EOR_HS 25 25 … … 48 48 49 49 // 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)"} 52 52 Edit smear_parameters_EOR_HS,smear_coef_EOR_HS 53 53 … … 81 81 82 82 //setup form factor coefficient wave 83 Make/O/D/N= 5form_EOR_HS83 Make/O/D/N=6 form_EOR_HS 84 84 form_EOR_HS[0] = 1 85 85 form_EOR_HS[1] = w[1] 86 86 form_EOR_HS[2] = w[2] 87 87 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 89 90 90 91 //setup structure factor coefficient wave … … 99 100 yw = temp_EOR_HS_PQ * temp_EOR_HS_SQ 100 101 yw *= w[0] 101 yw += w[ 4]102 yw += w[5] 102 103 103 104 //cleanup waves … … 115 116 Make/O/D/n=(num) xwave_EOR_SW,ywave_EOR_SW 116 117 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)"} 119 120 Edit parameters_EOR_SW,coef_EOR_SW 120 121 … … 144 145 145 146 // 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)"} 148 149 Edit smear_parameters_EOR_SW,smear_coef_EOR_SW 149 150 … … 176 177 177 178 //setup form factor coefficient wave 178 Make/O/D/N= 5form_EOR_SW179 Make/O/D/N=6 form_EOR_SW 179 180 form_EOR_SW[0] = 1 180 181 form_EOR_SW[1] = w[1] 181 182 form_EOR_SW[2] = w[2] 182 183 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 184 186 185 187 //setup structure factor coefficient wave … … 187 189 struct_EOR_SW[0] = 0.5*DiamEllip(aa,bb) 188 190 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] 191 193 192 194 //calculate each and combine … … 196 198 yw = temp_EOR_SW_PQ * temp_EOR_SW_SQ 197 199 yw *= w[0] 198 yw += w[ 6]200 yw += w[7] 199 201 200 202 //cleanup waves … … 217 219 Make/O/D/n=(num) xwave_EOR_SC,ywave_EOR_SC 218 220 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)"} 221 223 Edit parameters_EOR_SC,coef_EOR_SC 222 224 … … 251 253 252 254 // 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)"} 255 257 Edit smear_parameters_EOR_SC,smear_coef_EOR_SC 256 258 … … 283 285 284 286 //setup form factor coefficient wave 285 Make/O/D/N= 5form_EOR_SC287 Make/O/D/N=6 form_EOR_SC 286 288 form_EOR_SC[0] = 1 287 289 form_EOR_SC[1] = w[1] 288 290 form_EOR_SC[2] = w[2] 289 291 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 291 294 292 295 //setup structure factor coefficient wave 293 296 Make/O/D/N=6 struct_EOR_SC 294 297 struct_EOR_SC[0] = DiamEllip(aa,bb) 295 struct_EOR_SC[1] = w[ 4]298 struct_EOR_SC[1] = w[5] 296 299 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] 300 303 301 304 //calculate each and combine … … 305 308 yw = temp_EOR_SC_PQ * temp_EOR_SC_SQ 306 309 yw *= w[0] 307 yw += w[ 8]310 yw += w[9] 308 311 309 312 //cleanup waves … … 321 324 Make/O/D/n=(num) xwave_EOR_SHS,ywave_EOR_SHS 322 325 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)"} 325 328 Edit parameters_EOR_SHS,coef_EOR_SHS 326 329 … … 350 353 351 354 // 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)"} 354 357 Edit smear_parameters_EOR_SHS,smear_coef_EOR_SHS 355 358 … … 382 385 383 386 //setup form factor coefficient wave 384 Make/O/D/N= 5form_EOR_SHS387 Make/O/D/N=6 form_EOR_SHS 385 388 form_EOR_SHS[0] = 1 386 389 form_EOR_SHS[1] = w[1] 387 390 form_EOR_SHS[2] = w[2] 388 391 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 390 394 391 395 //setup structure factor coefficient wave … … 393 397 struct_EOR_SHS[0] = 0.5*DiamEllip(aa,bb) 394 398 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] 397 401 398 402 //calculate each and combine … … 402 406 yw = temp_EOR_SHS_PQ *temp_EOR_SHS_SQ 403 407 yw *= w[0] 404 yw += w[ 6]408 yw += w[7] 405 409 406 410 //cleanup waves -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/UniformEllipsoid.ipf
r166 r236 19 19 Make/O/D/n=(num) xwave_eor,ywave_eor 20 20 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)"} 23 23 Edit parameters_eor,coef_eor 24 24 Variable/G root:g_eor … … 48 48 49 49 // 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)"} 52 52 Edit smear_parameters_eor,smear_coef_eor 53 53 … … 93 93 //[1] Axis of rotation 94 94 //[2] two equal radii 95 //[3] contrast (A^-2) 95 //[3] sld ellipsoid 96 //[3] sld solvent (A^-2) 96 97 //[4] background (cm^-1) 97 Variable scale, ra,vra,delrho,bkg 98 Variable scale, ra,vra,delrho,bkg,slde,slds 98 99 scale = w[0] 99 100 vra = w[1] 100 101 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 103 108 //if vra < ra, OBLATE 104 109 //if vra > ra, PROLATE
Note: See TracChangeset
for help on using the changeset viewer.