Changeset d3ffeb7 in sasmodels
- Timestamp:
- Aug 20, 2018 11:16:06 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:
- d32de68
- Parents:
- bad3093
- Location:
- sasmodels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/product.py
r6d90684 rd3ffeb7 37 37 ER_ID = "radius_effective" 38 38 VF_ID = "volfraction" 39 BETA_DEFINITION = ("beta_mode", "", 0, [["P*S"],["P*(1+beta*(S-1))"]], "",39 BETA_DEFINITION = ("beta_mode", ["P*S", "P*(1+beta*(S-1))"], 0, (None, None), "", 40 40 "Structure factor dispersion calculation mode") 41 41 … … 294 294 # } 295 295 #lazy_pars = s_result, F1, F2, combined_scale 296 self.results = [F2*volfrac/volume_avg, s_result] 296 297 # self.results = [F2*volfrac/volume_avg, s_result] 297 298 final_result = combined_scale*(F2 + (F1**2)*(s_result - 1)) + background 299 300 # TODO: 1. include calculated Q vector 301 # TODO: 2. consider implications if there are intermediate results in P(Q) 302 # def lazy(F1, F2, S, scale, bg): 303 def lazy(F1, F2, S, scale): 304 return { 305 "P(Q)": lambda: scale*F2, 306 "S(Q)": lambda: S, 307 "beta(Q)": lambda: F1**2 / F2, 308 "S_eff(Q)": lambda: 1 + (F1**2 / F2)*(S-1), 309 # "I(Q)": lambda: scale*(F2 + (F1**2)*(S-1)) + bg, 310 } 311 312 self.results = lazy(F1, F2, s_result, volfrac/volume_avg) 313 298 314 else: 299 315 p_result = self.p_kernel.Iq(p_details, p_values, cutoff, magnetic) 300 316 # remember the parts for plotting later 301 self.results = [p_result, s_result]317 # self.results = [p_result, s_result] 302 318 final_result = scale*(p_result*s_result) + background 319 320 def lazy(P, S): 321 return { 322 "P(Q)": lambda: P, 323 "S(Q)": lambda: S, 324 } 325 326 self.results = lazy(p_result, s_result) 303 327 304 328 #call_details.show(values) -
sasmodels/sasview_model.py
rd533590 rd3ffeb7 381 381 continue 382 382 self.params[p.name] = p.default 383 self.details[p.id] = [p.units , p.limits[0], p.limits[1]]383 self.details[p.id] = [p.units if not p.choices else p.choices, p.limits[0], p.limits[1]] 384 384 if p.polydisperse: 385 385 self.details[p.id+".width"] = [
Note: See TracChangeset
for help on using the changeset viewer.