Changeset a0494e9 in sasmodels for sasmodels/convert.py


Ignore:
Timestamp:
Jul 18, 2016 11:43:54 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
c7ff92c
Parents:
263daec
Message:

allow comparison between onion/spherical_sld and sasview

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/convert.py

    r51ec7e8 ra0494e9  
    243243            _remove_pd(oldpars, 'rimB', name) 
    244244            _remove_pd(oldpars, 'rimC', name) 
     245        elif name == 'spherical_sld': 
     246            for k in range(1, int(pars['n_shells'])+1): 
     247                _remove_pd(oldpars, 'thick_flat'+str(k), 'thick_flat') 
     248                _remove_pd(oldpars, 'thick_inter'+str(k), 'thick_inter') 
    245249        elif name == 'rpa': 
    246250            # convert scattering lengths from femtometers to centimeters 
     
    263267        elif name in ['mono_gauss_coil','poly_gauss_coil']: 
    264268            del oldpars['i_zero'] 
     269        elif name == 'onion': 
     270            oldpars.pop('n_shells', None) 
    265271 
    266272    return oldpars 
     
    302308        elif name == 'core_multi_shell': 
    303309            pars['n'] = min(math.ceil(pars['n']), 4) 
    304  
     310        elif name == 'spherical_sld': 
     311            for k in range(1, 11): 
     312                pars['thick_flat%d_pd_n'%k] = 0 
     313                pars['thick_inter%d_pd_n'%k] = 0 
     314 
Note: See TracChangeset for help on using the changeset viewer.