Changeset 1852 for trunk/GSASIIstrIO.py


Ignore:
Timestamp:
May 14, 2015 10:31:16 AM (8 years ago)
Author:
vondreele
Message:

addmtexture analysis tutorial to list in G2ctrls
remove Clear Texture - not needed (commented out for now)
Add print of resonant form factors for x-ray & cw neutron refinements. Appears in the results part of the ,lst file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrIO.py

    r1843 r1852  
    250250                    FP,FPP,Mu = G2el.FPcalc(Orbs, keV)
    251251                    FFtables[El][hfx+'FP'] = FP
    252                     FFtables[El][hfx+'FPP'] = FPP               
     252                    FFtables[El][hfx+'FPP'] = FPP
     253                   
     254def PrintFprime(FFtables,pfx,pFile):
     255    print >>pFile,'\n Resonant form factors:'
     256    Elstr = ' Element:'
     257    FPstr = " f'     :"
     258    FPPstr = ' f"     :'
     259    for El in FFtables:
     260        Elstr += ' %8s'%(El)
     261        FPstr += ' %8.3f'%(FFtables[El][pfx+'FP'])
     262        FPPstr += ' %8.3f'%(FFtables[El][pfx+'FPP'])
     263    print >>pFile,Elstr
     264    print >>pFile,FPstr
     265    print >>pFile,FPPstr
    253266           
    254267def GetPhaseNames(GPXfile):
     
    22432256    return hapVary,hapDict,controlDict
    22442257   
    2245 def SetHistogramPhaseData(parmDict,sigDict,Phases,Histograms,Print=True,pFile=None):
     2258def SetHistogramPhaseData(parmDict,sigDict,Phases,Histograms,FFtables,Print=True,pFile=None):
    22462259    'needs a doc string'
    22472260   
     
    25032516                Histogram['Residuals'][str(pId)+'::Name'] = phase
    25042517                pfx = str(pId)+':'+str(hId)+':'
     2518                hfx = ':%s:'%(hId)
    25052519                if 'PWDR' in histogram:
    25062520                    print >>pFile,' Final refinement RF, RF^2 = %.2f%%, %.2f%% on %d reflections'   \
     
    25272541                   
    25282542                elif 'HKLF' in histogram:
     2543                    Inst = Histogram['Instrument Parameters'][0]
    25292544                    print >>pFile,' Final refinement RF, RF^2 = %.2f%%, %.2f%% on %d reflections (%d user rejected, %d sp.gp.extinct)'   \
    25302545                        %(Histogram['Residuals'][pfx+'Rf'],Histogram['Residuals'][pfx+'Rf^2'],Histogram['Residuals'][pfx+'Nref'],
    25312546                        Histogram['Residuals'][pfx+'Nrej'],Histogram['Residuals'][pfx+'Next'])
     2547                    if FFtables != None and 'T' not in Inst['Type'][0]:
     2548                        PrintFprime(FFtables,hfx,pFile)
    25322549                    print >>pFile,' HKLF histogram weight factor = ','%.3f'%(Histogram['wtFactor'])
    25332550                    if pfx+'Scale' in ScalExtSig:
     
    27752792    return histVary,histDict,controlDict
    27762793   
    2777 def SetHistogramData(parmDict,sigDict,Histograms,Print=True,pFile=None):
     2794def SetHistogramData(parmDict,sigDict,Histograms,FFtables,Print=True,pFile=None):
    27782795    'needs a doc string'
    27792796   
     
    29772994            if Print:
    29782995                print >>pFile,' Instrument type: ',Sample['Type']
     2996                if FFtables != None and 'T' not in Inst['Type'][0]:
     2997                    PrintFprime(FFtables,pfx,pFile)
    29792998                PrintSampleParmsSig(Sample,sampSig)
    29802999                PrintInstParmsSig(Inst,instSig)
Note: See TracChangeset for help on using the changeset viewer.