Changeset 4553dae in sasmodels for sasmodels/compare.py
- Timestamp:
- Aug 7, 2017 11:00:01 AM (7 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 92708d8
- Parents:
- 0f6c41c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/compare.py
r0f6c41c r4553dae 402 402 pars['phi_pd_n'] = 5 403 403 if np.random.rand() < 0.1: 404 pars['psi_pd_n'] = 5 404 if any(p.name == 'psi' for p in model_info.parameters.kernel_parameters): 405 #print("generating psi_pd_n") 406 pars['psi_pd_n'] = 5 405 407 406 408 ## Show selected polydispersity … … 543 545 """ 544 546 pars = pars.copy() 547 #print("pars=", pars) 545 548 if suppress: 546 549 for p in pars: … … 552 555 for p in pars: 553 556 if p.endswith("_pd_n"): 554 any_pd |= (pars[p] != 0 and pars[p[:-2]] != 0.) 557 pd = pars.get(p[:-2], 0.) 558 any_pd |= (pars[p] != 0 and pd != 0.) 555 559 if first_pd is None: 556 560 first_pd = p … … 558 562 if pars[first_pd] == 0: 559 563 pars[first_pd] = 35 560 if pars[first_pd[:-2]] == 0:564 if first_pd[:-2] not in pars or pars[first_pd[:-2]] == 0: 561 565 pars[first_pd[:-2]] = 0.15 562 566 return pars
Note: See TracChangeset
for help on using the changeset viewer.