Changeset 4401 for trunk


Ignore:
Timestamp:
Apr 14, 2020 1:54:41 PM (3 years ago)
Author:
vondreele
Message:

Add texture index & esd to texture results - all 3 different cases. Shows in lst file or on console.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r4324 r4401  
    29342934   
    29352935    def printSpHarm(textureData,SHtextureSig):
     2936        Tindx = 1.0
     2937        Tvar = 0.0
    29362938        print ('\n Spherical harmonics texture: Order:' + str(textureData['Order']))
    29372939        names = ['omega','chi','phi']
     
    29622964            for name in SHkeys[iBeg:iFin]:
    29632965                if 'C' in name:
     2966                    l = 2.0*eval(name.strip('C'))[0]+1
     2967                    Tindx += SHcoeff[name]**2/l
    29642968                    namstr += '%12s'%(name)
    29652969                    ptstr += '%12.3f'%(SHcoeff[name])
    29662970                    if name in SHtextureSig:
     2971                        Tvar += (2.*SHcoeff[name]*SHtextureSig[name]/l)**2
    29672972                        sigstr += '%12.3f'%(SHtextureSig[name])
    29682973                    else:
     
    29732978            iBeg += 10
    29742979            iFin = min(iBeg+10,nCoeff)
     2980        print(' Texture index J = %.3f(%d)'%(Tindx,int(1000*np.sqrt(Tvar))))
    29752981           
    29762982    def Dict2Values(parmdict, varylist):
  • trunk/GSASIIphsGUI.py

    r4400 r4401  
    45594559                molecSizer.Add(makePDB,0,WACV)               
    45604560                mainSizer.Add(molecSizer,0,WACV)
     4561            G2G.HorizontalLine(mainSizer,G2frame.FRMC)
    45614562               
    45624563            mainSizer.Add(GetAtmChoice(RMCPdict),0,WACV)
     
    1101011011        if Error:
    1101111012            wx.MessageBox(Error,caption='Fit Texture Error',style=wx.ICON_EXCLAMATION)
    11012 #        x = []
    11013 #        y = []
    1101411013        XY = []
    1101511014        for hist in keyList:
     
    1101811017            xy = [x,y]
    1101911018            XY.append(np.array(xy))
    11020 #        XY = np.array(XY)
    1102111019        G2plt.PlotXY(G2frame,XY,XY2=[],labelX='POobs',labelY='POcalc',newPlot=False,Title='Texture fit error')
    1102211020        UpdateTexture()
  • trunk/GSASIIstrIO.py

    r4399 r4401  
    21652165               
    21662166    def PrintSHtextureAndSig(textureData,SHtextureSig):
     2167        Tindx = 1.0
     2168        Tvar = 0.0
    21672169        pFile.write('\n Spherical harmonics texture: Order: %d\n'%textureData['Order'])
    21682170        names = ['omega','chi','phi']
     
    21942196                namstr += '%12s'%(name)
    21952197                ptstr += '%12.3f'%(SHcoeff[name])
     2198                l = 2.0*eval(name.strip('C'))[0]+1
     2199                Tindx += SHcoeff[name]**2/l
    21962200                if name in SHtextureSig:
     2201                    Tvar += (2.*SHcoeff[name]*SHtextureSig[name]/l)**2
    21972202                    sigstr += '%12.3f'%(SHtextureSig[name])
    21982203                else:
     
    22032208            iBeg += 10
    22042209            iFin = min(iBeg+10,nCoeff)
     2210        pFile.write(' Texture index J = %.3f(%d)'%(Tindx,int(1000*np.sqrt(Tvar))))
    22052211           
    22062212    ##########################################################################
     
    29162922       
    29172923    def PrintSHPOAndSig(pfx,hapData,POsig):
     2924        Tindx = 1.0
     2925        Tvar = 0.0
    29182926        pFile.write('\n Spherical harmonics preferred orientation: Order: %d\n'%hapData[4])
    29192927        ptlbls = ' names :'
     
    29232931            ptlbls += '%12s'%(item)
    29242932            ptstr += '%12.3f'%(hapData[5][item])
     2933            l = 2.0*eval(item.strip('C'))[0]+1
     2934            Tindx += hapData[5][item]**2/l
    29252935            if pfx+item in POsig:
     2936                Tvar += (2.*hapData[5][item]*POsig[pfx+item]/l)**2
    29262937                sigstr += '%12.3f'%(POsig[pfx+item])
    29272938            else:
     
    29302941        pFile.write(ptstr+'\n')
    29312942        pFile.write(sigstr+'\n')
     2943        pFile.write('\n Texture index J = %.3f(%d)\n'%(Tindx,int(1000*np.sqrt(Tvar))))
    29322944       
    29332945    def PrintExtAndSig(pfx,hapData,ScalExtSig):
Note: See TracChangeset for help on using the changeset viewer.