Changeset 12f77e9 in sasmodels for sasmodels/compare.py
- Timestamp:
- Oct 30, 2018 10:56:38 AM (5 years ago)
- Branches:
- master
- Children:
- 4e96703
- Parents:
- 1657e21 (diff), c6084f1 (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
r01dba26 r12f77e9 369 369 370 370 # Limit magnetic SLDs to a smaller range, from zero to iron=5/A^2 371 if par.name. startswith('M0:'):371 if par.name.endswith('_M0'): 372 372 return np.random.uniform(0, 5) 373 373 … … 539 539 magnetic_pars = [] 540 540 for p in parameters.user_parameters(pars, is2d): 541 if any(p.id. startswith(x) for x in ('M0:', 'mtheta:', 'mphi:')):541 if any(p.id.endswith(x) for x in ('_M0', '_mtheta', '_mphi')): 542 542 continue 543 543 if p.id.startswith('up:'): … … 551 551 pdtype=pars.get(p.id+"_pd_type", 'gaussian'), 552 552 relative_pd=p.relative_pd, 553 M0=pars.get( 'M0:'+p.id, 0.),554 mphi=pars.get( 'mphi:'+p.id, 0.),555 mtheta=pars.get( 'mtheta:'+p.id, 0.),553 M0=pars.get(p.id+'_M0', 0.), 554 mphi=pars.get(p.id+'_mphi', 0.), 555 mtheta=pars.get(p.id+'_mtheta', 0.), 556 556 ) 557 557 lines.append(_format_par(p.name, **fields)) … … 619 619 if suppress: 620 620 for p in pars: 621 if p. startswith("M0:"):621 if p.endswith("_M0"): 622 622 pars[p] = 0 623 623 else: … … 625 625 first_mag = None 626 626 for p in pars: 627 if p. startswith("M0:"):627 if p.endswith("_M0"): 628 628 any_mag |= (pars[p] != 0) 629 629 if first_mag is None:
Note: See TracChangeset
for help on using the changeset viewer.