Changeset b6f10d8 in sasmodels


Ignore:
Timestamp:
Oct 17, 2016 10:35:02 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
158cee4
Parents:
0b040de
Message:

sascomp: default to pd_n=35 if pd given on command line

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/compare.py

    r0b040de rb6f10d8  
    886886        'mono'      : False, 
    887887        # Default to magnetic a magnetic moment is set on the command line 
    888         'magnetic'  : any(v.startswith('M0:') for v in values), 
     888        'magnetic'  : False, 
    889889        'show_pars' : False, 
    890890        'show_hist' : False, 
     
    971971        pars = suppress_pd(pars) 
    972972        pars2 = suppress_pd(pars2) 
     973    if not opts['magnetic']: 
     974        pars = suppress_magnetism(pars) 
     975        pars2 = suppress_magnetism(pars2) 
    973976 
    974977    # Fill in parameters given on the command line 
     
    988991            presets2[k] = float(v2) if isnumber(v2) else v2 
    989992 
     993    # If pd given on the command line, default pd_n to 35 
     994    for k, v in list(presets.items()): 
     995        if k.endswith('_pd'): 
     996            presets.setdefault(k+'_n', 35.) 
     997    for k, v in list(presets2.items()): 
     998        if k.endswith('_pd'): 
     999            presets2.setdefault(k+'_n', 35.) 
     1000 
    9901001    # Evaluate preset parameter expressions 
    9911002    context = MATH.copy() 
     
    10071018    constrain_pars(model_info, pars) 
    10081019    constrain_pars(model_info2, pars2) 
    1009     if not opts['magnetic']: 
    1010         pars = suppress_magnetism(pars) 
    1011         pars2 = suppress_magnetism(pars2) 
    10121020 
    10131021    same_model = name == name2 and pars == pars 
Note: See TracChangeset for help on using the changeset viewer.