Changeset 1383
- Timestamp:
- Jun 13, 2014 5:40:58 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIplot.py
r1382 r1383 3227 3227 return Bonds 3228 3228 3229 # PlotStructure initialization here 3229 3230 ForthirdPI = 4.0*math.pi/3.0 3230 3231 generalData = data['General'] … … 3641 3642 3642 3643 def SetRotation(newxy): 3643 #first get rotation vector in screen coords. & angle increment 3644 'Perform a rotation in x-y space due to a left-mouse drag' 3645 #first get rotation vector in screen coords. & angle increment 3644 3646 oldxy = drawingData['oldxy'] 3645 3647 if not len(oldxy): oldxy = list(newxy) … … 3648 3650 V = np.array([dxy[1],dxy[0],0.]) 3649 3651 A = 0.25*np.sqrt(dxy[0]**2+dxy[1]**2) 3650 # next transform vector back to xtal coordinates via inverse quaternion 3651 # & make new quaternion 3652 if not A: return # nothing changed, nothing to do 3653 # next transform vector back to xtal coordinates via inverse quaternion 3654 # & make new quaternion 3652 3655 Q = drawingData['Quaternion'] 3653 3656 V = G2mth.prodQVQ(G2mth.invQ(Q),np.inner(Bmat,V)) … … 3655 3658 Q = G2mth.prodQQ(Q,DQ) 3656 3659 drawingData['Quaternion'] = Q 3657 # finally get new view vector - last row of rotation matrix3660 # finally get new view vector - last row of rotation matrix 3658 3661 VD = np.inner(Bmat,G2mth.Q2Mat(Q)[2]) 3659 3662 VD /= np.sqrt(np.sum(VD**2)) … … 4142 4145 Draw('focus') 4143 4146 4144 # PlotStructure execution starts here 4147 # PlotStructure execution starts here (N.B. initialization above) 4145 4148 try: 4146 4149 plotNum = G2frame.G2plotNB.plotList.index(generalData['Name'])
Note: See TracChangeset
for help on using the changeset viewer.