Changeset 388


Ignore:
Timestamp:
Oct 9, 2011 9:34:43 AM (10 years ago)
Author:
vondreele
Message:

add SGPolax to SGData dictionary - marks arbitrary axes in polar space groups
remove plotting of #2 from instrument parameter plots

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r380 r388  
    737737                else:
    738738                    Atoms.SelectCol(c,True)
    739 
     739       
     740        SGData = data['General']['SGData']
     741        if SGData['SGPolax']:
     742            self.dataFrame.SetStatusText('Warning: The location of the origin is arbitrary in '+SGData['SGPolax'])
    740743        table = []
    741744        rowLabels = []
  • trunk/GSASIIplot.py

    r383 r388  
    10831083    Z = []
    10841084    W = []
    1085     V = []
     1085#    V = []
    10861086    sig = lambda Th,U,V,W: 1.17741*math.sqrt(U*tand(Th)**2+V*tand(Th)+W)*math.pi/18000.
    10871087    gam = lambda Th,X,Y: (X/cosd(Th)+Y*tand(Th))*math.pi/18000.
    10881088    gamFW = lambda s,g: math.exp(math.log(s**5+2.69269*s**4*g+2.42843*s**3*g**2+4.47163*s**2*g**3+0.07842*s*g**4+g**5)/5.)
    1089     gamFW2 = lambda s,g: math.sqrt(s**2+(0.4654996*g)**2)+.5345004*g  #Ubaldo Bafile - private communication
     1089#    gamFW2 = lambda s,g: math.sqrt(s**2+(0.4654996*g)**2)+.5345004*g  #Ubaldo Bafile - private communication
    10901090    for theta in thetas:
    10911091        X.append(4.0*math.pi*sind(theta)/lam)              #q
     
    10931093        g = gam(theta,LX,LY)
    10941094        G = gamFW(g,s)
    1095         H = gamFW2(g,s)
     1095#        H = gamFW2(g,s)
    10961096        Y.append(s/tand(theta))
    10971097        Z.append(g/tand(theta))
    10981098        W.append(G/tand(theta))
    1099         V.append(H/tand(theta))
     1099#        V.append(H/tand(theta))
    11001100    Plot.set_title('Instrument and sample peak widths')
    11011101    Plot.set_ylabel(r'$\Delta q/q, \Delta d/d$',fontsize=14)
     
    11041104    Plot.plot(X,Z,color='g',label='Lorentzian')
    11051105    Plot.plot(X,W,color='b',label='G+L')
    1106     Plot.plot(X,V,color='k',label='G+L2')
     1106#    Plot.plot(X,V,color='k',label='G+L2')
    11071107    X = []
    11081108    Y = []
     
    11181118        g = peak[6]*math.pi/18000.
    11191119        G = gamFW(g,s)
    1120         H = gamFW2(g,s)
     1120#        H = gamFW2(g,s)
    11211121        Y.append(s/tand(peak[0]/2.))
    11221122        Z.append(g/tand(peak[0]/2.))
    11231123        W.append(G/tand(peak[0]/2.))
    1124         V.append(H/tand(peak[0]/2.))
     1124#        V.append(H/tand(peak[0]/2.))
    11251125    Plot.plot(X,Y,'+',color='r',label='G peak')
    11261126    Plot.plot(X,Z,'+',color='g',label='L peak')
    11271127    Plot.plot(X,W,'+',color='b',label='G+L peak')
    1128     Plot.plot(X,V,'+',color='k',label='G+L2 peak')
     1128#    Plot.plot(X,V,'+',color='k',label='G+L2 peak')
    11291129    Plot.legend(loc='best')
    11301130    Page.canvas.draw()
  • trunk/GSASIIspc.py

    r380 r388  
    8282    elif SGData['SGLaue'] in ['m3','m3m']:
    8383        SGData['SGSys'] = SysSym[7]
     84    SGData['SGPolax'] = SGpolar(SGData)
    8485    return SGInfo[8],SGData
    8586
     
    124125    except:
    125126        return "Unknown error"
    126    
    127 def SGPrint(SGData):
    128     '''
    129     Print the output of SpcGroup in a nicely formatted way. Used in SpaceGroup
    130     input:
    131         SGData - from SpcGroup
    132     returns:
    133         SGText - list of strings with the space group details
    134     '''
    135     POL = (' ','x','y','x y','z','x z','y z','xyz','111')
    136     Mult = len(SGData['SGCen'])*len(SGData['SGOps'])*(int(SGData['SGInv'])+1)
     127def SGpolar(SGData):
     128    '''
     129    Determine identity of polar axes if any
     130    '''
     131    POL = ('','x','y','x y','z','x z','y z','xyz','111')
    137132    NP = [1,2,4]
    138133    NPZ = [0,1]
     
    143138        if M[1][2] > 0: NPZ[1] = 0
    144139    NPol = (NP[0]+NP[1]+NP[2]+NPZ[0]*NPZ[1])*(1-int(SGData['SGInv']))
     140    return POL[NPol]
     141   
     142def SGPrint(SGData):
     143    '''
     144    Print the output of SpcGroup in a nicely formatted way. Used in SpaceGroup
     145    input:
     146        SGData - from SpcGroup
     147    returns:
     148        SGText - list of strings with the space group details
     149    '''
     150    Mult = len(SGData['SGCen'])*len(SGData['SGOps'])*(int(SGData['SGInv'])+1)
    145151    SGText = []
    146152    SGText.append(' Space Group: '+SGData['SpGrp'])
     
    158164    if SGData['SGInv']:
    159165        SGText.append(' The inversion center is located at 0,0,0')
    160     if NPol:
    161         SGText.append(' The location of the origin is arbitrary in '+POL[NPol])
     166    if SGData['SGPolax']:
     167        SGText.append(' The location of the origin is arbitrary in '+SGData['SGPolax'])
    162168    SGText.append('\n'+' The equivalent positions are:')
    163169    if SGData['SGLatt'] != 'P':
Note: See TracChangeset for help on using the changeset viewer.