Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/conversion_table.py

    rbb584b3 rd3e3f756  
    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 previous versions of SasView and sasmodels. This is now 
    8 versioned based on the version number of SasView. 
    9  
    10 When any sasmodels parameter or model name is changed, this must be modified to 
    11 account for that. 
    12  
    13 Usage: 
    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  
    25 Any future parameter and model name changes can and should be given in this 
    26 table for future compatibility. 
     7the models defined in SasView 3.1. 
    278""" 
    289 
     10 
    2911CONVERSION_TABLE = { 
    30     (4,0,1) : {}, 
    31     (4,0,0) : {}, 
    32     (3,1,2) : { 
    3312    "adsorbed_layer": [ 
    3413        "Core2ndMomentModel", 
     
    232211    ], 
    233212    "correlation_length": [ 
    234         "CorrLength", 
     213        "CorrLengthModel", 
    235214        { 
    236215            "porod_scale": "scale_p", 
     
    239218            "lorentz_exp": "exponent_l", 
    240219            "cor_length": "length_l" 
    241         }, 
    242         "CorrLengthModel" 
     220        } 
    243221    ], 
    244222    "cylinder": [ 
     
    321299    ], 
    322300    "fractal_core_shell": [ 
    323         "FractalCoreShell", 
     301        "FractalCoreShellModel", 
    324302        { 
    325303            "sld_core": "core_sld", 
     
    331309            "cor_length": "cor_length", 
    332310            "volfraction": "volfraction", 
    333         }, 
    334         "FractalCoreShellModel" 
     311        } 
    335312    ], 
    336313    "fuzzy_sphere": [ 
     
    344321    ], 
    345322    "gauss_lorentz_gel": [ 
    346         "GaussLorentzGel", 
     323        "GaussLorentzGelModel", 
    347324        { 
    348325            "gauss_scale": "scale_g", 
     
    351328            "background": "background", 
    352329            "lorentz_scale": "scale_l" 
    353         }, 
    354         "GaussLorentzGelModel" 
     330        } 
    355331    ], 
    356332    "gaussian_peak": [ 
    357         "Peak Gauss Model", 
     333        "PeakGaussModel", 
    358334        { 
    359335            "peak_pos": "q0", 
    360336            "sigma": "B", 
    361         }, 
    362         "PeakGaussModel", 
     337        } 
    363338    ], 
    364339    "gel_fit": [ 
     
    368343            "lorentz_scale": "lScale", 
    369344            "guinier_scale": "gScale", 
    370             "fractal_dim": "FractalExp", 
     345            "fractal_dim": "scale", 
    371346            "cor_length": "zeta", 
    372347        } 
    373348    ], 
    374349    "guinier": [ 
    375         "Guinier", 
     350        "GuinierModel", 
    376351        { 
    377352            "rg": "rg" 
    378         }, 
    379         "GuinierModel", 
     353        } 
    380354    ], 
    381355    "guinier_porod": [ 
    382         "GuinierPorod", 
     356        "GuinierPorodModel", 
    383357        { 
    384358            "s": "dim", 
     
    387361            "scale": "scale", 
    388362            "background": "background" 
    389         }, 
    390         "GuinierPorodModel", 
     363        } 
    391364    ], 
    392365    "hardsphere": [ 
     
    481454            "d_spacing": "spacing", 
    482455            "Caille_parameter": "caille", 
    483             "Nlayers": "n_plates", 
     456            "Nlayers": "N_plates", 
    484457        } 
    485458    ], 
     
    513486    ], 
    514487    "lorentz": [ 
    515         "Lorentz", 
     488        "LorentzModel", 
    516489        { 
    517490            "cor_length": "length" 
    518         }, 
    519         "LorentzModel", 
     491        } 
    520492    ], 
    521493    "mass_fractal": [ 
     
    538510    ], 
    539511    "mono_gauss_coil": [ 
    540         "Debye", 
     512        "DebyeModel", 
    541513        { 
    542514            "rg": "rg", 
    543515            "i_zero": "scale", 
    544516            "background": "background", 
    545         }, 
    546         "DebyeModel", 
     517        } 
    547518    ], 
    548519    "multilayer_vesicle": [ 
     
    551522            "radius": "core_radius", 
    552523            "sld_solvent": "core_sld", 
    553             "n_pairs": "n_pairs", 
     524            "n_shells": "n_pairs", 
    554525            "thick_shell": "s_thickness", 
    555526            "sld": "shell_sld", 
     
    593564    ], 
    594565    "peak_lorentz": [ 
    595         "Peak Lorentz Model", 
     566        "PeakLorentzModel", 
    596567        { 
    597568            "peak_pos": "q0", 
    598569            "peak_hwhm": "B" 
    599         }, 
    600         "PeakLorentzModel", 
     570        } 
    601571    ], 
    602572    "pearl_necklace": [ 
     
    832802    ], 
    833803    "two_lorentzian": [ 
    834         "TwoLorentzian", 
     804        "TwoLorentzianModel", 
    835805        { 
    836806            "lorentz_scale_1": "scale_1", 
     
    841811            "lorentz_length_1": "length_1", 
    842812            "background": "background" 
    843         }, 
    844         "TwoLorentzianModel", 
     813        } 
    845814    ], 
    846815    "two_power_law": [ 
    847         "TwoPowerLaw", 
     816        "TwoPowerLawModel", 
    848817        { 
    849818            "coefficent_1": "coef_A", 
     
    852821            "background": "background", 
    853822            "crossover": "qc" 
    854         }, 
    855         "TwoPowerLawModel", 
     823        } 
    856824    ], 
    857825    "unified_power_Rg": [ 
    858         "UnifiedPowerRg", 
    859         dict(((field_new+str(index), field_old+str(index)) 
    860               for field_new, field_old in [("rg", "Rg"), 
    861                                            ("power", "power"), 
    862                                            ("G", "G"), 
    863                                            ("B", "B"),] 
    864               for index in range(11)), 
    865              **{ 
    866                    "background": "background", 
    867                    "scale": "scale", 
    868                }), 
    869826        "UnifiedPowerRgModel", 
     827        { 
     828        } 
    870829    ], 
    871830    "vesicle": [ 
     
    876835        } 
    877836    ] 
    878     } 
    879837} 
Note: See TracChangeset for help on using the changeset viewer.