Changeset 1852


Ignore:
Timestamp:
May 14, 2015 10:31:16 AM (7 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

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrls.py

    r1836 r1852  
    32003200    ['2DStrain', '2DStrain', 'Strain fitting of 2D data in GSAS-II.htm',
    32013201       'Strain fitting of 2D data'],
    3202        
     3202    ['2DTexture', '2DTexture', 'Texture analysis of 2D data in GSAS-II.htm',
     3203       'Texture analysis of 2D data'],
     3204             
    32033205    ['SAimages', 'SAimages', 'Small Angle Image Processing.htm',
    32043206       'Image Processing of small angle x-ray data'],
  • trunk/GSASIIgrid.py

    r1840 r1852  
    12481248        self.TextureEdit.Append(id=wxID_REFINETEXTURE, kind=wx.ITEM_NORMAL,text='Refine texture',
    12491249            help='Refine the texture coefficients from sequential results')
    1250         self.TextureEdit.Append(id=wxID_CLEARTEXTURE, kind=wx.ITEM_NORMAL,text='Clear texture',
    1251             help='Clear the texture coefficients' )
     1250#        self.TextureEdit.Append(id=wxID_CLEARTEXTURE, kind=wx.ITEM_NORMAL,text='Clear texture',
     1251#            help='Clear the texture coefficients' )
    12521252        self.PostfillDataMenu()
    12531253           
  • trunk/GSASIIphsGUI.py

    r1839 r1852  
    61766176        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataFrame.TextureMenu)
    61776177        G2frame.dataFrame.Bind(wx.EVT_MENU, OnTextureRefine, id=G2gd.wxID_REFINETEXTURE)
    6178         G2frame.dataFrame.Bind(wx.EVT_MENU, OnTextureClear, id=G2gd.wxID_CLEARTEXTURE)
     6178#        G2frame.dataFrame.Bind(wx.EVT_MENU, OnTextureClear, id=G2gd.wxID_CLEARTEXTURE)
    61796179        # Pawley reflections
    61806180        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataFrame.PawleyMenu)
  • 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)
  • trunk/GSASIIstrMain.py

    r1841 r1852  
    208208        G2stIO.SetRigidBodyModels(parmDict,sigDict,rigidbodyDict,printFile)
    209209        G2stIO.SetPhaseData(parmDict,sigDict,Phases,rbIds,covData,restraintDict,printFile)
    210         G2stIO.SetHistogramPhaseData(parmDict,sigDict,Phases,Histograms,pFile=printFile)
    211         G2stIO.SetHistogramData(parmDict,sigDict,Histograms,pFile=printFile)
     210        G2stIO.SetHistogramPhaseData(parmDict,sigDict,Phases,Histograms,calcControls['FFtables'],pFile=printFile)
     211        G2stIO.SetHistogramData(parmDict,sigDict,Histograms,calcControls['FFtables'],pFile=printFile)
    212212        G2stIO.SetUsedHistogramsAndPhases(GPXfile,Histograms,Phases,rigidbodyDict,covData)
    213213        printFile.close()
     
    409409            G2stMth.ApplyRBModels(parmDict,Phases,rigidbodyDict,True)
    410410    #        G2stIO.SetRigidBodyModels(parmDict,sigDict,rigidbodyDict,printFile)
    411             G2stIO.SetHistogramPhaseData(parmDict,sigDict,Phases,Histo,ifPrint,printFile)
    412             G2stIO.SetHistogramData(parmDict,sigDict,Histo,ifPrint,printFile)
     411            G2stIO.SetHistogramPhaseData(parmDict,sigDict,Phases,Histo,None,ifPrint,printFile)
     412            G2stIO.SetHistogramData(parmDict,sigDict,Histo,None,ifPrint,printFile)
    413413            G2stIO.SetUsedHistogramsAndPhases(GPXfile,Histo,Phases,rigidbodyDict,histRefData,makeBack)
    414414            makeBack = False
Note: See TracChangeset for help on using the changeset viewer.