Changeset 3963


Ignore:
Timestamp:
May 9, 2019 8:48:07 PM (2 years ago)
Author:
vondreele
Message:

change pylab to pyplot in fprime & absorb
undo the addition of S301 to the set for 3m1 Laue groups. Did bad things even if the fit was "improved". Can be reinstated if I can work out what went wrong.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Absorb.py

    r3826 r3963  
    1010import numpy as np
    1111import matplotlib as mpl
    12 import pylab
     12import matplotlib.pyplot as plt
    1313import sys
    1414import GSASIIpath
     
    327327
    328328    def OnExitMenu(self, event):
    329         pylab.close('all')
     329        plt.close('all')
    330330        self.Close()
    331331        self.Destroy()
     
    583583            newPlot = False
    584584        except:
    585             self.fplot = pylab.figure(facecolor='white',figsize=(8,6))  #BTW: default figsize is (8,6)
     585            self.fplot = plt.figure(facecolor='white',figsize=(8,6))  #BTW: default figsize is (8,6)
    586586            self.fplot.canvas.set_window_title('X-Ray Absorption')
    587587            self.fplot.canvas.mpl_connect('pick_event', self.OnPick)
     
    616616        if newPlot:
    617617            newPlot = False
    618             pylab.show()
     618            plt.show()
    619619        else:
    620620            if rePlot:
     
    625625                xylim = []
    626626                tb.push_current()
    627             pylab.draw()
     627            plt.draw()
    628628       
    629629    def OnPick(self, event):
  • trunk/GSASIIspc.py

    r3961 r3963  
    30143014    if laue in ['m3','m3m']:
    30153015        return ['S400','S220']
    3016     elif laue in ['6/m','6/mmm']:
     3016    elif laue in ['6/m','6/mmm','3m1']:
    30173017        return ['S400','S004','S202']
    3018     elif laue in ['31m','3','3m1']:
     3018    elif laue in ['31m','3']:
    30193019        return ['S400','S004','S202','S301']
    30203020    elif laue in ['3R','3mR']:
     
    31023102        Strm.append(h**4+k**4+l**4)
    31033103        Strm.append(3.0*((h*k)**2+(h*l)**2+(k*l)**2))
    3104     elif laue in ['6/m','6/mmm']:
     3104    elif laue in ['6/m','6/mmm','3m1']:
    31053105        Strm.append(h**4+k**4+2.0*k*h**3+2.0*h*k**3+3.0*(h*k)**2)
    31063106        Strm.append(l**4)
    31073107        Strm.append(3.0*((h*l)**2+(k*l)**2+h*k*l**2))
    3108     elif laue in ['31m','3','3m1']:
     3108    elif laue in ['31m','3']:
    31093109        Strm.append(h**4+k**4+2.0*k*h**3+2.0*h*k**3+3.0*(h*k)**2)
    31103110        Strm.append(l**4)
     
    31923192        U = np.inner(A.T,H)
    31933193        S = np.array(MustrainCoeff(U,SGData))
    3194         Sum = np.sqrt(np.sum(np.multiply(S,Shkl[:,nxs]),axis=0))
     3194        nS = S.shape[0]
     3195        Sum = np.sqrt(np.sum(np.multiply(S,Shkl[:nS,nxs]),axis=0))
    31953196        rad = np.sqrt(np.sum((Sum[:,nxs]*H)**2,axis=1))
    31963197        return (muiso-rad)**2
  • trunk/fprime.py

    r3826 r3963  
    1010import numpy as np
    1111import matplotlib as mpl
    12 import pylab
     12import matplotlib.pyplot as plt
    1313import sys
    1414import GSASIIpath
     
    237237       
    238238    def OnFPRIMEExitMenu(self, event):
    239         pylab.close('all')
     239        plt.close('all')
    240240        self.Close()
    241241        self.Destroy()
     
    341341            newPlot = False
    342342        except:
    343             self.fplot = pylab.figure(facecolor='white',figsize=(8,8))  #BTW: default figsize is (8,6)
     343            self.fplot = plt.figure(facecolor='white',figsize=(8,8))  #BTW: default figsize is (8,6)
    344344            self.fplot.canvas.set_window_title('X-Ray Resonant Scattering')
    345345            self.fplot.canvas.mpl_connect('pick_event', self.OnPick)
     
    391391        DE = E*self.Eres                         #smear by defined source resolution
    392392        StlMax = min(2.0,math.sin(80.0*math.pi/180.)/Wave)
    393         Stl = pylab.arange(0.,StlMax,.01)
     393        Stl = np.arange(0.,StlMax,.01)
    394394        Ymax = 0.0
    395395        for i,Elem in enumerate(self.Elems):
     
    428428        if newPlot:
    429429            newPlot = False
    430             pylab.show()
     430            plt.show()
    431431        else:
    432432            if rePlot:
     
    441441                bxylim = []
    442442                tb.push_current()
    443             pylab.draw()
     443            plt.draw()
    444444       
    445445    def OnPick(self, event):
Note: See TracChangeset for help on using the changeset viewer.