Changeset be43e39 in sasmodels for sasmodels/compare.py
- Timestamp:
- Oct 19, 2018 3:49:12 PM (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:
- 31fc4ad
- Parents:
- e44432d (diff), 353e899 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/compare.py
rfb7c176 rbe43e39 367 367 368 368 # Limit magnetic SLDs to a smaller range, from zero to iron=5/A^2 369 if par.name. startswith('M0:'):369 if par.name.endswith('_M0'): 370 370 return np.random.uniform(0, 5) 371 371 … … 537 537 magnetic_pars = [] 538 538 for p in parameters.user_parameters(pars, is2d): 539 if any(p.id. startswith(x) for x in ('M0:', 'mtheta:', 'mphi:')):539 if any(p.id.endswith(x) for x in ('_M0', '_mtheta', '_mphi')): 540 540 continue 541 541 if p.id.startswith('up:'): … … 549 549 pdtype=pars.get(p.id+"_pd_type", 'gaussian'), 550 550 relative_pd=p.relative_pd, 551 M0=pars.get( 'M0:'+p.id, 0.),552 mphi=pars.get( 'mphi:'+p.id, 0.),553 mtheta=pars.get( 'mtheta:'+p.id, 0.),551 M0=pars.get(p.id+'_M0', 0.), 552 mphi=pars.get(p.id+'_mphi', 0.), 553 mtheta=pars.get(p.id+'_mtheta', 0.), 554 554 ) 555 555 lines.append(_format_par(p.name, **fields)) … … 617 617 if suppress: 618 618 for p in pars: 619 if p. startswith("M0:"):619 if p.endswith("_M0"): 620 620 pars[p] = 0 621 621 else: … … 623 623 first_mag = None 624 624 for p in pars: 625 if p. startswith("M0:"):625 if p.endswith("_M0"): 626 626 any_mag |= (pars[p] != 0) 627 627 if first_mag is None:
Note: See TracChangeset
for help on using the changeset viewer.