Changeset d2fb4af in sasmodels


Ignore:
Timestamp:
Nov 22, 2016 6:43:16 AM (7 years ago)
Author:
krzywon
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
077666e
Parents:
f80f334
Message:

#795: No longer an issue with multiple backgrounds and scales. A handful of model names were slightly off from the save state names. Currently going through model-by-model to finish this.

Location:
sasmodels
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/conversion_table.py

    rfa6d6fc rd2fb4af  
    211211    ], 
    212212    "correlation_length": [ 
    213         "CorrLengthModel", 
     213        "CorrLength", 
    214214        { 
    215215            "porod_scale": "scale_p", 
     
    299299    ], 
    300300    "fractal_core_shell": [ 
    301         "FractalCoreShellModel", 
     301        "FractalCoreShell", 
    302302        { 
    303303            "sld_core": "core_sld", 
     
    321321    ], 
    322322    "gauss_lorentz_gel": [ 
    323         "GaussLorentzGelModel", 
     323        "GaussLorentzGel", 
    324324        { 
    325325            "gauss_scale": "scale_g", 
     
    331331    ], 
    332332    "gaussian_peak": [ 
    333         "PeakGaussModel", 
     333        "Peak Gauss Model", 
    334334        { 
    335335            "peak_pos": "q0", 
     
    348348    ], 
    349349    "guinier": [ 
    350         "GuinierModel", 
     350        "Guinier", 
    351351        { 
    352352            "rg": "rg" 
     
    354354    ], 
    355355    "guinier_porod": [ 
    356         "GuinierPorodModel", 
     356        "GuinierPorod", 
    357357        { 
    358358            "s": "dim", 
     
    486486    ], 
    487487    "lorentz": [ 
    488         "LorentzModel", 
     488        "Lorentz", 
    489489        { 
    490490            "cor_length": "length" 
     
    510510    ], 
    511511    "mono_gauss_coil": [ 
    512         "DebyeModel", 
     512        "Debye", 
    513513        { 
    514514            "rg": "rg", 
     
    564564    ], 
    565565    "peak_lorentz": [ 
    566         "PeakLorentzModel", 
     566        "Peak Lorentz Model", 
    567567        { 
    568568            "peak_pos": "q0", 
     
    802802    ], 
    803803    "two_lorentzian": [ 
    804         "TwoLorentzianModel", 
     804        "TwoLorentzian", 
    805805        { 
    806806            "lorentz_scale_1": "scale_1", 
     
    814814    ], 
    815815    "two_power_law": [ 
    816         "TwoPowerLawModel", 
     816        "TwoPowerLaw", 
    817817        { 
    818818            "coefficent_1": "coef_A", 
     
    824824    ], 
    825825    "unified_power_Rg": [ 
    826         "UnifiedPowerRgModel", 
     826        "UnifiedPowerRg", 
    827827        { 
    828828        } 
  • sasmodels/convert.py

    rf80f334 rd2fb4af  
    6464    if id.startswith('M0:'): 
    6565        return True 
    66     if id.startswith('volfraction') or id.startswith('radius_effective'): 
    67         return False 
    6866    if '_pd' in id or '.' in id: 
    6967        return False 
     
    7573        if p.id == id: 
    7674            return p.type == 'sld' 
    77     raise ValueError("unknown parameter %r in conversion"%id) 
     75    return False 
    7876 
    7977def _rescale_sld(model_info, pars, scale): 
     
    137135                i += 1 
    138136                break 
    139             elif re.search("background", key_par) or re.search("scale", key_par): 
     137            elif "background" == key_par or "scale" == key_par: 
    140138                new_pars[key_par] = value_par 
    141139                i += 1 
     
    236234                oldpars[p + ".upper"] /= 1e-13 
    237235    elif name == 'spherical_sld': 
    238         oldpars["CONTROL"] += 1 
     236        oldpars["CONTROL"] = 0 
     237        i = 0 
     238        while "nu_inter" + str(i) in oldpars: 
     239            oldpars["CONTROL"] += 1 
     240            i += 1 
    239241    elif name == 'teubner_strey': 
    240242        # basically undoing the entire Teubner-Strey calculations here. 
Note: See TracChangeset for help on using the changeset viewer.