Changeset 1790 for trunk/GSASIIphsGUI.py


Ignore:
Timestamp:
Apr 15, 2015 4:20:11 PM (7 years ago)
Author:
vondreele
Message:

remove unused FORPI from G2strMath
New fitTexture routine to use seq refinement results - seem ok, but needs checking
bring DefaultControls? up to date in G2obj

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r1785 r1790  
    35163516################################################################################
    35173517       
    3518     def UpdateTexture():       
     3518    def UpdateTexture():
     3519               
    35193520        def SetSHCoef():
    35203521            cofNames = G2lat.GenSHCoeff(SGData['SGLaue'],SamSym[textureData['Model']],textureData['Order'])
     
    59275928        histNames = []
    59285929        refData = {}
    5929         SamAngs = {}
     5930        Gangls = {}
    59305931        for name in Histograms.keys():
    59315932            if 'PWDR' in name:
     
    59345935                histNames.append(name)
    59355936                Id = G2gd.GetPatternTreeItemId(G2frame,G2frame.root,name)
     5937                Inst = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,Id,'Instrument Parameters'))
    59365938                Sample = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,Id,'Sample Parameters'))
    5937                 SamAngs[name] = copy.copy([Sample[item] for item in['Omega','Chi','Phi','Azimuth']])
     5939                Gangls[name] = copy.copy([Sample[item] for item in['Phi','Chi','Omega','Azimuth']])
    59385940                RefDict = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,Id,'Reflection Lists'))[phaseName]
    59395941                Refs = RefDict['RefList'].T  #np.array!
    5940                 if 'T' in RefDict['Type']: it = 3  #TOF offset for alp, bet, wave
    59415942                if RefDict['Super']: im = 1     #(3+1) offset for m
    5942                 refData[name] = np.column_stack((Refs[0],Refs[1],Refs[2],Refs[8+im],Refs[12+im+it]))
    5943         Error = G2mth.FitTexture(General,SamAngs,refData)
     5943                if 'T' in RefDict['Type']:
     5944                    it = 3  #TOF offset for alp, bet, wave
     5945                    tth = np.ones_like(Refs[0])*Inst[0]['2-theta'][0]
     5946                    refData[name] = np.column_stack((Refs[0],Refs[1],Refs[2],tth,Refs[8+im],Refs[12+im+it],np.zeros_like(Refs[0])))
     5947                else:   # xray - typical caked 2D image data
     5948                    refData[name] = np.column_stack((Refs[0],Refs[1],Refs[2],Refs[5+im],Refs[8+im],Refs[12+im+it],np.zeros_like(Refs[0])))
     5949        Error = G2mth.FitTexture(General,Gangls,refData)
    59445950        if Error:
    59455951            wx.MessageBox(Error,caption='Fit Texture Error',style=wx.ICON_EXCLAMATION)
    5946         G2ddG.UpdateDData(G2frame,DData,data)
     5952        UpdateTexture()
     5953        G2plt.PlotTexture(G2frame,data,Start=False)           
    59475954           
    59485955    def OnTextureClear(event):
Note: See TracChangeset for help on using the changeset viewer.