Changeset 716abe0 in sasmodels


Ignore:
Timestamp:
Dec 11, 2015 3:58:36 PM (9 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:
e97170c
Parents:
9a66e65
Message:

fix refactored conversion function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/convert.py

    r9a66e65 r716abe0  
    7272    """ 
    7373    newpars = pars.copy() 
     74 
    7475    for new, old in mapping.items(): 
    7576        for pd, dot in PD_DOT: 
     
    8081                    newpars[old+dot] = pars[new+pd] 
    8182                del newpars[new+pd] 
     83    for k in list(newpars.keys()): 
     84        for pd, dot in PD_DOT[1:]:  # skip "" => "" 
     85            if k.endswith(pd): 
     86                newpars[k[:-len(pd)]+dot] = newpars[k] 
     87                del newpars[k] 
    8288    return newpars 
    8389 
Note: See TracChangeset for help on using the changeset viewer.