Changeset 327


Ignore:
Timestamp:
Jul 1, 2011 12:10:28 PM (12 years ago)
Author:
vondreele
Message:

fix to path name for atomdata.dat
fix to texture display - can't have colorbars!
put in bit to show #threads used

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r311 r327  
    2121import wx
    2222import matplotlib as mpl
     23import mkl
    2324
    2425# load the GSAS routines
     
    4142print "scipy:      ",sp.__version__
    4243print "OpenGL:     ",ogl.__version__
     44print "Max threads ",mkl.get_max_threads()
    4345
    4446__version__ = '0.1.5'
  • trunk/GSASIIElem.py

    r291 r327  
    3434    ElS = El.upper()
    3535    ElS = ElS.rjust(2)
    36     filename = os.path.join(sys.path[1],'atmdata.dat')
     36    filename = os.path.join(os.path.split(sys.argv[0])[0],'atmdata.dat')
    3737    try:
    3838        FFdata = open(filename,'Ur')
     
    8484    else:
    8585        ElS = El.upper()[:1].rjust(2)
    86     filename = os.path.join(sys.path[1],'atmdata.dat')
     86    filename = os.path.join(os.path.split(sys.argv[0])[0],'atmdata.dat')
    8787    try:
    8888        FFdata = open(filename,'Ur')
     
    131131    ElS = El.upper()
    132132    ElS = ElS.ljust(2)
    133     filename = os.path.join(sys.path[1],'Xsect.dat')
     133    filename = os.path.join(os.path.split(sys.argv[0])[0],'Xsect.dat')
    134134    try:
    135135        xsec = open(filename,'Ur')
     
    206206    ElS = El.upper()
    207207    ElS = ElS.rjust(2)
    208     filename = os.path.join(sys.path[1],'atmdata.dat')
     208    filename = os.path.join(os.path.split(sys.argv[0])[0],'atmdata.dat')
    209209    try:
    210210        FFdata = open(filename,'Ur')
  • trunk/GSASIIphsGUI.py

    r326 r327  
    19211921        def OnPfType(event):
    19221922            textureData['PlotType'] = pfType.GetValue()
    1923             print 'before'
    19241923            UpdateDData()
    1925             print 'after'
    1926             G2plt.PlotTexture(self,data,newPlot=True)
     1924            G2plt.PlotTexture(self,data)
    19271925           
    19281926        def OnPFValue(event):
     
    19461944                Obj.SetValue('%3.1f,%3.1f,%3.1f'%(xyz[0],xyz[1],xyz[2]))
    19471945                textureData['PFxyz'] = xyz
    1948             G2plt.PlotTexture(self,data,newPlot=True)
     1946            G2plt.PlotTexture(self,data)
    19491947       
    19501948        def OnShowData(event):
     
    26072605            UpdateDData()
    26082606            G2plt.PlotStrain(self,data)
    2609             G2plt.PlotTexture(self,data,newPlot=True)
     2607            G2plt.PlotTexture(self,data,Start=True)
    26102608        elif text == 'Draw Options':
    26112609            self.dataFrame.SetMenuBar(self.dataFrame.BlankMenu)
  • trunk/GSASIIplot.py

    r326 r327  
    11921192    Page.canvas.draw()
    11931193   
    1194 def PlotTexture(self,data,newPlot=False):
     1194def PlotTexture(self,data,newPlot=False,Start=False):
    11951195    '''Pole figure, inverse pole figure(?), 3D pole distribution and 3D inverse pole distribution(?)
    11961196    plotting; Need way to select 
     
    12111211    SHCoef = SHData['SH Coeff'][1]
    12121212    cell = generalData['Cell'][1:7]
    1213     Start = True
    12141213   
    12151214    def OnMotion(event):
     
    12641263            R = np.where(R <= 1.,2.*npasind(R*0.70710678),0.0)
    12651264            Z = np.zeros_like(R)
    1266             time0 = time.time()
    12671265            Z = G2lat.invpolfcal(ODFln,SGData,R,P)
    1268             print 'inverse time:',time.time()-time0
    12691266            Z = np.reshape(Z,(npts,npts))
    12701267            CS = Plot.contour(Y,X,Z,aspect='equal')
     
    12721269            Img = Plot.imshow(Z.T,aspect='equal',cmap='binary',extent=[-1,1,-1,1])
    12731270            if newPlot:
    1274                 Page.figure.colorbar(Img)
     1271#                Page.figure.colorbar(Img)    #colorbar fails - crashes gsasii
    12751272                newPlot = False
    12761273            Plot.set_title('Inverse pole figure for XYZ='+str(SHData['PFxyz']))
    1277             print 'inverse pole figure',Img
    12781274                       
    12791275        else:
     
    12861282            R = np.where(R <= 1.,2.*npasind(R*0.70710678),0.0)
    12871283            Z = np.zeros_like(R)
    1288             time0 = time.time()
    12891284            Z = G2lat.polfcal(ODFln,SamSym[textureData['Model']],R,P)
    1290             print 'polfig time:',time.time()-time0
    12911285            Z = np.reshape(Z,(npts,npts))
    12921286            CS = Plot.contour(Y,X,Z,aspect='equal')
     
    12941288            Img = Plot.imshow(Z.T,aspect='equal',cmap='binary',extent=[-1,1,-1,1])
    12951289            if newPlot:
    1296                 Page.figure.colorbar(Img)
     1290#                Page.figure.colorbar(Img)    #colorbar fails - crashes gsasii
    12971291                newPlot = False
    12981292            Plot.set_title('Pole figure for HKL='+str(SHData['PFhkl']))
    1299             print 'pole figure',Img
    13001293    Page.canvas.draw()
     1294
    13011295           
    13021296def PlotExposedImage(self,newPlot=False,event=None):
Note: See TracChangeset for help on using the changeset viewer.