Changeset 1771


Ignore:
Timestamp:
Mar 30, 2015 2:04:51 PM (7 years ago)
Author:
vondreele
Message:

revise spherical harmonics lst output to have reasonable line lengths

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrIO.py

    r1762 r1771  
    907907        print >>pFile,line
    908908        print >>pFile,'\n Texture coefficients:'
    909         ptlbls = ' names :'
    910         ptstr =  ' values:'
    911909        SHcoeff = textureData['SH Coeff'][1]
    912         for item in SHcoeff:
    913             ptlbls += '%12s'%(item)
    914             ptstr += '%12.4f'%(SHcoeff[item])
    915         print >>pFile,ptlbls
    916         print >>pFile,ptstr
     910        SHkeys = SHcoeff.keys()
     911        nCoeff = len(SHcoeff)
     912        nBlock = nCoeff/10+1
     913        iBeg = 0
     914        iFin = min(iBeg+10,nCoeff)
     915        for block in range(nBlock):
     916            ptlbls = ' names :'
     917            ptstr =  ' values:'
     918            for item in SHkeys[iBeg:iFin]:
     919                ptlbls += '%12s'%(item)
     920                ptstr += '%12.4f'%(SHcoeff[item])
     921            print >>pFile,ptlbls
     922            print >>pFile,ptstr
     923            iBeg += 10
     924            iFin = min(iBeg+10,nCoeff)
    917925       
    918926    def MakeRBParms(rbKey,phaseVary,phaseDict):
     
    16971705        print >>pFile,sigstr
    16981706        print >>pFile,'\n Texture coefficients:'
    1699         namstr = '  names :'
    1700         ptstr =  '  values:'
    1701         sigstr = '  esds  :'
    17021707        SHcoeff = textureData['SH Coeff'][1]
    1703         for name in SHcoeff:
    1704             namstr += '%12s'%(name)
    1705             ptstr += '%12.3f'%(SHcoeff[name])
    1706             if name in SHtextureSig:
    1707                 sigstr += '%12.3f'%(SHtextureSig[name])
    1708             else:
    1709                 sigstr += 12*' '
    1710         print >>pFile,namstr
    1711         print >>pFile,ptstr
    1712         print >>pFile,sigstr
     1708        SHkeys = SHcoeff.keys()
     1709        nCoeff = len(SHcoeff)
     1710        nBlock = nCoeff/10+1
     1711        iBeg = 0
     1712        iFin = min(iBeg+10,nCoeff)
     1713        for block in range(nBlock):
     1714            namstr = '  names :'
     1715            ptstr =  '  values:'
     1716            sigstr = '  esds  :'
     1717            for name in SHkeys[iBeg:iFin]:
     1718                namstr += '%12s'%(name)
     1719                ptstr += '%12.3f'%(SHcoeff[name])
     1720                if name in SHtextureSig:
     1721                    sigstr += '%12.3f'%(SHtextureSig[name])
     1722                else:
     1723                    sigstr += 12*' '
     1724            print >>pFile,namstr
     1725            print >>pFile,ptstr
     1726            print >>pFile,sigstr
     1727            iBeg += 10
     1728            iFin = min(iBeg+10,nCoeff)
    17131729           
    17141730    print >>pFile,'\n Phases:'
Note: See TracChangeset for help on using the changeset viewer.