Changeset 326


Ignore:
Timestamp:
Jun 30, 2011 11:38:20 AM (10 years ago)
Author:
vondreele
Message:

remove cf2py
add inverse polefigure

Location:
trunk
Files:
2 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIlattice.py

    r313 r326  
    670670    elif Laue in ['R3','R3m']:
    671671        DR = np.inner(H4,np.inner(G,H4))
    672         DRH = np.inner(H,np.inner(G,H4))
     672        DHR = np.inner(H,np.inner(G,H4))
    673673       
    674674    else:
     
    682682    elif Laue == '2/m':
    683683        if Naxis == 'a':
    684             BA = H[2]*b/(c-H[1]*cods(al))
     684            BA = H[2]*b/(c-H[1]*cosd(al))
    685685            BB = H[1]*sind(al)**2
    686686        elif Naxis == 'b':
     
    742742       
    743743    return psi,gam
     744
     745BOH = {
     746'L=2':[[],[],[]],
     747'L=4':[[0.30469720,0.36418281],[],[]],
     748'L=6':[[-0.14104740,0.52775103],[],[]],
     749'L=8':[[0.28646862,0.21545346,0.32826995],[],[]],
     750'L=10':[[-0.16413497,0.33078546,0.39371345],[],[]],
     751'L=12':[[0.26141975,0.27266871,0.03277460,0.32589402],
     752    [0.09298802,-0.23773812,0.49446631,0.0],[]],
     753'L=14':[[-0.17557309,0.25821932,0.27709173,0.33645360],[],[]],
     754'L=16':[[0.24370673,0.29873515,0.06447688,0.00377,0.32574495],
     755    [0.12039646,-0.25330128,0.23950998,0.40962508,0.0],[]],
     756'L=18':[[-0.16914245,0.17017340,0.34598142,0.07433932,0.32696037],
     757    [-0.06901768,0.16006562,-0.24743528,0.47110273,0.0],[]],
     758'L=20':[[0.23067026,0.31151832,0.09287682,0.01089683,0.00037564,0.32573563],
     759    [0.13615420,-0.25048007,0.12882081,0.28642879,0.34620433,0.0],[]],
     760'L=22':[[-0.16109560,0.10244188,0.36285175,0.13377513,0.01314399,0.32585583],
     761    [-0.09620055,0.20244115,-0.22389483,0.17928946,0.42017231,0.0],[]],
     762'L=24':[[0.22050742,0.31770654,0.11661736,0.02049853,0.00150861,0.00003426,0.32573505],
     763    [0.13651722,-0.21386648,0.00522051,0.33939435,0.10837396,0.32914497,0.0],
     764    [0.05378596,-0.11945819,0.16272298,-0.26449730,0.44923956,0.0,0.0]],
     765'L=26':[[-0.15435003,0.05261630,0.35524646,0.18578869,0.03259103,0.00186197,0.32574594],
     766    [-0.11306511,0.22072681,-0.18706142,0.05439948,0.28122966,0.35634355,0.0],[]],
     767'L=28':[[0.21225019,0.32031716,0.13604702,0.03132468,0.00362703,0.00018294,0.00000294,0.32573501],
     768    [0.13219496,-0.17206256,-0.08742608,0.32671661,0.17973107,0.02567515,0.32619598,0.0],
     769    [0.07989184,-0.16735346,0.18839770,-0.20705337,0.12926808,0.42715602,0.0,0.0]],
     770'L=30':[[-0.14878368,0.01524973,0.33628434,0.22632587,0.05790047,0.00609812,0.00022898,0.32573594],
     771    [-0.11721726,0.20915005,-0.11723436,-0.07815329,0.31318947,0.13655742,0.33241385,0.0],
     772    [-0.04297703,0.09317876,-0.11831248,0.17355132,-0.28164031,0.42719361,0.0,0.0]],
     773'L=32':[[0.20533892,0.32087437,0.15187897,0.04249238,0.00670516,0.00054977,0.00002018,0.00000024,0.32573501],
     774    [0.12775091,-0.13523423,-0.14935701,0.28227378,0.23670434,0.05661270,0.00469819,0.32578978,0.0],
     775    [0.09703829,-0.19373733,0.18610682,-0.14407046,0.00220535,0.26897090,0.36633402,0.0,0.0]],
     776'L=34':[[-0.14409234,-0.01343681,0.31248977,0.25557722,0.08571889,0.01351208,0.00095792,0.00002550,0.32573508],
     777    [-0.11527834,0.18472133,-0.04403280,-0.16908618,0.27227021,0.21086614,0.04041752,0.32688152,0.0],
     778    [-0.06773139,0.14120811,-0.15835721,0.18357456,-0.19364673,0.08377174,0.43116318,0.0,0.0]]
     779}
    744780   
     781def Glnh(Start,SHCoef,psi,gam,SamSym):
     782    import pytexture as ptx
     783    RSQPI = 0.5641895835478
     784    SQ2 = 1.414213562373
     785
     786    if Start:
     787        ptx.pyqlmninit()
     788        Start = False
     789    Fln = np.zeros(len(SHCoef))
     790    for i,term in enumerate(SHCoef):
     791         l,m,n = eval(term.strip('C'))
     792         lNorm = 4.*np.pi/(2.*l+1.)
     793         pcrs = ptx.pyplmpsi(l,m,1,psi)*RSQPI
     794         if m == 0:
     795             pcrs /= SQ2
     796         if SamSym in ['mmm',]:
     797             Ksl = pcrs*cosd(m*gam)
     798         else:
     799             Ksl = pcrs*(cosd(m*gam)+sind(m*gam))
     800         Fln[i] = SHCoef[term]*Ksl*lNorm
     801    ODFln = dict(zip(SHCoef.keys(),list(zip(SHCoef.values(),Fln))))
     802    return ODFln
     803
    745804def Flnh(Start,SHCoef,phi,beta,SGData):
    746805    import pytexture as ptx
    747     BOH = {
    748     'L=2':[[],[],[]],
    749     'L=4':[[0.30469720,0.36418281],[],[]],
    750     'L=6':[[-0.14104740,0.52775103],[],[]],
    751     'L=8':[[0.28646862,0.21545346,0.32826995],[],[]],
    752     'L=10':[[-0.16413497,0.33078546,0.39371345],[],[]],
    753     'L=12':[[0.26141975,0.27266871,0.03277460,0.32589402],
    754         [0.09298802,-0.23773812,0.49446631,0.0],[]],
    755     'L=14':[[-0.17557309,0.25821932,0.27709173,0.33645360],[],[]],
    756     'L=16':[[0.24370673,0.29873515,0.06447688,0.00377,0.32574495],
    757         [0.12039646,-0.25330128,0.23950998,0.40962508,0.0],[]],
    758     'L=18':[[-0.16914245,0.17017340,0.34598142,0.07433932,0.32696037],
    759         [-0.06901768,0.16006562,-0.24743528,0.47110273,0.0],[]],
    760     'L=20':[[0.23067026,0.31151832,0.09287682,0.01089683,0.00037564,0.32573563],
    761         [0.13615420,-0.25048007,0.12882081,0.28642879,0.34620433,0.0],[]],
    762     'L=22':[[-0.16109560,0.10244188,0.36285175,0.13377513,0.01314399,0.32585583],
    763         [-0.09620055,0.20244115,-0.22389483,0.17928946,0.42017231,0.0],[]],
    764     'L=24':[[0.22050742,0.31770654,0.11661736,0.02049853,0.00150861,0.00003426,0.32573505],
    765         [0.13651722,-0.21386648,0.00522051,0.33939435,0.10837396,0.32914497,0.0],
    766         [0.05378596,-0.11945819,0.16272298,-0.26449730,0.44923956,0.0,0.0]],
    767     'L=26':[[-0.15435003,0.05261630,0.35524646,0.18578869,0.03259103,0.00186197,0.32574594],
    768         [-0.11306511,0.22072681,-0.18706142,0.05439948,0.28122966,0.35634355,0.0],[]],
    769     'L=28':[[0.21225019,0.32031716,0.13604702,0.03132468,0.00362703,0.00018294,0.00000294,0.32573501],
    770         [0.13219496,-0.17206256,-0.08742608,0.32671661,0.17973107,0.02567515,0.32619598,0.0],
    771         [0.07989184,-0.16735346,0.18839770,-0.20705337,0.12926808,0.42715602,0.0,0.0]],
    772     'L=30':[[-0.14878368,0.01524973,0.33628434,0.22632587,0.05790047,0.00609812,0.00022898,0.32573594],
    773         [-0.11721726,0.20915005,-0.11723436,-0.07815329,0.31318947,0.13655742,0.33241385,0.0],
    774         [-0.04297703,0.09317876,-0.11831248,0.17355132,-0.28164031,0.42719361,0.0,0.0]],
    775     'L=32':[[0.20533892,0.32087437,0.15187897,0.04249238,0.00670516,0.00054977,0.00002018,0.00000024,0.32573501],
    776         [0.12775091,-0.13523423,-0.14935701,0.28227378,0.23670434,0.05661270,0.00469819,0.32578978,0.0],
    777         [0.09703829,-0.19373733,0.18610682,-0.14407046,0.00220535,0.26897090,0.36633402,0.0,0.0]],
    778     'L=34':[[-0.14409234,-0.01343681,0.31248977,0.25557722,0.08571889,0.01351208,0.00095792,0.00002550,0.32573508],
    779         [-0.11527834,0.18472133,-0.04403280,-0.16908618,0.27227021,0.21086614,0.04041752,0.32688152,0.0],
    780         [-0.06773139,0.14120811,-0.15835721,0.18357456,-0.19364673,0.08377174,0.43116318,0.0,0.0]]
    781     }
    782806   
    783807    FORPI = 12.5663706143592
     
    802826             if n == 0:
    803827                 pcrs /= SQ2
    804              if SGData['SGLaue'] in ['mmm','4/mmm','6/mmm']:
    805                  if n%6 == 3:
    806                      Kcl = pcrs*sind(n*beta)
    807                  else:
    808                      Kcl = pcrs*cosd(n*beta)
    809              elif SGData['SGLaue'] in ['3mR','3m1','31m']:
    810                  Kcl = pcrs*cosd(n*beta)
     828             if SGData['SGLaue'] in ['mmm','4/mmm','6/mmm','R3mR','3m1','31m']:
     829                if SGData['SGLaue'] in ['3mR','3m1','31m']:
     830                    if n%6 == 3:
     831                        Kcl = pcrs*sind(n*beta)
     832                    else:
     833                        Kcl = pcrs*cosd(n*beta)
     834                else:
     835                    Kcl = pcrs*cosd(n*beta)
    811836             else:
    812837                 Kcl = pcrs*(cosd(n*beta)+sind(n*beta))
     
    814839    ODFln = dict(zip(SHCoef.keys(),list(zip(SHCoef.values(),Fln))))
    815840    return ODFln
    816    
    817 def textureIndex(SHCoef):
    818     Tindx = 1.0
    819     for term in SHCoef:
    820         l,m,n = eval(term.strip('C'))
    821         Tindx += SHCoef[term]**2/(2.0*l+1.)
    822     return Tindx
    823    
    824841   
    825842def polfcal(ODFln,SamSym,psi,gam):
     
    844861            PolVal += ODFln[term][1]*Ksl
    845862    return PolVal
     863   
     864def invpolfcal(ODFln,SGData,phi,beta):
     865    import pytexture as ptx
     866   
     867    FORPI = 12.5663706143592
     868    RSQPI = 0.5641895835478
     869    SQ2 = 1.414213562373
     870
     871    invPolVal = np.ones_like(beta)
     872    for term in ODFln:
     873        if abs(ODFln[term][1]) > 1.e-3:
     874            l,m,n = eval(term.strip('C'))
     875            if SGData['SGLaue'] in ['m3','m3m']:
     876                Kcl = 0.0
     877                for j in range(0,l+1,4):
     878                    im = j/4+1
     879                    pcrs = ptx.pyplmpsi(l,j,len(beta),phi)
     880                    Kcl += BOH['L='+str(l)][n-1][im-1]*pcrs*cosd(j*beta)       
     881            else:                #all but cubic
     882                pcrs = ptx.pyplmpsi(l,n,len(beta),phi)*RSQPI
     883                if n == 0:
     884                    pcrs /= SQ2
     885                if SGData['SGLaue'] in ['mmm','4/mmm','6/mmm','R3mR','3m1','31m']:
     886                   if SGData['SGLaue'] in ['3mR','3m1','31m']:
     887                       if n%6 == 3:
     888                           Kcl = pcrs*sind(n*beta)
     889                       else:
     890                           Kcl = pcrs*cosd(n*beta)
     891                   else:
     892                       Kcl = pcrs*cosd(n*beta)
     893                else:
     894                    Kcl = pcrs*(cosd(n*beta)+sind(n*beta))
     895            invPolVal += ODFln[term][1]*Kcl
     896    return invPolVal
     897   
     898   
     899def textureIndex(SHCoef):
     900    Tindx = 1.0
     901    for term in SHCoef:
     902        l,m,n = eval(term.strip('C'))
     903        Tindx += SHCoef[term]**2/(2.0*l+1.)
     904    return Tindx
    846905   
    847906# output from uctbx computed on platform darwin on 2010-05-28
  • trunk/GSASIIphsGUI.py

    r313 r326  
    18771877            return newSHCoef
    18781878       
    1879         def OnShowData(event):
    1880             Obj = event.GetEventObject()
    1881             hist = Indx[Obj.GetId()]
    1882             UseList[hist]['Show'] = Obj.GetValue()
    1883             UpdateDData()
    1884             G2plt.PlotStrain(self,data)
    1885            
    18861879        def OnShOrder(event):
    18871880            textureData['Order'] = int(shOrder.GetValue())
     
    19151908            Obj.SetValue('%8.2f'%(value))
    19161909            textureData[valIndx[Obj.GetId()]][1] = value
    1917             G2plt.PlotTexture(self,data,newPlot=False)
    19181910           
    19191911        def OnODFValue(event):
     
    19291921        def OnPfType(event):
    19301922            textureData['PlotType'] = pfType.GetValue()
     1923            print 'before'
    19311924            UpdateDData()
    1932             G2plt.PlotTexture(self,data,newPlot=False)
     1925            print 'after'
     1926            G2plt.PlotTexture(self,data,newPlot=True)
    19331927           
    19341928        def OnPFValue(event):
    19351929            Obj = event.GetEventObject()
    1936             if textureData['PlotType'] in ['Pole figure','Pole distribution','Axial pole distribution']:
     1930            if textureData['PlotType'] in ['Pole figure','Axial pole distribution']:
    19371931                try:
    19381932                    value = '['+Obj.GetValue()+']'
     
    19451939            else:
    19461940                try:
    1947                     value =  float(Obj.GetValue())
    1948                 except ValueError:
    1949                     value = textureData['PFxyz'][pfIndx[Obj.GetId()]]
    1950                 Obj.SetValue('%3.1f'%(value))
    1951                 textureData['PFxyz'][pfIndx[Obj.GetId()]] = value
     1941                    value =  '['+Obj.GetValue()+']'
     1942                    xyz = eval(value)
     1943                except:
     1944                    value = str(textureData['PFhkl'])
     1945                    xyz = eval(value)
     1946                Obj.SetValue('%3.1f,%3.1f,%3.1f'%(xyz[0],xyz[1],xyz[2]))
     1947                textureData['PFxyz'] = xyz
    19521948            G2plt.PlotTexture(self,data,newPlot=True)
    19531949       
     1950        def OnShowData(event):
     1951            Obj = event.GetEventObject()
     1952            hist = Indx[Obj.GetId()]
     1953            UseList[hist]['Show'] = Obj.GetValue()
     1954            UpdateDData()
     1955            G2plt.PlotStrain(self,data)
     1956           
    19541957        def OnScaleRef(event):
    19551958            Obj = event.GetEventObject()
     
    21572160        PFSizer = wx.BoxSizer(wx.HORIZONTAL)
    21582161        PFSizer.Add(wx.StaticText(dataDisplay,-1,'Texture plot type: '),0,wx.ALIGN_CENTER_VERTICAL)
    2159         choices = ['Pole figure','Pole distribution','Axial pole distribution','Inverse pole figure','Inverse distribution']           
     2162        choices = ['Axial pole distribution','Pole figure','Inverse pole figure']           
    21602163        pfType = wx.ComboBox(dataDisplay,-1,value=str(textureData['PlotType']),choices=choices,
    21612164            style=wx.CB_READONLY|wx.CB_DROPDOWN)
     
    21632166        PFSizer.Add(pfType,0,wx.ALIGN_CENTER_VERTICAL)
    21642167        mainSizer.Add(PFSizer,0,wx.ALIGN_CENTER_VERTICAL)
    2165         if textureData['PlotType'] in ['Pole figure','Pole distribution','Axial pole distribution']:
     2168        if textureData['PlotType'] in ['Pole figure','Axial pole distribution']:
    21662169            PFSizer.Add(wx.StaticText(dataDisplay,-1,'  Display pole figure for HKL: '),0,wx.ALIGN_CENTER_VERTICAL)
    2167 #            pfIndx = {}
    2168 #            for i in range(3):
    2169 #                pfVal = wx.TextCtrl(dataDisplay,wx.ID_ANY,'%3d'%(textureData['PFhkl'][i]),size=(40,20),style=wx.TE_PROCESS_ENTER)
    2170 #                pfIndx[pfVal.GetId()] = i
    2171 #                pfVal.Bind(wx.EVT_TEXT_ENTER,OnPFValue)
    2172 #                pfVal.Bind(wx.EVT_KILL_FOCUS,OnPFValue)
    2173 #                PFSizer.Add(pfVal,0,wx.ALIGN_CENTER_VERTICAL)
    21742170            PH = textureData['PFhkl']
    21752171            pfVal = wx.TextCtrl(dataDisplay,-1,'%d,%d,%d'%(PH[0],PH[1],PH[2]),style=wx.TE_PROCESS_ENTER)
     
    21792175        else:
    21802176            PFSizer.Add(wx.StaticText(dataDisplay,-1,'  Display inverse pole figure for XYZ: '),0,wx.ALIGN_CENTER_VERTICAL)
    2181             pfIndx = {}
    2182             for i in range(3):
    2183                 pfVal = wx.TextCtrl(dataDisplay,wx.ID_ANY,'%3.1f'%(textureData['PFxyz'][i]),size=(40,20),style=wx.TE_PROCESS_ENTER)
    2184                 pfIndx[pfVal.GetId()] = i
    2185                 pfVal.Bind(wx.EVT_TEXT_ENTER,OnPFValue)
    2186                 pfVal.Bind(wx.EVT_KILL_FOCUS,OnPFValue)
    2187                 PFSizer.Add(pfVal,0,wx.ALIGN_CENTER_VERTICAL)
     2177            PX = textureData['PFxyz']
     2178            pfVal = wx.TextCtrl(dataDisplay,-1,'%3.1f,%3.1f,%3.1f'%(PX[0],PX[1],PX[2]),style=wx.TE_PROCESS_ENTER)
     2179            pfVal.Bind(wx.EVT_TEXT_ENTER,OnPFValue)
     2180            pfVal.Bind(wx.EVT_KILL_FOCUS,OnPFValue)
     2181            PFSizer.Add(pfVal,0,wx.ALIGN_CENTER_VERTICAL)
    21882182        mainSizer.Add((0,5),0)
    21892183        mainSizer.Add(wx.StaticText(dataDisplay,-1,'Sample orientation angles: '),0,wx.ALIGN_CENTER_VERTICAL)
  • trunk/GSASIIplot.py

    r313 r326  
    11141114    Vol = cell[6]
    11151115    useList = data['Histograms']
     1116    for item in useList:
     1117        if useList[item]['Show']:
     1118            break
     1119    else:
     1120        self.G2plotNB.Delete('Microstrain')
     1121        return            #nothing to show!!
     1122   
    11161123    numPlots = len(useList)
    11171124   
     
    11211128        Page.figure.clf()
    11221129        Plot = mp3d.Axes3D(Page.figure)
     1130        if not Page.IsShown():
     1131            Page.Show()
    11231132    except ValueError:
    11241133        Plot = mp3d.Axes3D(self.G2plotNB.add3D('Microstrain'))
     
    11891198    dict generalData contains all phase info needed which is in data
    11901199    '''
     1200
    11911201    shModels = ['cylindrical','none','shear - 2/m','rolling - mmm']
    11921202    SamSym = dict(zip(shModels,['0','-1','2/m','mmm']))
     
    11951205    SGData = generalData['SGData']
    11961206    textureData = generalData['SH Texture']
     1207    if not textureData['Order']:
     1208        self.G2plotNB.Delete('Texture')
     1209        return                  #no plot!!
    11971210    SHData = generalData['SH Texture']
    11981211    SHCoef = SHData['SH Coeff'][1]
    11991212    cell = generalData['Cell'][1:7]
    12001213    Start = True
    1201                
     1214   
     1215    def OnMotion(event):
     1216        Page.canvas.SetToolTipString('')
     1217        if event.xdata and event.ydata:                 #avoid out of frame errors
     1218            if 'Pole figure' in SHData['PlotType']:
     1219                xpos = event.xdata
     1220                ypos = event.ydata
     1221                Int = 0
     1222                if xpos**2+ypos**2 < 1.0:
     1223                    r,p = 2.*npasind(np.sqrt(xpos**2+ypos**2)*0.707106782),npatan2d(ypos,xpos)
     1224                    pf = G2lat.polfcal(ODFln,SamSym[textureData['Model']],np.array([r,]),np.array([p,]))
     1225                    self.G2plotNB.status.SetFields(['','phi =%9.3f, gam =%9.3f, MRD =%9.3f'%(r,p,pf)])
     1226   
    12021227    try:
    12031228        plotNum = self.G2plotNB.plotList.index('Texture')
     
    12111236        plotNum = self.G2plotNB.plotList.index('Texture')
    12121237        Page = self.G2plotNB.nb.GetPage(plotNum)
     1238        Page.canvas.mpl_connect('motion_notify_event', OnMotion)
    12131239        Page.SetFocus()
    12141240   
     
    12181244        ODFln = G2lat.Flnh(Start,SHCoef,phi,beta,SGData)
    12191245        X = np.linspace(0,90.0,26)
    1220         Y = np.zeros_like(X)
    1221         for i,a in enumerate(X):
    1222             Y[i] = G2lat.polfcal(ODFln,SamSym[textureData['Model']],a,0.0)
     1246        Y = G2lat.polfcal(ODFln,SamSym[textureData['Model']],X,0.0)
    12231247        Plot.plot(X,Y,color='k',label=str(SHData['PFhkl']))
    12241248        Plot.legend(loc='best')
     
    12271251        Plot.set_ylabel('MRD',fontsize=14)
    12281252       
    1229        
    12301253    else:       
    1231 #        self.G2plotNB.status.SetStatusText('Adjust frame size to get desired aspect ratio',1)
    1232         if 'inverse' in SHData['PlotType']:
     1254        if 'Inverse' in SHData['PlotType']:
    12331255            PX = np.array(SHData['PFxyz'])
    1234            
     1256            gam = atan2d(PX[0],PX[1])
     1257            xy = math.sqrt(PX[0]**2+PX[1]**2)
     1258            xyz = math.sqrt(PX[0]**2+PX[1]**2+PX[2]**2)
     1259            psi = asind(xy/xyz)
     1260            npts = 201
     1261            ODFln = G2lat.Glnh(Start,SHCoef,psi,gam,SamSym[textureData['Model']])
     1262            X,Y = np.meshgrid(np.linspace(1.,-1.,npts),np.linspace(-1.,1.,npts))
     1263            R,P = np.sqrt(X**2+Y**2).flatten(),npatan2d(X,Y).flatten()
     1264            R = np.where(R <= 1.,2.*npasind(R*0.70710678),0.0)
     1265            Z = np.zeros_like(R)
     1266            time0 = time.time()
     1267            Z = G2lat.invpolfcal(ODFln,SGData,R,P)
     1268            print 'inverse time:',time.time()-time0
     1269            Z = np.reshape(Z,(npts,npts))
     1270            CS = Plot.contour(Y,X,Z,aspect='equal')
     1271            Plot.clabel(CS,fontsize=9,inline=1)
     1272            Img = Plot.imshow(Z.T,aspect='equal',cmap='binary',extent=[-1,1,-1,1])
     1273            if newPlot:
     1274                Page.figure.colorbar(Img)
     1275                newPlot = False
     1276            Plot.set_title('Inverse pole figure for XYZ='+str(SHData['PFxyz']))
     1277            print 'inverse pole figure',Img
     1278                       
    12351279        else:
    12361280            PH = np.array(SHData['PFhkl'])
     
    12421286            R = np.where(R <= 1.,2.*npasind(R*0.70710678),0.0)
    12431287            Z = np.zeros_like(R)
     1288            time0 = time.time()
    12441289            Z = G2lat.polfcal(ODFln,SamSym[textureData['Model']],R,P)
     1290            print 'polfig time:',time.time()-time0
    12451291            Z = np.reshape(Z,(npts,npts))
    1246             Img = Plot.imshow(Z.T,aspect='equal',cmap='binary')
     1292            CS = Plot.contour(Y,X,Z,aspect='equal')
     1293            Plot.clabel(CS,fontsize=9,inline=1)
     1294            Img = Plot.imshow(Z.T,aspect='equal',cmap='binary',extent=[-1,1,-1,1])
    12471295            if newPlot:
    12481296                Page.figure.colorbar(Img)
    12491297                newPlot = False
    12501298            Plot.set_title('Pole figure for HKL='+str(SHData['PFhkl']))
     1299            print 'pole figure',Img
    12511300    Page.canvas.draw()
    1252     return
    1253 
    12541301           
    12551302def PlotExposedImage(self,newPlot=False,event=None):
Note: See TracChangeset for help on using the changeset viewer.