Changeset 1969
 Timestamp:
 Aug 31, 2015 1:53:11 PM (7 years ago)
 Location:
 trunk
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIgrid.py
r1966 r1969 2830 2830 Hmin = np.array([int(np.min(refList.T[0])),int(np.min(refList.T[1])),int(np.min(refList.T[2]))]) 2831 2831 Hmax = np.array([int(np.max(refList.T[0])),int(np.max(refList.T[1])),int(np.max(refList.T[2]))]) 2832 Vpoint = [int(np.mean(refList.T[0])),int(np.mean(refList.T[1])),int(np.mean(refList.T[2]))]2833 controls = {'Type' : 'Fosq','Iscale' : False,'HKLmax' : Hmax,'HKLmin' : Hmin,'Zone':False, 2832 Vpoint = np.array([int(np.mean(refList.T[0])),int(np.mean(refList.T[1])),int(np.mean(refList.T[2]))]) 2833 controls = {'Type' : 'Fosq','Iscale' : False,'HKLmax' : Hmax,'HKLmin' : Hmin,'Zone':False,'viewKey':'L', 2834 2834 'FoMax' : FoMax,'Scale' : 1.0,'Drawing':{'viewPoint':[Vpoint,[]],'default':Vpoint[:], 2835 2835 'backColor':[0,0,0],'depthFog':False,'Zclip':10.0,'cameraPos':10.,'Zstep':0.05,'viewUp':[0,1,0], … … 2861 2861 Hmax = np.array([int(np.max(refList.T[0])),int(np.max(refList.T[1])),int(np.max(refList.T[2]))]) 2862 2862 Vpoint = [int(np.mean(refList.T[0])),int(np.mean(refList.T[1])),int(np.mean(refList.T[2]))] 2863 controls = {'Type' : 'Fosq','Iscale' : False,'HKLmax' : Hmax,'HKLmin' : Hmin,'Zone':False, 2863 controls = {'Type' : 'Fosq','Iscale' : False,'HKLmax' : Hmax,'HKLmin' : Hmin,'Zone':False,'viewKey':'L', 2864 2864 'FoMax' : FoMax,'Scale' : 1.0,'Drawing':{'viewPoint':[Vpoint,[]],'default':Vpoint[:], 2865 2865 'backColor':[0,0,0],'depthFog':False,'Zclip':10.0,'cameraPos':10.,'Zstep':0.05,'viewUp':[0,1,0], 
trunk/GSASIIplot.py
r1968 r1969 572 572 global ifBox 573 573 Choice = {'F':'Fo','S':'Fosq','U':'Unit','D':'dFsq','W':'dFsq/sig'} 574 viewChoice = {'L':[[ 1,0,0],[0,0,1]],'K':[[0,1,0],[1,0,0]],'H':[[0,0,1],[0,1,0]]}574 viewChoice = {'L':[[0,0,1],[1,0,0],[0,1,0]],'K':[[0,1,0],[0,0,1],[1,0,0]],'H':[[1,0,0],[0,0,1],[0,1,0]]} 575 575 try: 576 576 keyCode = event.GetKeyCode() … … 584 584 Data['Zone'] = False 585 585 key = 'L' 586 Data['viewKey'] = key 586 587 drawingData['viewPoint'][0] = drawingData['default'] 587 drawingData['viewDir'] = viewChoice[key][0]588 drawingData['viewUp'] = viewChoice[key][1]588 drawingData['viewDir'] = np.array(viewChoice[key][0]) 589 drawingData['viewUp'] = np.array(viewChoice[key][1]) 589 590 drawingData['oldxy'] = [] 590 # V0 = np.array(viewChoice[key][0]) 591 # V = np.inner(Amat,V0) 592 # V /= np.sqrt(np.sum(V**2)) 593 # A = np.arccos(np.sum(V*V0)) 594 Q = G2mth.AV2Q(np.pi/2.,viewChoice[key][1]) 591 if Data['Zone']: 592 if key == 'L': 593 Q = [1,0,0,0] 594 else: 595 V0 = np.array(viewChoice[key][0]) 596 V1 = np.array(viewChoice[key][1]) 597 V0 = np.inner(Amat,V0) 598 V1 = np.inner(Amat,V1) 599 V0 /= nl.norm(V0) 600 V1 /= nl.norm(V1) 601 A = np.arccos(np.sum(V1*V0)) 602 Q = G2mth.AV2Q(A,viewChoice[key][2]) 603 else: 604 V0 = np.array(viewChoice[key][0]) 605 V = np.inner(Bmat,V0) 606 V /= np.sqrt(np.sum(V**2)) 607 V *= np.array([0,0,1]) 608 A = np.arccos(np.sum(V*V0)) 609 Q = G2mth.AV2Q(A,viewChoice[key][2]) 595 610 drawingData['Quaternion'] = Q 596 611 elif key in 'Z': … … 602 617 elif key == '': 603 618 Data['Scale'] /= 1.25 619 elif key == 'P': 620 vec = viewChoice[Data['viewKey']][0] 621 drawingData['viewPoint'][0] = vec 622 elif key == 'N': 623 vec = viewChoice[Data['viewKey']][0] 624 drawingData['viewPoint'][0] += vec 604 625 elif key == '0': 605 626 drawingData['viewPoint'][0] = [0,0,0] … … 806 827 if hkl: 807 828 h,k,l = hkl 808 Page.canvas.SetToolTipString('%d %d%d'%(h,k,l))809 G2frame.G2plotNB.status.SetStatusText('hkl = %d %d%d'%(h,k,l),1)829 Page.canvas.SetToolTipString('%d,%d,%d'%(h,k,l)) 830 G2frame.G2plotNB.status.SetStatusText('hkl = %d,%d,%d'%(h,k,l),1) 810 831 811 832 def OnMouseWheel(event): … … 856 877 for line,color in zip(uEdges,uColors)[:3]: 857 878 glColor3ubv(color) 858 glVertex3fv(line[1]) 879 glVertex3fv([0,0,0]) 880 # glVertex3fv(line[1]) 859 881 glVertex3fv(line[1]) 860 882 glEnd() … … 870 892 x,y,z = xyz 871 893 r,c = rc 872 gl Materialfv(GL_FRONT_AND_BACK,GL_EMISSION,c)894 glColor3ubv(c) 873 895 glPointSize(r*50) 874 896 glBegin(GL_POINTS) 
trunk/GSASIIpwdGUI.py
r1966 r1969 3120 3120 Hmin = np.array([int(np.min(refList.T[0])),int(np.min(refList.T[1])),int(np.min(refList.T[2]))]) 3121 3121 Hmax = np.array([int(np.max(refList.T[0])),int(np.max(refList.T[1])),int(np.max(refList.T[2]))]) 3122 Vpoint = [int(np.mean(refList.T[0])),int(np.mean(refList.T[1])),int(np.mean(refList.T[2]))]3123 controls = {'Type':'Fosq','Iscale':False,'HKLmax':Hmax,'HKLmin':Hmin,'Zone':False, 3122 Vpoint = np.array([int(np.mean(refList.T[0])),int(np.mean(refList.T[1])),int(np.mean(refList.T[2]))]) 3123 controls = {'Type':'Fosq','Iscale':False,'HKLmax':Hmax,'HKLmin':Hmin,'Zone':False,'viewKey':'L', 3124 3124 'FoMax' : FoMax,'Scale' : 1.0,'Drawing':{'viewPoint':[Vpoint,[]],'default':Vpoint[:], 3125 3125 'backColor':[0,0,0],'depthFog':False,'Zclip':10.0,'cameraPos':10.,'Zstep':0.05,'viewUp':[0,1,0],
Note: See TracChangeset
for help on using the changeset viewer.