Changeset 1786 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Apr 10, 2015 1:14:03 PM (8 years ago)
Author:
vondreele
Message:

fix anomalous dispersion calcs.
fix SC weights on derivatives

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r1780 r1786  
    647647            if 'HKLF' in Name:
    648648                Fosq,sig,Fcsq = refl[5+Super:8+Super]
     649                if refl[3+Super] < 0:
     650                    Fosq,sig,Fcsq = [0,1,0]
    649651            else:
    650652                Fosq,sig,Fcsq = refl[8+Super],1.0,refl[9+Super]
     
    696698        return HKL,zip(list(R),C)
    697699
     700    def GetTruePosition(xy):
     701        View = glGetIntegerv(GL_VIEWPORT)
     702        Proj = glGetDoublev(GL_PROJECTION_MATRIX)
     703        Model = glGetDoublev(GL_MODELVIEW_MATRIX)
     704        Zmax = 1.
     705        for i,ref in enumerate(hklRef):
     706            h,k,l = ref[1:4]
     707            X,Y,Z = gluProject(h,k,l,Model,Proj,View)
     708            XY = [int(X),int(Y)]
     709            print xy,XY
     710            if np.allclose(xy,XY,atol=10):
     711                Zmax = Z
     712                return [h,k,l]
     713                       
    698714    def SetTranslation(newxy):
    699715#first get translation vector in screen coords.       
     
    779795                Q = drawingData['Quaternion']
    780796            Draw('move')
     797#        else:
     798#            hkl = GetTruePosition(newxy)
    781799       
    782800    def OnMouseWheel(event):
Note: See TracChangeset for help on using the changeset viewer.