Changeset 758


Ignore:
Timestamp:
Sep 16, 2012 3:16:27 AM (9 years ago)
Author:
vondreele
Message:

fix in sph. harm. for hex/rhom/trig
fix for view dir in plots
remove a few extra Draw() in structure plotting

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIlattice.py

    r736 r758  
    10141014        if SGLaue in ['mmm','4/mmm','6/mmm','R3mR','3m1','31m']:
    10151015            if SGLaue in ['3mR','3m1','31m']:
    1016                 if n%6 == 3:
     1016                if N%6 == 3:
    10171017                    Kcl = pcrs*sind(N*beta)
    10181018                else:
  • trunk/GSASIIphsGUI.py

    r757 r758  
    15661566            'vdwScale':0.67,'ellipseProb':50,'sizeH':0.50,'unitCellBox':False,
    15671567            'showABC':True,'selectedAtoms':[],'Atoms':[],'oldxy':[],
    1568             'bondList':{},'viewDir':[0,0,1]}
    1569         defaultDrawing['Quaternion'] = G2mth.AV2Q(2*np.pi,np.inner(Amat,[0,0,1]))
     1568            'bondList':{},'viewDir':[1,0,0]}
     1569        V0 = np.array([0,0,1])
     1570        V = np.inner(Amat,V0)
     1571        V /= np.sqrt(np.sum(V**2))
     1572        A = np.arccos(np.sum(V*V0))
     1573        defaultDrawing['Quaternion'] = G2mth.AV2Q(A,[0,1,0])
    15701574        try:
    15711575            drawingData = data['Drawing']
     
    18431847                        drawAtoms.SetAttr(i,cs+2,attr)
    18441848                    dlg.Destroy()
    1845 #                    event.StopPropagation()
    18461849                    UpdateDrawAtoms()
    18471850            G2plt.PlotStructure(G2frame,data)
  • trunk/GSASIIplot.py

    r757 r758  
    23582358    def OnKeyBox(event):
    23592359        import Image
    2360         Draw()                          #make sure plot is fresh!!
     2360#        Draw()                          #make sure plot is fresh!!
    23612361        mode = cb.GetValue()
    23622362        if mode in ['jpeg','bmp','tiff',]:
     
    23802380
    23812381    def OnKey(event):           #on key UP!!
    2382         Draw()                          #make sure plot is fresh!!
     2382#        Draw()                          #make sure plot is fresh!!
    23832383        try:
    23842384            keyCode = event.GetKeyCode()
     
    23912391        if key in ['C']:
    23922392            drawingData['viewPoint'] = [[.5,.5,.5],[0,0]]
    2393             drawingData['viewDir'] = [0.,0.,1]
     2393            drawingData['viewDir'] = [0,0,1]
    23942394            drawingData['oldxy'] = []
    2395             drawingData['Quaternion'] = [0.0,0.0,1.0,0.0]
     2395            V0 = np.array([0,0,1])
     2396            V = np.inner(Amat,V0)
     2397            V /= np.sqrt(np.sum(V**2))
     2398            A = np.arccos(np.sum(V*V0))
     2399            Q = G2mth.AV2Q(A,[0,1,0])
     2400            drawingData['Quaternion'] = Q
    23962401            SetViewPointText(drawingData['viewPoint'][0])
    23972402            SetViewDirText(drawingData['viewDir'])
     
    24852490        else:
    24862491            drawingData['oldxy'] = list(xy)
    2487         Draw()
     2492#        Draw()
    24882493       
    24892494    def OnMouseMove(event):
Note: See TracChangeset for help on using the changeset viewer.