Changeset 1917 for trunk/GSASII.py


Ignore:
Timestamp:
Jul 1, 2015 3:36:09 PM (7 years ago)
Author:
vondreele
Message:

better handling of nonmerohedral twins

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r1915 r1917  
    833833                UseList[histoName] = SetDefaultDData(reflData['Type'],histoName)
    834834                G,g = G2lat.cell2Gmat(generalData['Cell'][1:7])
    835                 UseList[histoName]['Twins'] = [[np.array([[1,0,0],[0,1,0],[0,0,1]]),[1.0,False]],]
    836                 for iT in range(reflData.get('TwMax',0)):
    837                     UseList[histoName]['Twins'].append([False,0.0])
     835                if 'TwMax' in reflData:     #nonmerohedral twins present
     836                    UseList[histoName]['Twins'] = []
     837                    for iT in range(reflData['TwMax'][0]+1):
     838                        if iT in reflData['TwMax'][1]:
     839                            UseList[histoName]['Twins'].append([False,0.0])
     840                        else:
     841                            UseList[histoName]['Twins'].append([np.array([[1,0,0],[0,1,0],[0,0,1]]),[1.0,False]])
     842                else:   #no nonmerohedral twins
     843                    UseList[histoName]['Twins'] = [[np.array([[1,0,0],[0,1,0],[0,0,1]]),[1.0,False]],]
    838844                for iref,ref in enumerate(reflData['RefList']):
    839845                    hkl = ref[:3]
Note: See TracChangeset for help on using the changeset viewer.