Changeset e85aa2e in sasmodels


Ignore:
Timestamp:
Nov 2, 2016 7:40:32 AM (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:
037aa3d
Parents:
fef353f
Message:

support scale ↔ scale_factor conversion in P*S models

Location:
sasmodels
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/conversion_table.py

    raea515c re85aa2e  
    366366        "HardsphereStructure", 
    367367        { 
    368             "radius_effective_pd": "effect_radius_pd", 
     368            "scale": "scale_factor", 
    369369            "radius_effective": "effect_radius", 
    370             "radius_effective_pd_n": "effect_radius_pd_n" 
    371370        } 
    372371    ], 
     
    374373        "HayterMSAStructure", 
    375374        { 
     375            "scale": "scale_factor", 
    376376            "radius_effective": "effect_radius", 
    377377            "volfraction": "volfraction", 
     
    380380            "concentration_salt": "saltconc", 
    381381            "dielectconst": "dielectconst", 
    382             #"radius_effective_pd_n": "effect_radius_pd_n", 
    383             #"radius_effective_pd": "effect_radius_pd", 
    384382        } 
    385383    ], 
     
    738736        "SquareWellStructure", 
    739737        { 
    740             "radius_effective_pd": "effect_radius_pd", 
     738            "scale": "scale_factor", 
    741739            "radius_effective": "effect_radius", 
    742             "radius_effective_pd_n": "effect_radius_pd_n" 
     740            "wellwidth": "wellwidth", 
     741            "welldepth": "welldepth", 
    743742        } 
    744743    ], 
     
    766765        "StickyHSStructure", 
    767766        { 
    768             "radius_effective_pd": "effect_radius_pd", 
     767            "scale": "scale_factor", 
    769768            "radius_effective": "effect_radius", 
    770             "radius_effective_pd_n": "effect_radius_pd_n" 
    771769        } 
    772770    ], 
  • sasmodels/convert.py

    r999c87f re85aa2e  
    161161        oldpars['rimB.width'] = 0.0 
    162162        oldpars['rimC.width'] = 0.0 
     163    elif name == 'core_shell_ellipsoid:1': 
    163164    elif name == 'hollow_cylinder': 
    164165        # now uses radius and thickness 
     
    228229    if newname is None: 
    229230        return name, pars 
    230     if newname.endswith(':1'): 
     231    if ':' in newname:   # core_shell_ellipsoid:1 
    231232        model_info = load_model_info(newname[:-2]) 
    232233        # Know that the table exists and isn't multiplicity so grab it directly 
     234        # Can't use _get_translation_table since that will return the 'bare' 
     235        # version. 
    233236        translation = CONVERSION_TABLE[newname] 
    234237    else: 
     
    305308        composition_type, parts = model_info.composition 
    306309        if composition_type == 'product': 
    307             translation = {'scale':'scale_factor'} 
    308             translation.update(_get_translation_table(parts[0])) 
     310            translation = _get_translation_table(parts[0]) 
     311            # structure factor models include scale:scale_factor mapping 
    309312            translation.update(_get_translation_table(parts[1])) 
    310313        else: 
Note: See TracChangeset for help on using the changeset viewer.