Changeset 2746 for trunk/GSASIIstrIO.py


Ignore:
Timestamp:
Mar 7, 2017 9:26:15 AM (7 years ago)
Author:
vondreele
Message:

fix another Lebail bug
dress up some formatting for mustrain & size parameters - more sensible no.of places past decimal pt.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrIO.py

    r2743 r2746  
    21142114        if hapData[0] in ['isotropic','uniaxial']:
    21152115            line = '\n Size model    : %9s'%(hapData[0])
    2116             line += ' equatorial:'+'%12.5f'%(hapData[1][0])+' Refine? '+str(hapData[2][0])
     2116            line += ' equatorial:'+'%12.3f'%(hapData[1][0])+' Refine? '+str(hapData[2][0])
    21172117            if hapData[0] == 'uniaxial':
    2118                 line += ' axial:'+'%12.5f'%(hapData[1][1])+' Refine? '+str(hapData[2][1])
     2118                line += ' axial:'+'%12.3f'%(hapData[1][1])+' Refine? '+str(hapData[2][1])
    21192119            line += '\n\t LG mixing coeff.: %12.4f'%(hapData[1][2])+' Refine? '+str(hapData[2][2])
    21202120            print >>pFile,line
     
    21282128            for i,name in enumerate(Snames):
    21292129                ptlbls += '%12s' % (name)
    2130                 ptstr += '%12.6f' % (hapData[4][i])
     2130                ptstr += '%12.3f' % (hapData[4][i])
    21312131                varstr += '%12s' % (str(hapData[5][i]))
    21322132            print >>pFile,ptlbls
     
    21512151            for i,name in enumerate(Snames):
    21522152                ptlbls += '%12s' % (name)
    2153                 ptstr += '%12.6f' % (hapData[4][i])
     2153                ptstr += '%12.1f' % (hapData[4][i])
    21542154                varstr += '%12s' % (str(hapData[5][i]))
    21552155            print >>pFile,ptlbls
     
    22492249                for item in ['Scale','Extinction']:
    22502250                    hapDict[pfx+item] = hapData[item][0]
    2251                     if hapData[item][1]:
     2251                    if hapData[item][1] and not hapDict[pfx+'LeBail']:
    22522252                        hapVary.append(pfx+item)
    22532253                names = G2spc.HStrainNames(SGData)
     
    22582258                    if hapData['HStrain'][1][i] and not hapDict[pfx+'LeBail']:
    22592259                        hapVary.append(pfx+name)
    2260                     controlDict[pfx+'poType'] = hapData['Pref.Ori.'][0]
    2261                     if hapData['Pref.Ori.'][0] == 'MD':
    2262                         hapDict[pfx+'MD'] = hapData['Pref.Ori.'][1]
    2263                         controlDict[pfx+'MDAxis'] = hapData['Pref.Ori.'][3]
     2260                controlDict[pfx+'poType'] = hapData['Pref.Ori.'][0]
     2261                if hapData['Pref.Ori.'][0] == 'MD':
     2262                    hapDict[pfx+'MD'] = hapData['Pref.Ori.'][1]
     2263                    controlDict[pfx+'MDAxis'] = hapData['Pref.Ori.'][3]
     2264                    if hapData['Pref.Ori.'][2] and not hapDict[pfx+'LeBail']:
     2265                        hapVary.append(pfx+'MD')
     2266                else:                           #'SH' spherical harmonics
     2267                    controlDict[pfx+'SHord'] = hapData['Pref.Ori.'][4]
     2268                    controlDict[pfx+'SHncof'] = len(hapData['Pref.Ori.'][5])
     2269                    controlDict[pfx+'SHnames'] = G2lat.GenSHCoeff(SGData['SGLaue'],'0',controlDict[pfx+'SHord'],False)
     2270                    controlDict[pfx+'SHhkl'] = []
     2271                    try: #patch for old Pref.Ori. items
     2272                        controlDict[pfx+'SHtoler'] = 0.1
     2273                        if hapData['Pref.Ori.'][6][0] != '':
     2274                            controlDict[pfx+'SHhkl'] = [eval(a.replace(' ',',')) for a in hapData['Pref.Ori.'][6]]
     2275                        controlDict[pfx+'SHtoler'] = hapData['Pref.Ori.'][7]
     2276                    except IndexError:
     2277                        pass
     2278                    for item in hapData['Pref.Ori.'][5]:
     2279                        hapDict[pfx+item] = hapData['Pref.Ori.'][5][item]
    22642280                        if hapData['Pref.Ori.'][2] and not hapDict[pfx+'LeBail']:
    2265                             hapVary.append(pfx+'MD')
    2266                     else:                           #'SH' spherical harmonics
    2267                         controlDict[pfx+'SHord'] = hapData['Pref.Ori.'][4]
    2268                         controlDict[pfx+'SHncof'] = len(hapData['Pref.Ori.'][5])
    2269                         controlDict[pfx+'SHnames'] = G2lat.GenSHCoeff(SGData['SGLaue'],'0',controlDict[pfx+'SHord'],False)
    2270                         controlDict[pfx+'SHhkl'] = []
    2271                         try: #patch for old Pref.Ori. items
    2272                             controlDict[pfx+'SHtoler'] = 0.1
    2273                             if hapData['Pref.Ori.'][6][0] != '':
    2274                                 controlDict[pfx+'SHhkl'] = [eval(a.replace(' ',',')) for a in hapData['Pref.Ori.'][6]]
    2275                             controlDict[pfx+'SHtoler'] = hapData['Pref.Ori.'][7]
    2276                         except IndexError:
    2277                             pass
    2278                         for item in hapData['Pref.Ori.'][5]:
    2279                             hapDict[pfx+item] = hapData['Pref.Ori.'][5][item]
    2280                             if hapData['Pref.Ori.'][2] and not hapDict[pfx+'LeBail']:
    2281                                 hapVary.append(pfx+item)
     2281                            hapVary.append(pfx+item)
    22822282                for item in ['Mustrain','Size']:
    22832283                    controlDict[pfx+item+'Type'] = hapData[item][0]
     
    23182318                    print >>pFile,135*'='
    23192319                    if hapDict[pfx+'LeBail']:
    2320                         print >>pFile,' Perform Lebail extraction'                       
     2320                        print >>pFile,' Perform LeBail extraction'                       
    23212321                    else:
    23222322                        print >>pFile,' Phase fraction  : %10.4f'%(hapData['Scale'][0]),' Refine?',hapData['Scale'][1]
Note: See TracChangeset for help on using the changeset viewer.