Changeset 2746


Ignore:
Timestamp:
Mar 7, 2017 9:26:15 AM (6 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.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIddataGUI.py

    r2745 r2746  
    230230            pass
    231231        if UseList[G2frame.hist]['Mustrain'][0] == 'generalized':
    232             Obj.SetValue("%.3f"%(UseList[G2frame.hist]['Mustrain'][4][pid]))          #reset in case of error
     232            Obj.SetValue("%.1f"%(UseList[G2frame.hist]['Mustrain'][4][pid]))          #reset in case of error
    233233        else:
    234234            Obj.SetValue("%.1f"%(UseList[G2frame.hist]['Mustrain'][1][pid]))          #reset in case of error
     
    449449            dataSizer.Add(strainRef,0,WACV)
    450450#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    451             strainVal = wx.TextCtrl(DData,wx.ID_ANY,'%.5f'%(val),style=wx.TE_PROCESS_ENTER)
     451            strainVal = wx.TextCtrl(DData,wx.ID_ANY,'%.1f'%(val),style=wx.TE_PROCESS_ENTER)
    452452            Indx[strainVal.GetId()] = [G2frame.hist,id]
    453453            strainVal.Bind(wx.EVT_TEXT_ENTER,OnStrainVal)
     
    890890                isoSizer.Add(ResetSizer('isotropic',OnResetSize),0,WACV)
    891891                bottomSizer.Add(isoSizer)
    892                 bottomSizer.Add(IsoSizer(u'size(\xb5m): ','Size','%.5f',
     892                bottomSizer.Add(IsoSizer(u'size(\xb5m): ','Size','%.3f',
    893893                    OnSizeVal,OnSizeRef),0,WACV|wx.BOTTOM,5)
    894894            elif UseList[G2frame.hist]['Size'][0] == 'uniaxial':
     
    900900                bottomSizer.Add(UniSizer('Size',OnSizeAxis),0,WACV)
    901901                bottomSizer.Add(uniSizer)
    902                 bottomSizer.Add(UniDataSizer(u'size(\xb5m): ','Size','%.5f',OnSizeVal,OnSizeRef)
     902                bottomSizer.Add(UniDataSizer(u'size(\xb5m): ','Size','%.3f',OnSizeVal,OnSizeRef)
    903903                    ,0,WACV|wx.BOTTOM,5)
    904904            elif UseList[G2frame.hist]['Size'][0] == 'ellipsoidal':
  • 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.