Changes in sasmodels/compare.py [610ef23:bd7630d] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/compare.py
r610ef23 rbd7630d 368 368 369 369 # Limit magnetic SLDs to a smaller range, from zero to iron=5/A^2 370 if par.name. endswith('_M0'):370 if par.name.startswith('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. endswith(x) for x in ('_M0', '_mtheta', '_mphi')):540 if any(p.id.startswith(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( p.id+'_M0', 0.),553 mphi=pars.get( p.id+'_mphi', 0.),554 mtheta=pars.get( p.id+'_mtheta', 0.),552 M0=pars.get('M0:'+p.id, 0.), 553 mphi=pars.get('mphi:'+p.id, 0.), 554 mtheta=pars.get('mtheta:'+p.id, 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. endswith("_M0"):620 if p.startswith("M0:"): 621 621 pars[p] = 0 622 622 else: … … 624 624 first_mag = None 625 625 for p in pars: 626 if p. endswith("_M0"):626 if p.startswith("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.