Changeset 17695aa in sasmodels for sasmodels/compare.py


Ignore:
Timestamp:
Oct 30, 2018 8:59:40 AM (5 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:
c1799d3
Parents:
6da1d76 (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.
Message:

Merge branch 'master' into ticket-1157

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/compare.py

    rb6dab59 r17695aa  
    368368 
    369369    # 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'): 
    371371        return np.random.uniform(0, 5) 
    372372 
     
    538538    magnetic_pars = [] 
    539539    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')): 
    541541            continue 
    542542        if p.id.startswith('up:'): 
     
    550550            pdtype=pars.get(p.id+"_pd_type", 'gaussian'), 
    551551            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.), 
    555555        ) 
    556556        lines.append(_format_par(p.name, **fields)) 
     
    618618    if suppress: 
    619619        for p in pars: 
    620             if p.startswith("M0:"): 
     620            if p.endswith("_M0"): 
    621621                pars[p] = 0 
    622622    else: 
     
    624624        first_mag = None 
    625625        for p in pars: 
    626             if p.startswith("M0:"): 
     626            if p.endswith("_M0"): 
    627627                any_mag |= (pars[p] != 0) 
    628628                if first_mag is None: 
Note: See TracChangeset for help on using the changeset viewer.