Changeset 0c2da4b in sasmodels for sasmodels/conversion_table.py


Ignore:
Timestamp:
Mar 5, 2017 10:03:48 PM (7 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:
f88e248
Parents:
d3e3f756 (diff), acfb094 (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-843

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/conversion_table.py

    rd3e3f756 r0c2da4b  
    55names for each parameter in sasmodels.  This is used by :mod:`convert` to 
    66determine the equivalent parameter set when comparing a sasmodels model to 
    7 the models defined in SasView 3.1. 
     7the models defined in previous versions of SasView and sasmodels. This is now 
     8versioned based on the version number of SasView. 
     9 
     10When any sasmodels parameter or model name is changed, this must be modified to 
     11account for that. 
     12 
     13Usage: 
     14<old_Sasview_version> : { 
     15    <new_model_name> : [ 
     16        <old_model_name> , 
     17        { 
     18            <new_param_name_1> : <old_param_name_1>, 
     19            ... 
     20            <new_param_name_n> : <old_param_name_n> 
     21        } 
     22    ] 
     23} 
     24 
     25Any future parameter and model name changes can and should be given in this 
     26table for future compatibility. 
    827""" 
    928 
    10  
    1129CONVERSION_TABLE = { 
     30    (3,1,2) : { 
    1231    "adsorbed_layer": [ 
    1332        "Core2ndMomentModel", 
     
    211230    ], 
    212231    "correlation_length": [ 
    213         "CorrLengthModel", 
     232        "CorrLength", 
    214233        { 
    215234            "porod_scale": "scale_p", 
     
    218237            "lorentz_exp": "exponent_l", 
    219238            "cor_length": "length_l" 
    220         } 
     239        }, 
     240        "CorrLengthModel" 
    221241    ], 
    222242    "cylinder": [ 
     
    299319    ], 
    300320    "fractal_core_shell": [ 
    301         "FractalCoreShellModel", 
     321        "FractalCoreShell", 
    302322        { 
    303323            "sld_core": "core_sld", 
     
    309329            "cor_length": "cor_length", 
    310330            "volfraction": "volfraction", 
    311         } 
     331        }, 
     332        "FractalCoreShellModel" 
    312333    ], 
    313334    "fuzzy_sphere": [ 
     
    321342    ], 
    322343    "gauss_lorentz_gel": [ 
    323         "GaussLorentzGelModel", 
     344        "GaussLorentzGel", 
    324345        { 
    325346            "gauss_scale": "scale_g", 
     
    328349            "background": "background", 
    329350            "lorentz_scale": "scale_l" 
    330         } 
     351        }, 
     352        "GaussLorentzGelModel" 
    331353    ], 
    332354    "gaussian_peak": [ 
    333         "PeakGaussModel", 
     355        "Peak Gauss Model", 
    334356        { 
    335357            "peak_pos": "q0", 
    336358            "sigma": "B", 
    337         } 
     359        }, 
     360        "PeakGaussModel", 
    338361    ], 
    339362    "gel_fit": [ 
     
    343366            "lorentz_scale": "lScale", 
    344367            "guinier_scale": "gScale", 
    345             "fractal_dim": "scale", 
     368            "fractal_dim": "FractalExp", 
    346369            "cor_length": "zeta", 
    347370        } 
    348371    ], 
    349372    "guinier": [ 
     373        "Guinier", 
     374        { 
     375            "rg": "rg" 
     376        }, 
    350377        "GuinierModel", 
    351         { 
    352             "rg": "rg" 
    353         } 
    354378    ], 
    355379    "guinier_porod": [ 
    356         "GuinierPorodModel", 
     380        "GuinierPorod", 
    357381        { 
    358382            "s": "dim", 
     
    361385            "scale": "scale", 
    362386            "background": "background" 
    363         } 
     387        }, 
     388        "GuinierPorodModel", 
    364389    ], 
    365390    "hardsphere": [ 
     
    454479            "d_spacing": "spacing", 
    455480            "Caille_parameter": "caille", 
    456             "Nlayers": "N_plates", 
     481            "Nlayers": "n_plates", 
    457482        } 
    458483    ], 
     
    486511    ], 
    487512    "lorentz": [ 
     513        "Lorentz", 
     514        { 
     515            "cor_length": "length" 
     516        }, 
    488517        "LorentzModel", 
    489         { 
    490             "cor_length": "length" 
    491         } 
    492518    ], 
    493519    "mass_fractal": [ 
     
    510536    ], 
    511537    "mono_gauss_coil": [ 
    512         "DebyeModel", 
     538        "Debye", 
    513539        { 
    514540            "rg": "rg", 
    515541            "i_zero": "scale", 
    516542            "background": "background", 
    517         } 
     543        }, 
     544        "DebyeModel", 
    518545    ], 
    519546    "multilayer_vesicle": [ 
     
    564591    ], 
    565592    "peak_lorentz": [ 
    566         "PeakLorentzModel", 
     593        "Peak Lorentz Model", 
    567594        { 
    568595            "peak_pos": "q0", 
    569596            "peak_hwhm": "B" 
    570         } 
     597        }, 
     598        "PeakLorentzModel", 
    571599    ], 
    572600    "pearl_necklace": [ 
     
    802830    ], 
    803831    "two_lorentzian": [ 
    804         "TwoLorentzianModel", 
     832        "TwoLorentzian", 
    805833        { 
    806834            "lorentz_scale_1": "scale_1", 
     
    811839            "lorentz_length_1": "length_1", 
    812840            "background": "background" 
    813         } 
     841        }, 
     842        "TwoLorentzianModel", 
    814843    ], 
    815844    "two_power_law": [ 
    816         "TwoPowerLawModel", 
     845        "TwoPowerLaw", 
    817846        { 
    818847            "coefficent_1": "coef_A", 
     
    821850            "background": "background", 
    822851            "crossover": "qc" 
    823         } 
     852        }, 
     853        "TwoPowerLawModel", 
    824854    ], 
    825855    "unified_power_Rg": [ 
     856        "UnifiedPowerRg", 
     857        dict(((field_new+str(index), field_old+str(index)) 
     858              for field_new, field_old in [("rg", "Rg"), 
     859                                           ("power", "power"), 
     860                                           ("G", "G"), 
     861                                           ("B", "B"),] 
     862              for index in range(11)), 
     863             **{ 
     864                   "background": "background", 
     865                   "scale": "scale", 
     866               }), 
    826867        "UnifiedPowerRgModel", 
    827         { 
    828         } 
    829868    ], 
    830869    "vesicle": [ 
     
    835874        } 
    836875    ] 
     876    } 
    837877} 
Note: See TracChangeset for help on using the changeset viewer.