Changeset 78f8308 in sasmodels


Ignore:
Timestamp:
Sep 16, 2018 7:22:56 PM (5 weeks ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
ticket_1156
Children:
e7e9231
Parents:
6530963
Message:

convert saved paracrystal parameters from 4.1 to 4.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/convert.py

    ra69d8cd r78f8308  
    165165    if version == (3, 1, 2): 
    166166        oldpars = _hand_convert_3_1_2_to_4_1(name, oldpars) 
     167    if version < (4, 2, 0): 
     168        oldpars = _hand_convert_4_1_to_4_2(name, oldpars) 
     169    return oldpars 
     170 
     171def _hand_convert_4_1_to_4_2(name, oldpars): 
     172    if name in ('bcc_paracrystal', 'fcc_paracrystal', 'sc_paracrystal'): 
     173        oldpars['lattice_spacing'] = oldpars.pop('dnn') 
     174        oldpars['lattice_distortion'] = oldpars.pop('d_factor') 
    167175    return oldpars 
    168176 
Note: See TracChangeset for help on using the changeset viewer.