- Timestamp:
- Jul 6, 2018 10:49:00 AM (6 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 9f2216f
- Parents:
- 0076d6e
- Location:
- explore/beta
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
explore/beta/sasfit_compare.py
r0076d6e re262dd6 222 222 if radius_effective is None: 223 223 radius_effective = radius_eff/total_weight 224 SQ = hardsphere_simple(q, radius_effective, volfraction)225 224 if norm == 'sasfit': 226 beta = F1**2/F2227 SQ_EFF = 1 + beta*(SQ - 1)228 225 IQD = F2 229 IQSD = IQD*SQ230 IQBD = IQD*SQ_EFF231 226 elif norm == 'sasview': 232 SQ_EFF = None233 227 # Note: internally, sasview uses F2/total_volume because: 234 228 # average_volume = total_volume/total_weight … … 237 231 # = F2/total_volume 238 232 IQD = F2/average_volume*1e-4*volfraction 239 IQSD = IQD*SQ240 IQBD = None241 233 elif norm == 'yun': 242 #F1 /= average_volume243 #F2 /= average_volume**2244 234 F1 *= 1e-6 # Yun is using sld in 1/A^2, not 1e-6/A^2 245 235 F2 *= 1e-12 246 beta = F1**2/F2247 SQ_EFF = 1 + beta*(SQ - 1)248 236 IQD = F2/average_volume*1e8*volfraction 249 IQSD = IQD*SQ 250 IQBD = IQD*SQ_EFF 237 SQ = hardsphere_simple(q, radius_effective, volfraction) 238 beta = F1**2/F2 239 SQ_EFF = 1 + beta*(SQ - 1) 240 IQSD = IQD*SQ 241 IQBD = IQD*SQ_EFF 251 242 return Theory(Q=q, F1=F1, F2=F2, P=IQD, S=SQ, I=IQSD, Seff=SQ_EFF, Ibeta=IQBD) 252 243 … … 279 270 if radius_effective is None: 280 271 radius_effective = radius 281 SQ = hardsphere_simple(q, radius_effective, volfraction)282 volume = 4./3.*pi*radius**3283 272 average_volume = total_volume/total_weight 284 273 if norm == 'sasfit': 285 beta = F1**2/F2286 SQ_EFF = 1 + beta*(SQ - 1)287 274 IQD = F2 288 IQSD = IQD*SQ289 IQBD = IQD*SQ_EFF290 275 elif norm == 'sasview': 291 SQ_EFF = None292 276 IQD = F2/average_volume*1e-4*volfraction 293 IQSD = IQD*SQ294 IQBD = None295 277 elif norm == 'yun': 296 # Note: yun uses gauss limits from R0/10 to R0 + 5 sigma steps sigma/100297 # With pd = 0.1, that's 14 sigma, or 1400 points.298 278 F1 *= 1e-6 # Yun is using sld in 1/A^2, not 1e-6/A^2 299 279 F2 *= 1e-12 300 beta = F1**2/F2301 SQ_EFF = 1 + beta*(SQ - 1)302 280 IQD = F2/average_volume*1e8*volfraction 303 IQSD = IQD*SQ 304 IQBD = IQD*SQ_EFF 281 SQ = hardsphere_simple(q, radius_effective, volfraction) 282 beta = F1**2/F2 283 SQ_EFF = 1 + beta*(SQ - 1) 284 IQSD = IQD*SQ 285 IQBD = IQD*SQ_EFF 305 286 return Theory(Q=q, F1=F1, F2=F2, P=IQD, S=SQ, I=IQSD, Seff=SQ_EFF, Ibeta=IQBD) 306 287 … … 454 435 455 436 def compare_yun_sphere_gauss(): 437 # Note: yun uses gauss limits from R0/10 to R0 + 5 sigma steps sigma/100 438 # With pd = 0.1, that's 14 sigma and 1400 points. 456 439 pars = { 457 440 'radius': 20, 'radius_pd': 0.1, 'radius_pd_type': 'gaussian',
Note: See TracChangeset
for help on using the changeset viewer.