Changeset ee95012 in sasmodels


Ignore:
Timestamp:
Oct 31, 2017 4:45:31 AM (7 years ago)
Author:
Gonzalez, Miguel <gonzalez@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
edb0f85
Parents:
439ffcd
Message:

Fixes #1006 (cleaner)

Location:
sasmodels
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/core_multi_shell.py

    r439ffcd ree95012  
    118118    return pars 
    119119 
    120 def profile(sld_core, radius, sld_solvent, n, sld, thickness, **kwargs): 
     120def profile(sld_core, radius, sld_solvent, n, sld, thickness): 
    121121    """ 
    122122    Returns the SLD profile *r* (Ang), and *rho* (1e-6/Ang^2). 
  • sasmodels/models/onion.py

    r439ffcd ree95012  
    318318profile_axes = ['Radius (A)', 'SLD (1e-6/A^2)'] 
    319319def profile(sld_core, radius_core, sld_solvent, n_shells, 
    320             sld_in, sld_out, thickness, A, **kwargs): 
     320            sld_in, sld_out, thickness, A): 
    321321    """ 
    322322    Returns shape profile with x=radius, y=SLD. 
  • sasmodels/models/spherical_sld.py

    r439ffcd ree95012  
    222222 
    223223def profile(n_shells, sld_solvent, sld, thickness, 
    224             interface, shape, nu, n_steps, **kwargs): 
     224            interface, shape, nu, n_steps): 
    225225    """ 
    226226    Returns shape profile with x=radius, y=SLD. 
  • sasmodels/product.py

    r439ffcd ree95012  
    102102    model_info.control = p_info.control 
    103103    model_info.hidden = p_info.hidden 
    104     model_info.profile = p_info.profile 
     104    if getattr(p_info, 'profile', None) is not None: 
     105        def profile(**kwargs): 
     106            list_params = [p.name.split('[')[0] for p in p_info.parameters.kernel_parameters] 
     107            form_factor_args = dict((k, v) for k, v in kwargs.items() if k in list_params)             
     108            return p_info.profile(**form_factor_args) 
     109    else: 
     110        profile = None 
     111    model_info.profile = profile 
    105112    model_info.profile_axes = p_info.profile_axes 
    106113     
Note: See TracChangeset for help on using the changeset viewer.