Changeset 3950
 Timestamp:
 May 3, 2019 11:03:45 AM (4 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIplot.py
r3949 r3950 7838 7838 pI = [0,0] 7839 7839 if indx: 7840 pI[0] = indx[pI[1]] 7840 try: 7841 pI[0] = indx[pI[1]] 7842 Tx,Ty,Tz = drawAtoms[pI[0]][cx:cx+3] 7843 except IndexError: 7844 pI = [0,0] 7845 Tx,Ty,Tz = drawAtoms[pI[0]][cx:cx+3] 7846 pI[1] += 1 7847 pI[1] %= len(indx) 7848 txt = ' in selection' 7849 else: 7850 pI[0] += 1 7851 pI[0] %= len(drawAtoms) 7841 7852 Tx,Ty,Tz = drawAtoms[pI[0]][cx:cx+3] 7842 pI[1] += 1 7843 if pI[1] >= len(indx): 7844 pI[1] = 0 7845 else: 7846 Tx,Ty,Tz = drawAtoms[pI[0]][cx:cx+3] 7847 pI[0] += 1 7848 if pI[0] >= len(drawAtoms): 7849 pI[0] = 0 7853 txt = '' 7850 7854 drawingData['viewPoint'] = [np.array([Tx,Ty,Tz]),pI] 7851 7855 SetViewPointText(drawingData['viewPoint'][0]) 7852 G2frame.G2plotNB.status.SetStatusText('View point at atom '+drawAtoms[pI[0]][ct1]+ str(pI),1)7856 G2frame.G2plotNB.status.SetStatusText('View point at atom '+drawAtoms[pI[0]][ct1]+txt,1) 7853 7857 7854 7858 elif key in ['K'] and generalData['Map']['MapType']: … … 7864 7868 pI = [0,0] 7865 7869 if indx: 7866 pI[0] = indx[pI[1]] 7870 try: 7871 pI[0] = indx[pI[1]] 7872 Tx,Ty,Tz = drawAtoms[pI[0]][cx:cx+3] 7873 except IndexError: 7874 pI = [0,0] 7875 Tx,Ty,Tz = drawAtoms[pI[0]][cx:cx+3] 7876 pI[1] = 1 7877 pI[1] %= len(indx) 7878 txt = ' in selection' 7879 else: 7880 pI[0] = 1 7881 pI[0] %= len(drawAtoms) 7867 7882 Tx,Ty,Tz = drawAtoms[pI[0]][cx:cx+3] 7868 pI[1] = 1 7869 if pI[1] < 0: 7870 pI[1] = len(indx)1 7871 else: 7872 Tx,Ty,Tz = drawAtoms[pI[0]][cx:cx+3] 7873 pI[0] = 1 7874 if pI[0] < 0: 7875 pI[0] = len(drawAtoms)1 7883 txt = '' 7876 7884 drawingData['viewPoint'] = [np.array([Tx,Ty,Tz]),pI] 7877 7885 SetViewPointText(drawingData['viewPoint'][0]) 7878 G2frame.G2plotNB.status.SetStatusText('View point at atom '+drawAtoms[pI[0]][ct1]+ str(pI)+str(indx),1)7886 G2frame.G2plotNB.status.SetStatusText('View point at atom '+drawAtoms[pI[0]][ct1]+txt,1) 7879 7887 elif key in ['U','D','L','R'] and mapData['Flip'] == True: 7880 7888 dirDict = {'U':[0,1],'D':[0,1],'L':[1,0],'R':[1,0]}
Note: See TracChangeset
for help on using the changeset viewer.