Changeset be43e39 in sasmodels for sasmodels/compare.py


Ignore:
Timestamp:
Oct 19, 2018 3:49:12 PM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
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.
Message:

Merge branch 'master' into beta_approx

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/compare.py

    rfb7c176 rbe43e39  
    367367 
    368368    # 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'): 
    370370        return np.random.uniform(0, 5) 
    371371 
     
    537537    magnetic_pars = [] 
    538538    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')): 
    540540            continue 
    541541        if p.id.startswith('up:'): 
     
    549549            pdtype=pars.get(p.id+"_pd_type", 'gaussian'), 
    550550            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.), 
    554554        ) 
    555555        lines.append(_format_par(p.name, **fields)) 
     
    617617    if suppress: 
    618618        for p in pars: 
    619             if p.startswith("M0:"): 
     619            if p.endswith("_M0"): 
    620620                pars[p] = 0 
    621621    else: 
     
    623623        first_mag = None 
    624624        for p in pars: 
    625             if p.startswith("M0:"): 
     625            if p.endswith("_M0"): 
    626626                any_mag |= (pars[p] != 0) 
    627627                if first_mag is None: 
Note: See TracChangeset for help on using the changeset viewer.