Changeset 610ef23 in sasmodels for sasmodels/compare.py
- Timestamp:
- Oct 3, 2018 10:07:52 AM (5 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- e39202b, bd547d0
- Parents:
- a1ec908
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/compare.py
rbd7630d r610ef23 368 368 369 369 # Limit magnetic SLDs to a smaller range, from zero to iron=5/A^2 370 if par.name. startswith('M0:'):370 if par.name.endswith('_M0'): 371 371 return np.random.uniform(0, 5) 372 372 … … 538 538 magnetic_pars = [] 539 539 for p in parameters.user_parameters(pars, is2d): 540 if any(p.id. startswith(x) for x in ('M0:', 'mtheta:', 'mphi:')):540 if any(p.id.endswith(x) for x in ('_M0', '_mtheta', '_mphi')): 541 541 continue 542 542 if p.id.startswith('up:'): … … 550 550 pdtype=pars.get(p.id+"_pd_type", 'gaussian'), 551 551 relative_pd=p.relative_pd, 552 M0=pars.get( 'M0:'+p.id, 0.),553 mphi=pars.get( 'mphi:'+p.id, 0.),554 mtheta=pars.get( 'mtheta:'+p.id, 0.),552 M0=pars.get(p.id+'_M0', 0.), 553 mphi=pars.get(p.id+'_mphi', 0.), 554 mtheta=pars.get(p.id+'_mtheta', 0.), 555 555 ) 556 556 lines.append(_format_par(p.name, **fields)) … … 618 618 if suppress: 619 619 for p in pars: 620 if p. startswith("M0:"):620 if p.endswith("_M0"): 621 621 pars[p] = 0 622 622 else: … … 624 624 first_mag = None 625 625 for p in pars: 626 if p. startswith("M0:"):626 if p.endswith("_M0"): 627 627 any_mag |= (pars[p] != 0) 628 628 if first_mag is None:
Note: See TracChangeset
for help on using the changeset viewer.