project_name
string
class_name
string
class_modifiers
string
class_implements
int64
class_extends
int64
function_name
string
function_body
string
cyclomatic_complexity
int64
NLOC
int64
num_parameter
int64
num_token
int64
num_variable
int64
start_line
int64
end_line
int64
function_index
int64
function_params
string
function_variable
string
function_return_type
string
function_body_line_type
string
function_num_functions
int64
function_num_lines
int64
outgoing_function_count
int64
outgoing_function_names
string
incoming_function_count
int64
incoming_function_names
string
lexical_representation
string
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.GetRoll
def GetRoll(newxy,rhoshape):Q = drawingData['Quaternion']dxy = G2mth.prodQVQ(G2mth.invQ(Q),np.inner(Bmat,newxy+[0,]))dxy = np.array(dxy*rhoshape)roll = np.where(dxy>0.5,1,np.where(dxy<-.5,-1,0))return roll
1
6
2
82
0
6,469
6,474
6,469
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.GetRoll) defined within the public class called public.The function start at line 6469 and ends at 6474. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [6469.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.SetMapRoll
def SetMapRoll(newxy):rho = generalData['Map']['rho']roll = GetRoll(newxy,rho.shape)generalData['Map']['rho'] = np.roll(np.roll(np.roll(rho,roll[0],axis=0),roll[1],axis=1),roll[2],axis=2)drawingData['oldxy'] = list(newxy)
1
5
1
84
0
6,476
6,480
6,476
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.SetMapRoll) defined within the public class called public.The function start at line 6476 and ends at 6480. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.Set4DMapRoll
def Set4DMapRoll(newxy):rho = generalData['4DmapData']['rho']if len(rho):roll = GetRoll(newxy,rho.shape[:3])generalData['4DmapData']['rho'] = np.roll(np.roll(np.roll(rho,roll[0],axis=0),roll[1],axis=1),roll[2],axis=2)
2
5
1
85
0
6,482
6,486
6,482
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.Set4DMapRoll) defined within the public class called public.The function start at line 6482 and ends at 6486. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.SetPeakRoll
def SetPeakRoll(newxy):rho = generalData['Map']['rho']roll = GetRoll(newxy,rho.shape)steps = 1./np.array(rho.shape)dxy = roll*stepsfor peak in mapPeaks:peak[1:4] += dxypeak[1:4] %= 1.peak[4] = np.sqrt(np.sum(np.inner(Amat,peak[1:4])**2))
2
9
1
95
0
6,488
6,496
6,488
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.SetPeakRoll) defined within the public class called public.The function start at line 6488 and ends at 6496. It contains 9 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.SetTranslation
def SetTranslation(newxy):#first get translation vector in screen coords.oldxy = drawingData['oldxy']if not len(oldxy): oldxy = list(newxy)dxy = newxy-oldxydrawingData['oldxy'] = list(newxy)V = np.array([-dxy[0],dxy[1],0.])#then transform to rotated crystal coordinates & apply to view pointQ = drawingData['Quaternion']...
2
14
1
161
0
6,498
6,513
6,498
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.SetTranslation) defined within the public class called public.The function start at line 6498 and ends at 6513. It contains 14 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.SetRBTranslation
def SetRBTranslation(newxy):#first get translation vector in screen coords.if 'fixOrig' in rbObj:if rbObj['fixOrig']: returnoldxy = drawingData['oldxy']if not len(oldxy): oldxy = list(newxy)dxy = newxy-oldxydrawingData['oldxy'] = list(newxy)V = np.array([-dxy[0],dxy[1],0.])#then transform to rotated crystal coordinates...
4
16
1
162
0
6,515
6,532
6,515
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.SetRBTranslation) defined within the public class called public.The function start at line 6515 and ends at 6532. It contains 16 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.SetRotation
def SetRotation(newxy):'Perform a rotation in x-y space due to a left-mouse drag'#first get rotation vector in screen coords. & angle incrementoldxy = drawingData['oldxy']if not len(oldxy): oldxy = list(newxy)dxy = newxy-oldxyif dxy[0] == dxy[1] == 0: return # on Mac motion can be less than a full pixel!drawingData['ol...
4
19
1
201
0
6,534
6,556
6,534
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.SetRotation) defined within the public class called public.The function start at line 6534 and ends at 6556. It contains 19 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.SetRotationZ
def SetRotationZ(newxy):#first get rotation vector (= view vector) in screen coords. & angle incrementView = GL.glGetIntegerv(GL.GL_VIEWPORT)cent = [View[2]/2,View[3]/2]oldxy = drawingData['oldxy']if not len(oldxy): oldxy = list(newxy)dxy = newxy-oldxyif dxy[0] == dxy[1] == 0: return # on Mac motion can be less than a ...
5
23
1
222
0
6,558
6,582
6,558
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.SetRotationZ) defined within the public class called public.The function start at line 6558 and ends at 6582. It contains 23 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.SetRBRotation
def SetRBRotation(newxy):#first get rotation vector in screen coords. & angle incrementoldxy = drawingData['oldxy']if not len(oldxy): oldxy = list(newxy)dxy = newxy-oldxyif dxy[0] == dxy[1] == 0: returndrawingData['oldxy'] = list(newxy)V = np.array([dxy[1],dxy[0],0.])A = 0.25*np.sqrt(dxy[0]**2+dxy[1]**2)# next transfor...
3
16
1
177
0
6,584
6,602
6,584
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.SetRBRotation) defined within the public class called public.The function start at line 6584 and ends at 6602. It contains 16 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.SetRBRotationZ
def SetRBRotationZ(newxy):#first get rotation vector (= view vector) in screen coords. & angle incrementView = GL.glGetIntegerv(GL.GL_VIEWPORT)cent = [View[2]/2,View[3]/2]oldxy = drawingData['oldxy']if not len(oldxy): oldxy = list(newxy)dxy = newxy-oldxyif dxy[0] == dxy[1] == 0: returndrawingData['oldxy'] = list(newxy)...
5
25
1
250
0
6,604
6,630
6,604
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.SetRBRotationZ) defined within the public class called public.The function start at line 6604 and ends at 6630. It contains 25 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.RenderBox
def RenderBox():GL.glLightfv(GL.GL_LIGHT0,GL.GL_AMBIENT,[.4,.4,.4,1])GL.glEnable(GL.GL_COLOR_MATERIAL)GL.glLineWidth(2)GL.glEnable(GL.GL_BLEND)GL.glBlendFunc(GL.GL_SRC_ALPHA,GL.GL_ONE_MINUS_SRC_ALPHA)GL.glEnable(GL.GL_LINE_SMOOTH)GL.glBegin(GL.GL_LINES)for line,color in zip(uEdges,uColors):GL.glColor3ubv(color)GL.glVer...
2
18
0
183
0
6,632
6,649
6,632
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.RenderBox) defined within the public class called public.The function start at line 6632 and ends at 6649. It contains 18 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.RenderUnitVectors
def RenderUnitVectors(x,y,z):GL.glLightfv(GL.GL_LIGHT0,GL.GL_AMBIENT,[.7,.7,.7,1])GL.glEnable(GL.GL_COLOR_MATERIAL)GL.glLineWidth(2)GL.glEnable(GL.GL_BLEND)GL.glBlendFunc(GL.GL_SRC_ALPHA,GL.GL_ONE_MINUS_SRC_ALPHA)GL.glEnable(GL.GL_LINE_SMOOTH)GL.glPushMatrix()GL.glTranslate(x,y,z)GL.glScalef(1/cell[0],1/cell[1],1/cell[...
2
22
3
247
0
6,651
6,672
6,651
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.RenderUnitVectors) defined within the public class called public.The function start at line 6651 and ends at 6672. It contains 22 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [6651.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.RenderRBtriplet
def RenderRBtriplet(orig,Q,Bmat,symAxis=None):'''draw an axes triplet located at the origin of a rigid bodyand with the x, y & z axes drawn as red, green and blue.'''GL.glLightfv(GL.GL_LIGHT0,GL.GL_AMBIENT,[.7,.7,.7,1])GL.glEnable(GL.GL_COLOR_MATERIAL)GL.glLineWidth(3)GL.glEnable(GL.GL_BLEND)GL.glBlendFunc(GL.GL_SRC_AL...
2
28
4
290
0
6,674
6,705
6,674
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.RenderRBtriplet) defined within the public class called public.The function start at line 6674 and ends at 6705. It contains 28 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [6674.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.RenderPlane
def RenderPlane(plane,color):fade = list(color) + [.25,]GL.glMaterialfv(GL.GL_FRONT_AND_BACK,GL.GL_AMBIENT_AND_DIFFUSE,fade)GL.glShadeModel(GL.GL_FLAT)GL.glEnable(GL.GL_BLEND)GL.glBlendFunc(GL.GL_SRC_ALPHA,GL.GL_ONE_MINUS_SRC_ALPHA)GL.glPushMatrix()GL.glShadeModel(GL.GL_SMOOTH)GL.glPolygonMode(GL.GL_FRONT_AND_BACK,GL.G...
2
17
2
139
0
6,707
6,723
6,707
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.RenderPlane) defined within the public class called public.The function start at line 6707 and ends at 6723. It contains 17 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [6707.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.RenderViewPlane
def RenderViewPlane(plane,Z,width,height):global txIDGL.glShadeModel(GL.GL_FLAT)#newTX = Trueif txID < 0:txID = GL.glGenTextures(1)#newTX = TrueGL.glBindTexture(GL.GL_TEXTURE_2D, txID)GL.glPixelStorei(GL.GL_UNPACK_ALIGNMENT,1)GL.glEnable(GL.GL_BLEND)GL.glBlendFunc(GL.GL_SRC_ALPHA,GL.GL_ONE_MINUS_SRC_ALPHA)GL.glEnable(G...
3
29
4
276
0
6,725
6,759
6,725
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.RenderViewPlane) defined within the public class called public.The function start at line 6725 and ends at 6759. It contains 29 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [6725.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.RenderTextureSphere
def RenderTextureSphere(x,y,z,radius,ATcolor=None,shape=[20,10],Texture=None,ifFade=True):SpFade = np.zeros(list(Texture.shape)+[4,],dtype=np.dtype('B'))if ATcolor is None:acolor = GetColorMap('RdYlGn')SpFade = acolor(Texture)*255else:SpFade[:,:,:3] = Texture[:,:,nxs]*list(ATcolor)SpFade[:,:,3] = 255if ifFade:SpFade[:,...
3
36
8
422
0
6,761
6,796
6,761
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.RenderTextureSphere) defined within the public class called public.The function start at line 6761 and ends at 6796. It contains 36 lines of code and it has a cyclomatic complexity of 3. It takes 8 parameters, represented as [6761.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.RenderSphere
def RenderSphere(x,y,z,radius,color,fade=False,shape=[20,10]):GL.glMaterialfv(GL.GL_FRONT_AND_BACK,GL.GL_DIFFUSE,color)if fade:Fade = list(color) + [0.2,]GL.glMaterialfv(GL.GL_FRONT_AND_BACK,GL.GL_DIFFUSE,Fade) #GL.GL_AMBIENT_AND_DIFFUSE causes stripingGL.glShadeModel(GL.GL_FLAT)GL.glFrontFace(GL.GL_CCW) #shows outside...
3
20
7
193
0
6,798
6,817
6,798
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.RenderSphere) defined within the public class called public.The function start at line 6798 and ends at 6817. It contains 20 lines of code and it has a cyclomatic complexity of 3. It takes 7 parameters, represented as [6798.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.RenderFadeSphere
def RenderFadeSphere(x,y,z,radius,color):fade = list(color) + [1.0,]GL.glMaterialfv(GL.GL_FRONT_AND_BACK,GL.GL_AMBIENT_AND_DIFFUSE,fade)GL.glShadeModel(GL.GL_FLAT)GL.glEnable(GL.GL_BLEND)GL.glBlendFunc(GL.GL_SRC_ALPHA,GL.GL_ONE_MINUS_SRC_ALPHA)GL.glPushMatrix()GL.glTranslate(x,y,z)GL.glMultMatrixf(B4mat.T)q = GLU.gluNe...
1
14
5
131
0
6,819
6,832
6,819
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.RenderFadeSphere) defined within the public class called public.The function start at line 6819 and ends at 6832. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [6819.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.RenderDots
def RenderDots(XYZ,RC):GL.glEnable(GL.GL_COLOR_MATERIAL)XYZ = np.array(XYZ)GL.glPushMatrix()for xyz,rc in zip(XYZ,RC):x,y,z = xyzr,c = rcGL.glColor3fv(c/255.)GL.glPointSize(r*50)GL.glBegin(GL.GL_POINTS)GL.glVertex3fv(xyz)GL.glEnd()GL.glPopMatrix()GL.glColor4ubv([0,0,0,0])GL.glDisable(GL.GL_COLOR_MATERIAL)
2
15
2
115
0
6,834
6,848
6,834
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.RenderDots) defined within the public class called public.The function start at line 6834 and ends at 6848. It contains 15 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [6834.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.RenderSmallSphere
def RenderSmallSphere(x,y,z,radius,color):GL.glMaterialfv(GL.GL_FRONT_AND_BACK,GL.GL_DIFFUSE,color)GL.glPushMatrix()GL.glTranslate(x,y,z)GL.glMultMatrixf(B4mat.T)q = GLU.gluNewQuadric()GLU.gluSphere(q,radius,4,2)GL.glPopMatrix()
1
8
5
74
0
6,850
6,857
6,850
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.RenderSmallSphere) defined within the public class called public.The function start at line 6850 and ends at 6857. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [6850.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.RenderEllipsoid
def RenderEllipsoid(x,y,z,ellipseProb,E,R4,color):s1,s2,s3 = EGL.glMaterialfv(GL.GL_FRONT_AND_BACK,GL.GL_DIFFUSE,color)GL.glPushMatrix()GL.glTranslate(x,y,z)GL.glMultMatrixf(B4mat.T)GL.glMultMatrixf(R4.T)GL.glEnable(GL.GL_NORMALIZE)GL.glScale(s1,s2,s3)q = GLU.gluNewQuadric()GLU.gluSphere(q,ellipseProb,20,10)GL.glDisabl...
1
13
7
119
0
6,859
6,871
6,859
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.RenderEllipsoid) defined within the public class called public.The function start at line 6859 and ends at 6871. It contains 13 lines of code and it has a cyclomatic complexity of 1. It takes 7 parameters, represented as [6859.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.RenderBonds
def RenderBonds(x,y,z,Bonds,radius,color,slice=20):if not len(Bonds):returnGL.glMaterialfv(GL.GL_FRONT_AND_BACK,GL.GL_DIFFUSE,color)GL.glPushMatrix()GL.glTranslate(x,y,z)GL.glMultMatrixf(B4mat.T)for bond in Bonds:GL.glPushMatrix()Dx = np.inner(Amat,bond)Z = np.sqrt(np.sum(Dx**2))if Z:azm = atan2d(-Dx[1],-Dx[0])phi = ac...
4
20
7
187
0
6,873
6,892
6,873
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.RenderBonds) defined within the public class called public.The function start at line 6873 and ends at 6892. It contains 20 lines of code and it has a cyclomatic complexity of 4. It takes 7 parameters, represented as [6873.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.RenderMoment
def RenderMoment(x,y,z,Moment,color,slice=20):Dx = np.inner(Amat,Moment/ABC)/2.Z = np.sqrt(np.sum(Dx**2))if Z:GL.glMaterialfv(GL.GL_FRONT_AND_BACK,GL.GL_DIFFUSE,color)GL.glPushMatrix()GL.glTranslate(x,y,z)GL.glMultMatrixf(B4mat.T)GL.glTranslate(-Dx[0],-Dx[1],-Dx[2])azm = atan2d(-Dx[1],-Dx[0])phi = acosd(Dx[2]/Z)GL.glRo...
2
24
6
297
0
6,894
6,917
6,894
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.RenderMoment) defined within the public class called public.The function start at line 6894 and ends at 6917. It contains 24 lines of code and it has a cyclomatic complexity of 2. It takes 6 parameters, represented as [6894.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.RenderLines
def RenderLines(x,y,z,Bonds,color):GL.glShadeModel(GL.GL_FLAT)xyz = np.array([x,y,z])GL.glEnable(GL.GL_COLOR_MATERIAL)GL.glLineWidth(1)GL.glColor3fv(color)GL.glPushMatrix()GL.glBegin(GL.GL_LINES)for bond in Bonds:GL.glVertex3fv(xyz)GL.glVertex3fv(xyz+bond)GL.glEnd()GL.glColor4ubv([0,0,0,0])GL.glPopMatrix()GL.glDisable(...
2
16
5
127
0
6,919
6,934
6,919
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.RenderLines) defined within the public class called public.The function start at line 6919 and ends at 6934. It contains 16 lines of code and it has a cyclomatic complexity of 2. It takes 5 parameters, represented as [6919.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.RenderPolyhedra
def RenderPolyhedra(x,y,z,Faces,color):GL.glShadeModel(GL.GL_FLAT)GL.glPushMatrix()GL.glTranslate(x,y,z)GL.glMaterialfv(GL.GL_FRONT_AND_BACK,GL.GL_DIFFUSE,color)GL.glShadeModel(GL.GL_SMOOTH)GL.glMultMatrixf(B4mat.T)for face,norm in Faces:GL.glPolygonMode(GL.GL_FRONT_AND_BACK,GL.GL_FILL)GL.glFrontFace(GL.GL_CW)GL.glNorm...
3
17
5
136
0
6,936
6,952
6,936
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.RenderPolyhedra) defined within the public class called public.The function start at line 6936 and ends at 6952. It contains 17 lines of code and it has a cyclomatic complexity of 3. It takes 5 parameters, represented as [6936.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.RenderMapPeak
def RenderMapPeak(x,y,z,color,den):GL.glShadeModel(GL.GL_FLAT)xyz = np.array([x,y,z])GL.glEnable(GL.GL_COLOR_MATERIAL)GL.glLineWidth(3)GL.glColor3fv(2*color*den/255)GL.glPushMatrix()GL.glBegin(GL.GL_LINES)for vec in mapPeakVecs:GL.glVertex3fv(vec[0]+xyz)GL.glVertex3fv(vec[1]+xyz)GL.glEnd()GL.glColor4ubv([0,0,0,0])GL.gl...
2
16
5
141
0
6,954
6,969
6,954
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.RenderMapPeak) defined within the public class called public.The function start at line 6954 and ends at 6969. It contains 16 lines of code and it has a cyclomatic complexity of 2. It takes 5 parameters, represented as [6954.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.RenderBackbone
def RenderBackbone(Backbone,BackboneColor,radius):GL.glPushMatrix()GL.glMultMatrixf(B4mat.T)GL.glEnable(GL.GL_COLOR_MATERIAL)GL.glShadeModel(GL.GL_SMOOTH)#gle.gleSetJoinStyle(TUBE_NORM_EDGE | TUBE_JN_ANGLE | TUBE_JN_CAP)#gle.glePolyCylinder(Backbone,BackboneColor,radius)GL.glPopMatrix()GL.glDisable(GL.GL_COLOR_MATERIAL...
1
7
3
51
0
6,971
6,979
6,971
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.RenderBackbone) defined within the public class called public.The function start at line 6971 and ends at 6979. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [6971.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.RenderLabel
def RenderLabel(x,y,z,label,r,color,matRot,offset=wx.RealPoint(0.,0.)):'''color wx.Colour object'''GL.glPushMatrix()GL.glTranslate(x,y,z)GL.glMultMatrixf(B4mat.T)GL.glDisable(GL.GL_LIGHTING)GL.glMultMatrixf(matRot)GL.glRotate(180,1,0,0) #fix to flip about x-axistext = gltext.Text(text=' '+label,font=Font,foreground=col...
1
11
8
127
0
6,981
6,994
6,981
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.RenderLabel) defined within the public class called public.The function start at line 6981 and ends at 6994. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 8 parameters, represented as [6981.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.RenderLabel2
def RenderLabel2(x,y,z,label,r,color,matRot,offset=wx.RealPoint(0.,0.)):'''color wx.Colour object - doesn't work'''figure = mplfig.Figure(figsize=(1.,1.),facecolor=(0.,0.,0.,0.))figure.clf()canvas = hcCanvas(figure)ax0 = figure.add_subplot(111)ax0.text(0.,0.,label)ax0.axis("off")figure.subplots_adjust(bottom=0.,top=1.,...
1
13
8
197
0
6,996
7,011
6,996
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.RenderLabel2) defined within the public class called public.The function start at line 6996 and ends at 7011. It contains 13 lines of code and it has a cyclomatic complexity of 1. It takes 8 parameters, represented as [6996.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.RenderMap
def RenderMap(rho,rhoXYZ,indx,Rok):GL.glShadeModel(GL.GL_FLAT)cLevel = drawingData['contourLevel']XYZ = []RC = []for i,xyz in enumerate(rhoXYZ):if not Rok[i]:x,y,z = xyzI,J,K = indx[i]alpha = 1.0if cLevel < 1.:alpha = min(1.0,(abs(rho[I,J,K])/mapData['rhoMax']-cLevel)/(1.-cLevel))if rho[I,J,K] < 0.:XYZ.append(xyz)RC.ap...
5
20
4
187
0
7,014
7,033
7,014
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.RenderMap) defined within the public class called public.The function start at line 7014 and ends at 7033. It contains 20 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [7014.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.distances2Peaks
def distances2Peaks(x,y,z,PeakDistRadius,mapPeaks,peakMax,radius,Amat,matRot):''' show distances to other peaks within PeakDistRadius A'''XYZ = mapPeaks.T[1:4].TDx = XYZ-(x,y,z)dist = np.sqrt(np.sum(np.inner(Dx,Amat)**2,axis=1))for i in ma.nonzero(ma.masked_greater(dist,PeakDistRadius))[0]:lbl = '{:.2f}'.format(dist[i]...
3
17
9
266
0
7,035
7,053
7,035
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.distances2Peaks) defined within the public class called public.The function start at line 7035 and ends at 7053. It contains 17 lines of code and it has a cyclomatic complexity of 3. It takes 9 parameters, represented as [7035.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.distances2Atoms
def distances2Atoms(x,y,z,atomsExpandRadius,atomsdistRadius,Amat,matRot):# find and display atoms within atomsExpandRadius AvdWRadii = generalData['vdWRadii']vdwScale = drawingData['vdwScale']ballScale = drawingData['ballScale']xyzA = np.array((x,y,z))cx,ct,cs,ci = G2mth.getAtomPtrs(data)cellArray = G2lat.CellBlock(1)r...
13
56
7
657
0
7,055
7,113
7,055
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.distances2Atoms) defined within the public class called public.The function start at line 7055 and ends at 7113. It contains 56 lines of code and it has a cyclomatic complexity of 13. It takes 7 parameters, represented as [7055.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.Draw
def Draw(caller='',Fade=[],NPkey=False):#reinitialize geometry stuff - needed after tab changeglobal cell, Vol, Amat, Bmat, A4mat, B4mat, BondRadiiif 'key down' not in caller:cell = generalData['Cell'][1:7]Vol = generalData['Cell'][7:8][0]Amat,Bmat = G2lat.cell2AB(cell) #Amat - crystal to cartesian, Bmat - inverseGmat,...
125
395
3
4,648
0
7,115
7,529
7,115
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.Draw) defined within the public class called public.The function start at line 7115 and ends at 7529. It contains 395 lines of code and it has a cyclomatic complexity of 125. It takes 3 parameters, represented as [7115.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.OnSize
def OnSize(event):Draw('size')
1
2
1
9
0
7,531
7,532
7,531
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.OnSize) defined within the public class called public.The function start at line 7531 and ends at 7532. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure.OnFocus
def OnFocus(event):Draw('focus')Draw('focus') #to get correct drawing after tab change
1
3
1
13
0
7,534
7,536
7,534
null
[]
None
null
0
0
0
null
0
null
The function (PlotStructure.OnFocus) defined within the public class called public.The function start at line 7534 and ends at 7536. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotStructure
def PlotStructure(G2frame,data,firstCall=False,pageCallback=None):'''Crystal structure plotting package. Can show structures as balls, sticks, lines,thermal motion ellipsoids and polyhedra. Magnetic moments shown as black/redarrows according to spin state:param wx.Frame G2frame: main GSAS-II window:param dict data: dic...
20
205
4
2,019
249
5,837
7,694
5,837
null
['Moment', 'pageName', 'mapPeaks', 'mcsaXYZ', 'pId', 'magMult', 'R4', 'SpnRB', 'nuniq', 'color', 'defCtrls', 'XYZ', 'E', 'Vsteps', 'mapPeakVecs', 'msg', 'page', 'contlevels', 'Fade', 'steps', 'rhoXYZ', 'mcsaBonds', 'projFile', 'Vol', 'VD', 'SGData', 'useAtColor', 'DQ', 'view', 'Radii', 'Bonds', 'atomList', 'ellipseProb...
None
null
0
0
0
null
0
null
The function (PlotStructure) defined within the public class called public.The function start at line 5837 and ends at 7694. It contains 205 lines of code and it has a cyclomatic complexity of 20. It takes 4 parameters, represented as [5837.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotBeadModel.OnMouseDown
def OnMouseDown(event):xy = event.GetPosition()defaults['oldxy'] = list(xy)
1
3
1
21
0
7,701
7,703
7,701
null
[]
None
null
0
0
0
null
0
null
The function (PlotBeadModel.OnMouseDown) defined within the public class called public.The function start at line 7701 and ends at 7703. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotBeadModel.OnMouseMove
def OnMouseMove(event):newxy = event.GetPosition()if event.Dragging():if event.LeftIsDown():SetRotation(newxy)Q = defaults['Quaternion']G2frame.G2plotNB.status.SetStatusText('New quaternion: %.2f+, %.2fi+ ,%.2fj+, %.2fk'%(Q[0],Q[1],Q[2],Q[3]),1)elif event.MiddleIsDown():SetRotationZ(newxy)Q = defaults['Quaternion']G2fr...
4
12
1
125
0
7,705
7,717
7,705
null
[]
None
null
0
0
0
null
0
null
The function (PlotBeadModel.OnMouseMove) defined within the public class called public.The function start at line 7705 and ends at 7717. It contains 12 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotBeadModel.OnMouseWheel
def OnMouseWheel(event):defaults['cameraPos'] += event.GetWheelRotation()/24defaults['cameraPos'] = max(10,min(500,defaults['cameraPos']))G2frame.G2plotNB.status.SetStatusText('New camera distance: %.2f'%(defaults['cameraPos']),1)Draw('wheel')
1
5
1
59
0
7,719
7,723
7,719
null
[]
None
null
0
0
0
null
0
null
The function (PlotBeadModel.OnMouseWheel) defined within the public class called public.The function start at line 7719 and ends at 7723. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotBeadModel.SetBackground
def SetBackground():R,G,B,A = Page.camera['backColor']GL.glClearColor(R,G,B,A)GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT)
1
4
0
42
0
7,725
7,728
7,725
null
[]
None
null
0
0
0
null
0
null
The function (PlotBeadModel.SetBackground) defined within the public class called public.The function start at line 7725 and ends at 7728. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotBeadModel.SetLights
def SetLights():try:GL.glEnable(GL.GL_DEPTH_TEST)except:if GSASIIpath.GetConfigValue('debug'): print('depth test failed')returnGL.glShadeModel(GL.GL_FLAT)GL.glEnable(GL.GL_LIGHTING)GL.glEnable(GL.GL_LIGHT0)GL.glLightModeli(GL.GL_LIGHT_MODEL_TWO_SIDE,0)GL.glLightfv(GL.GL_LIGHT0,GL.GL_AMBIENT,[1,1,1,.8])GL.glLightfv(GL.G...
3
12
0
108
0
7,730
7,741
7,730
null
[]
None
null
0
0
0
null
0
null
The function (PlotBeadModel.SetLights) defined within the public class called public.The function start at line 7730 and ends at 7741. It contains 12 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotBeadModel.SetRotation
def SetRotation(newxy):#first get rotation vector in screen coords. & angle incrementoldxy = defaults['oldxy']if not len(oldxy): oldxy = list(newxy)dxy = newxy-oldxyif dxy[0] == dxy[1] == 0: return # on Mac motion can be less than a full pixel!defaults['oldxy'] = list(newxy)V = np.array([dxy[1],dxy[0],0.])A = 0.25*np.s...
3
16
1
177
0
7,743
7,762
7,743
null
[]
None
null
0
0
0
null
0
null
The function (PlotBeadModel.SetRotation) defined within the public class called public.The function start at line 7743 and ends at 7762. It contains 16 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotBeadModel.SetRotationZ
def SetRotationZ(newxy):#first get rotation vector (= view vector) in screen coords. & angle incrementView = GL.glGetIntegerv(GL.GL_VIEWPORT)cent = [View[2]/2,View[3]/2]oldxy = defaults['oldxy']if not len(oldxy): oldxy = list(newxy)dxy = newxy-oldxyif dxy[0] == dxy[1] == 0: return # on Mac motion can be less than a ful...
5
22
1
212
0
7,764
7,787
7,764
null
[]
None
null
0
0
0
null
0
null
The function (PlotBeadModel.SetRotationZ) defined within the public class called public.The function start at line 7764 and ends at 7787. It contains 22 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotBeadModel.RenderUnitVectors
def RenderUnitVectors(x,y,z):GL.glEnable(GL.GL_COLOR_MATERIAL)GL.glLineWidth(1)GL.glPushMatrix()GL.glTranslate(x,y,z)GL.glBegin(GL.GL_LINES)for line,color in zip(uEdges,uColors):GL.glColor3ubv(color)GL.glVertex3fv(-line[1])GL.glVertex3fv(line[1])GL.glEnd()GL.glPopMatrix()GL.glColor4ubv([0,0,0,0])GL.glDisable(GL.GL_COLO...
2
14
3
115
0
7,789
7,802
7,789
null
[]
None
null
0
0
0
null
0
null
The function (PlotBeadModel.RenderUnitVectors) defined within the public class called public.The function start at line 7789 and ends at 7802. It contains 14 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [7789.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotBeadModel.RenderSphere
def RenderSphere(x,y,z,radius,color,fade=False):if fade:Fade = list(color) + [0.5,]GL.glMaterialfv(GL.GL_FRONT_AND_BACK,GL.GL_AMBIENT_AND_DIFFUSE,Fade)GL.glMaterialfv(GL.GL_FRONT_AND_BACK,GL.GL_DIFFUSE,color)GL.glPushMatrix()GL.glTranslate(x,y,z)q = GLU.gluNewQuadric()GLU.gluSphere(q,radius,40,20)GL.glPopMatrix()
2
10
6
100
0
7,804
7,813
7,804
null
[]
None
null
0
0
0
null
0
null
The function (PlotBeadModel.RenderSphere) defined within the public class called public.The function start at line 7804 and ends at 7813. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 6 parameters, represented as [7804.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotBeadModel.Draw
def Draw(caller=''):cPos = defaults['cameraPos']VS = np.array(Page.canvas.GetSize())aspect = float(VS[0])/float(VS[1])Q = defaults['Quaternion']SetBackground()GL.glInitNames()GL.glPushName(0)GL.glMatrixMode(GL.GL_PROJECTION)GL.glLoadIdentity()if sys.platform == "darwin":f = int(Page.GetContentScaleFactor())GL.glViewpor...
5
34
1
346
0
7,815
7,850
7,815
null
[]
None
null
0
0
0
null
0
null
The function (PlotBeadModel.Draw) defined within the public class called public.The function start at line 7815 and ends at 7850. It contains 34 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotBeadModel.OnSize
def OnSize(event):Draw('size')
1
2
1
9
0
7,852
7,853
7,852
null
[]
None
null
0
0
0
null
0
null
The function (PlotBeadModel.OnSize) defined within the public class called public.The function start at line 7852 and ends at 7853. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotBeadModel.OnFocus
def OnFocus(event):Draw('focus')
1
2
1
9
0
7,855
7,856
7,855
null
[]
None
null
0
0
0
null
0
null
The function (PlotBeadModel.OnFocus) defined within the public class called public.The function start at line 7855 and ends at 7856. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotBeadModel.OnKeyBox
def OnKeyBox(event):mode = cb.GetValue()if mode in ['jpeg','bmp','tiff',]:try:import Image as Imexcept ImportError:try:from PIL import Image as Imexcept ImportError:print ("PIL/pillow Image module not present. Cannot save images without this")raise Exception("PIL/pillow Image module not found")Fname = os.path.join(Mydi...
7
33
1
300
0
7,858
7,891
7,858
null
[]
None
null
0
0
0
null
0
null
The function (PlotBeadModel.OnKeyBox) defined within the public class called public.The function start at line 7858 and ends at 7891. It contains 33 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotBeadModel
def PlotBeadModel(G2frame,Atoms,defaults,PDBtext):'''Bead modelplotting package. For bead models from SHAPES'''def OnMouseDown(event):xy = event.GetPosition()defaults['oldxy'] = list(xy)def OnMouseMove(event):newxy = event.GetPosition()if event.Dragging():if event.LeftIsDown():SetRotation(newxy)Q = defaults['Quaternion...
4
49
4
453
38
7,697
7,929
7,697
null
['im', 'uColors', 'newxy', 'cPos', 'PDB', 'radius', 'dxy', 'color', 'matRot', 'cent', 'f', 'XYZ', 'cb', 'oldxy', 'Rd', 'Fade', 'View', 'Gr', 'VD', 'DQ', 'Q', 'q', 'Bl', 'V', 'VS', 'xy', 'uEdges', 'size', 'A', 'uBox', 'Qx', 'mode', 'Pix', 'Mydir', 'Qy', 'Fname', 'choice', 'aspect']
None
null
0
0
0
null
0
null
The function (PlotBeadModel) defined within the public class called public.The function start at line 7697 and ends at 7929. It contains 49 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [7697.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotRigidBody.FindBonds
def FindBonds(XYZ):rbTypes = rbData['rbTypes']Radii = []for Atype in rbTypes:Radii.append(AtInfo[Atype][0])if Atype == 'H':Radii[-1] = 0.5Radii = np.array(Radii)Bonds = [[] for i in range(len(Radii))]for i,xyz in enumerate(XYZ):Dx = XYZ-xyzdist = np.sqrt(np.sum(Dx**2,axis=1))sumR = Radii[i]+RadiiIndB = ma.nonzero(ma.ma...
6
18
1
189
0
7,935
7,952
7,935
null
[]
None
null
0
0
0
null
0
null
The function (PlotRigidBody.FindBonds) defined within the public class called public.The function start at line 7935 and ends at 7952. It contains 18 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotRigidBody.OnMouseDown
def OnMouseDown(event):xy = event.GetPosition()defaults['oldxy'] = list(xy)
1
3
1
21
0
7,954
7,956
7,954
null
[]
None
null
0
0
0
null
0
null
The function (PlotRigidBody.OnMouseDown) defined within the public class called public.The function start at line 7954 and ends at 7956. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotRigidBody.OnMouseMove
def OnMouseMove(event):newxy = event.GetPosition()if event.Dragging():if event.LeftIsDown():SetRotation(newxy)Q = defaults['Quaternion']G2frame.G2plotNB.status.SetStatusText('New quaternion: %.2f+, %.2fi+ ,%.2fj+, %.2fk'%(Q[0],Q[1],Q[2],Q[3]),1)elif event.MiddleIsDown():SetRotationZ(newxy)Q = defaults['Quaternion']G2fr...
4
12
1
125
0
7,958
7,970
7,958
null
[]
None
null
0
0
0
null
0
null
The function (PlotRigidBody.OnMouseMove) defined within the public class called public.The function start at line 7958 and ends at 7970. It contains 12 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotRigidBody.OnMouseWheel
def OnMouseWheel(event):defaults['cameraPos'] += event.GetWheelRotation()/24defaults['cameraPos'] = max(10,min(500,defaults['cameraPos']))G2frame.G2plotNB.status.SetStatusText('New camera distance: %.2f'%(defaults['cameraPos']),1)Draw('wheel')
1
5
1
59
0
7,972
7,976
7,972
null
[]
None
null
0
0
0
null
0
null
The function (PlotRigidBody.OnMouseWheel) defined within the public class called public.The function start at line 7972 and ends at 7976. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotRigidBody.SetBackground
def SetBackground():R,G,B,A = Page.camera['backColor']GL.glClearColor(R,G,B,A)GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT)
1
4
0
42
0
7,978
7,981
7,978
null
[]
None
null
0
0
0
null
0
null
The function (PlotRigidBody.SetBackground) defined within the public class called public.The function start at line 7978 and ends at 7981. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotRigidBody.SetLights
def SetLights():try:GL.glEnable(GL.GL_DEPTH_TEST)except:if GSASIIpath.GetConfigValue('debug'): print('depth test failed')returnGL.glShadeModel(GL.GL_FLAT)GL.glEnable(GL.GL_LIGHTING)GL.glEnable(GL.GL_LIGHT0)GL.glLightModeli(GL.GL_LIGHT_MODEL_TWO_SIDE,0)GL.glLightfv(GL.GL_LIGHT0,GL.GL_AMBIENT,[1,1,1,.8])GL.glLightfv(GL.G...
3
12
0
108
0
7,983
7,994
7,983
null
[]
None
null
0
0
0
null
0
null
The function (PlotRigidBody.SetLights) defined within the public class called public.The function start at line 7983 and ends at 7994. It contains 12 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotRigidBody.SetRotation
def SetRotation(newxy):#first get rotation vector in screen coords. & angle incrementoldxy = defaults['oldxy']if not len(oldxy): oldxy = list(newxy)dxy = newxy-oldxyif dxy[0] == dxy[1] == 0: return # on Mac motion can be less than a full pixel!defaults['oldxy'] = list(newxy)V = np.array([dxy[1],dxy[0],0.])A = 0.25*np.s...
3
16
1
177
0
7,996
8,015
7,996
null
[]
None
null
0
0
0
null
0
null
The function (PlotRigidBody.SetRotation) defined within the public class called public.The function start at line 7996 and ends at 8015. It contains 16 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotRigidBody.SetRotationZ
def SetRotationZ(newxy):#first get rotation vector (= view vector) in screen coords. & angle incrementView = GL.glGetIntegerv(GL.GL_VIEWPORT)cent = [View[2]/2,View[3]/2]oldxy = defaults['oldxy']if not len(oldxy): oldxy = list(newxy)dxy = newxy-oldxyif dxy[0] == dxy[1] == 0: return # on Mac motion can be less than a ful...
5
22
1
212
0
8,017
8,040
8,017
null
[]
None
null
0
0
0
null
0
null
The function (PlotRigidBody.SetRotationZ) defined within the public class called public.The function start at line 8017 and ends at 8040. It contains 22 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotRigidBody.RenderUnitVectors
def RenderUnitVectors(x,y,z):GL.glEnable(GL.GL_COLOR_MATERIAL)GL.glLineWidth(1)GL.glPushMatrix()GL.glTranslate(x,y,z)GL.glBegin(GL.GL_LINES)for line,color in zip(uEdges,uColors):GL.glColor3ubv(color)GL.glVertex3fv(-line[1])GL.glVertex3fv(line[1])GL.glEnd()GL.glPopMatrix()GL.glColor4ubv([0,0,0,0])GL.glDisable(GL.GL_COLO...
2
14
3
115
0
8,042
8,055
8,042
null
[]
None
null
0
0
0
null
0
null
The function (PlotRigidBody.RenderUnitVectors) defined within the public class called public.The function start at line 8042 and ends at 8055. It contains 14 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [8042.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotRigidBody.RenderSphere
def RenderSphere(x,y,z,radius,color):GL.glMaterialfv(GL.GL_FRONT_AND_BACK,GL.GL_DIFFUSE,color)GL.glPushMatrix()GL.glTranslate(x,y,z)q = GLU.gluNewQuadric()GLU.gluSphere(q,radius,20,10)GL.glPopMatrix()
1
7
5
66
0
8,057
8,063
8,057
null
[]
None
null
0
0
0
null
0
null
The function (PlotRigidBody.RenderSphere) defined within the public class called public.The function start at line 8057 and ends at 8063. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [8057.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotRigidBody.RenderBonds
def RenderBonds(x,y,z,Bonds,radius,color,slice=20):GL.glMaterialfv(GL.GL_FRONT_AND_BACK,GL.GL_DIFFUSE,color)GL.glPushMatrix()GL.glTranslate(x,y,z)for Dx in Bonds:GL.glPushMatrix()Z = np.sqrt(np.sum(Dx**2))if Z:azm = atan2d(-Dx[1],-Dx[0])phi = acosd(Dx[2]/Z)GL.glRotate(-azm,0,0,1)GL.glRotate(phi,1,0,0)q = GLU.gluNewQuad...
3
16
7
161
0
8,065
8,080
8,065
null
[]
None
null
0
0
0
null
0
null
The function (PlotRigidBody.RenderBonds) defined within the public class called public.The function start at line 8065 and ends at 8080. It contains 16 lines of code and it has a cyclomatic complexity of 3. It takes 7 parameters, represented as [8065.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotRigidBody.RenderLabel
def RenderLabel(x,y,z,label,matRot):GL.glPushMatrix()GL.glTranslate(x,y,z)GL.glDisable(GL.GL_LIGHTING)GL.glRasterPos3f(0,0,0)GL.glMultMatrixf(matRot)GL.glRotate(180,1,0,0) #fix to flip about x-axistext = gltext.TextElement(text=label,font=Font,foreground=wx.WHITE)text.draw_text(scale=0.025)GL.glEnable(GL.GL_LIGHTING)GL...
1
11
5
107
0
8,082
8,092
8,082
null
[]
None
null
0
0
0
null
0
null
The function (PlotRigidBody.RenderLabel) defined within the public class called public.The function start at line 8082 and ends at 8092. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [8082.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotRigidBody.Draw
def Draw(caller=''):#useful debug?#if caller:#print caller# end of useful debugcPos = defaults['cameraPos']VS = np.array(Page.canvas.GetSize())aspect = float(VS[0])/float(VS[1])Q = defaults['Quaternion']SetBackground()GL.glInitNames()GL.glPushName(0)GL.glMatrixMode(GL.GL_PROJECTION)GL.glLoadIdentity()if sys.platform ==...
8
46
1
438
0
8,094
8,145
8,094
null
[]
None
null
0
0
0
null
0
null
The function (PlotRigidBody.Draw) defined within the public class called public.The function start at line 8094 and ends at 8145. It contains 46 lines of code and it has a cyclomatic complexity of 8. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotRigidBody.OnSize
def OnSize(event):Draw('size')
1
2
1
9
0
8,147
8,148
8,147
null
[]
None
null
0
0
0
null
0
null
The function (PlotRigidBody.OnSize) defined within the public class called public.The function start at line 8147 and ends at 8148. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotRigidBody.OnFocus
def OnFocus(event):Draw('focus')
1
2
1
9
0
8,150
8,151
8,150
null
[]
None
null
0
0
0
null
0
null
The function (PlotRigidBody.OnFocus) defined within the public class called public.The function start at line 8150 and ends at 8151. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotRigidBody.OnKeyBox
def OnKeyBox(event):mode = cb.GetValue()if mode in ['jpeg','bmp','tiff',]:try:import Image as Imexcept ImportError:try:from PIL import Image as Imexcept ImportError:print ("PIL/pillow Image module not present. Cannot save images without this")raise Exception("PIL/pillow Image module not found")Fname = os.path.join(Mydi...
5
25
1
199
0
8,153
8,178
8,153
null
[]
None
null
0
0
0
null
0
null
The function (PlotRigidBody.OnKeyBox) defined within the public class called public.The function start at line 8153 and ends at 8178. It contains 25 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotRigidBody.UpdateDraw
def UpdateDraw():'''This updates the drawing arrays in place'''for i,Ty in enumerate(rbData['rbTypes']):atNames[i] = str(i)+':'+Tyfor i in range(len(XYZ)):XYZ[i].fill(0)for imag,mag in enumerate(rbData['VectMag']):XYZ[i] += mag*rbData['rbVect'][imag][i]# number of bonds should not change (=# of atoms)newBonds = FindBon...
5
12
0
113
0
8,180
8,193
8,180
null
[]
None
null
0
0
0
null
0
null
The function (PlotRigidBody.UpdateDraw) defined within the public class called public.The function start at line 8180 and ends at 8193. It contains 12 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotRigidBody
def PlotRigidBody(G2frame,rbType,AtInfo,rbData,defaults):'''RB plotting package. Can show rigid body structures as balls & sticks'''def FindBonds(XYZ):rbTypes = rbData['rbTypes']Radii = []for Atype in rbTypes:Radii.append(AtInfo[Atype][0])if Atype == 'H':Radii[-1] = 0.5Radii = np.array(Radii)Bonds = [[] for i in range(...
14
77
5
676
56
7,932
8,257
7,932
null
['dist', 'im', 'uColors', 'Seq', 'newxy', 'cPos', 'radius', 'dxy', 'color', 'text', 'cent', 'f', 'matRot', 'XYZ', 'CL', 'cb', 'oldxy', 'Rd', 'IndB', 'View', 'Gr', 's', 'phi', 'VD', 'Font', 'DQ', 'Z', 'Dx', 'Radii', 'Bonds', 'Q', 'atNames', 'q', 'vb', 'Bl', 'V', 'newBonds', 'azm', 'VS', 'xy', 'uEdges', 'selected', 'A', ...
None
null
0
0
0
null
0
null
The function (PlotRigidBody) defined within the public class called public.The function start at line 7932 and ends at 8257. It contains 77 lines of code and it has a cyclomatic complexity of 14. It takes 5 parameters, represented as [7932.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers.FindBonds
def FindBonds(atTypes,XYZ):Radii = []for Atype in atTypes:Radii.append(AtInfo[Atype[0]]['Drad'])if Atype[0] == 'H':Radii[-1] = 0.5Radii = np.array(Radii)Bonds = [[] for i in range(len(Radii))]for i,xyz in enumerate(XYZ):Dx = np.inner(Amat,(XYZ-xyz)).Tdist = np.sqrt(np.sum(Dx**2,axis=1))sumR = Radii[i]+RadiiIndB = ma.no...
6
17
2
202
0
8,265
8,281
8,265
null
[]
None
null
0
0
0
null
0
null
The function (PlotLayers.FindBonds) defined within the public class called public.The function start at line 8265 and ends at 8281. It contains 17 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [8265.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers.FindFaces
def FindFaces(Bonds):Faces = []for bonds in Bonds:faces = []if len(bonds) > 2:FaceGen = G2lat.uniqueCombinations(bonds,3) #N.B. this is a generatorfor face in FaceGen:vol = nl.det(face)if abs(vol) > .5 or len(bonds) == 3:if vol < 0.:face = [face[0],face[2],face[1]]face = 1.8*np.array(face)if not np.array([np.array(nl.d...
9
18
1
198
0
8,283
8,300
8,283
null
[]
None
null
0
0
0
null
0
null
The function (PlotLayers.FindFaces) defined within the public class called public.The function start at line 8283 and ends at 8300. It contains 18 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers.getAtoms
def getAtoms():global AtNames,AtTypes,XYZ,Bonds,FacesAtNames = []AtTypes = []newXYZ = np.zeros((0,3))TX = np.zeros(3)for il in range(len(laySeq)):layer = laySeq[il]if Layers['Layers'][layer]['SameAs']:layer = Names.index(Layers['Layers'][layer]['SameAs'])atNames = [atom[0] for atom in Layers['Layers'][layer]['Atoms']]a...
12
38
0
393
0
8,302
8,343
8,302
null
[]
None
null
0
0
0
null
0
null
The function (PlotLayers.getAtoms) defined within the public class called public.The function start at line 8302 and ends at 8343. It contains 38 lines of code and it has a cyclomatic complexity of 12. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers.OnKeyBox
def OnKeyBox(event):mode = cb.GetValue()if mode in ['jpeg','bmp','tiff',]:try:import Image as Imexcept ImportError:try:from PIL import Image as Imexcept ImportError:print ("PIL/pillow Image module not present. Cannot save images without this")raise Exception("PIL/pillow Image module not found")projFile = G2frame.GSASpr...
6
28
1
233
0
8,345
8,372
8,345
null
[]
None
null
0
0
0
null
0
null
The function (PlotLayers.OnKeyBox) defined within the public class called public.The function start at line 8345 and ends at 8372. It contains 28 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers.OnPlotKeyPress
def OnPlotKeyPress(event):global AtNames,AtTypes,XYZ,Bondstry:key = event.GetKeyCode()if key > 255:key = 0keyCode = chr(key)except AttributeError: #if from OnKeyBox abovekeyCode = str(event.key).upper()dx = 0.dy = 0.dz = 0.if keyCode == 'L':Page.labels = not Page.labelsDraw('labels')returnelif keyCode =='F' and len(lay...
14
45
1
287
0
8,374
8,418
8,374
null
[]
None
null
0
0
0
null
0
null
The function (PlotLayers.OnPlotKeyPress) defined within the public class called public.The function start at line 8374 and ends at 8418. It contains 45 lines of code and it has a cyclomatic complexity of 14. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers.SetTransText
def SetTransText(Yi,Xi,XYZ,id):page = G2frame.phaseDisplay.GetSelection()if page:if G2frame.phaseDisplay.GetPageText(page) == 'Layers':G2frame.phaseDisplay.GetPage(page).transGrids[Yi].Refresh()
3
5
4
52
0
8,420
8,424
8,420
null
[]
None
null
0
0
0
null
0
null
The function (PlotLayers.SetTransText) defined within the public class called public.The function start at line 8420 and ends at 8424. It contains 5 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [8420.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers.OnMouseDown
def OnMouseDown(event):xy = event.GetPosition()defaults['oldxy'] = list(xy)
1
3
1
21
0
8,426
8,428
8,426
null
[]
None
null
0
0
0
null
0
null
The function (PlotLayers.OnMouseDown) defined within the public class called public.The function start at line 8426 and ends at 8428. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers.OnMouseMove
def OnMouseMove(event):newxy = event.GetPosition()if event.Dragging():if event.LeftIsDown():SetRotation(newxy)elif event.RightIsDown():SetTranslation(newxy)Tx,Ty,Tz = defaults['viewPoint'][0]elif event.MiddleIsDown():SetRotationZ(newxy)Draw('move')
5
11
1
69
0
8,430
8,441
8,430
null
[]
None
null
0
0
0
null
0
null
The function (PlotLayers.OnMouseMove) defined within the public class called public.The function start at line 8430 and ends at 8441. It contains 11 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers.OnMouseWheel
def OnMouseWheel(event):defaults['cameraPos'] += event.GetWheelRotation()/24defaults['cameraPos'] = max(10,min(500,defaults['cameraPos']))Draw('wheel')
1
4
1
40
0
8,443
8,446
8,443
null
[]
None
null
0
0
0
null
0
null
The function (PlotLayers.OnMouseWheel) defined within the public class called public.The function start at line 8443 and ends at 8446. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers.SetBackground
def SetBackground():R,G,B,A = Page.camera['backColor']GL.glClearColor(R,G,B,A)GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT)
1
4
0
42
0
8,448
8,451
8,448
null
[]
None
null
0
0
0
null
0
null
The function (PlotLayers.SetBackground) defined within the public class called public.The function start at line 8448 and ends at 8451. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers.SetLights
def SetLights():try:GL.glEnable(GL.GL_DEPTH_TEST)except:if GSASIIpath.GetConfigValue('debug'): print('depth test failed')returnGL.glShadeModel(GL.GL_FLAT)GL.glEnable(GL.GL_LIGHTING)GL.glEnable(GL.GL_LIGHT0)GL.glLightModeli(GL.GL_LIGHT_MODEL_TWO_SIDE,0)GL.glLightfv(GL.GL_LIGHT0,GL.GL_AMBIENT,[1,1,1,.8])GL.glLightfv(GL.G...
3
12
0
108
0
8,453
8,464
8,453
null
[]
None
null
0
0
0
null
0
null
The function (PlotLayers.SetLights) defined within the public class called public.The function start at line 8453 and ends at 8464. It contains 12 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers.SetTranslation
def SetTranslation(newxy):#first get translation vector in screen coords.oldxy = defaults['oldxy']if not len(oldxy): oldxy = list(newxy)dxy = newxy-oldxydefaults['oldxy'] = list(newxy)V = np.array([-dxy[0],dxy[1],0.])#then transform to rotated crystal coordinates & apply to view pointQ = defaults['Quaternion']V = np.in...
2
14
1
150
0
8,466
8,481
8,466
null
[]
None
null
0
0
0
null
0
null
The function (PlotLayers.SetTranslation) defined within the public class called public.The function start at line 8466 and ends at 8481. It contains 14 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers.SetRotation
def SetRotation(newxy):#first get rotation vector in screen coords. & angle incrementoldxy = defaults['oldxy']if not len(oldxy): oldxy = list(newxy)dxy = newxy-oldxyif not np.any(dxy): return# on Mac motion can be less than a full pixel!defaults['oldxy'] = list(newxy)V = np.array([dxy[1],dxy[0],0.])A = 0.25*np.sqrt(dxy...
3
16
1
173
0
8,483
8,502
8,483
null
[]
None
null
0
0
0
null
0
null
The function (PlotLayers.SetRotation) defined within the public class called public.The function start at line 8483 and ends at 8502. It contains 16 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers.SetRotationZ
def SetRotationZ(newxy):#first get rotation vector (= view vector) in screen coords. & angle incrementView = GL.glGetIntegerv(GL.GL_VIEWPORT)cent = [View[2]/2,View[3]/2]oldxy = defaults['oldxy']if not len(oldxy): oldxy = list(newxy)dxy = newxy-oldxyif not np.any(dxy): return# on Mac motion can be less than a full pixel...
5
22
1
208
0
8,504
8,527
8,504
null
[]
None
null
0
0
0
null
0
null
The function (PlotLayers.SetRotationZ) defined within the public class called public.The function start at line 8504 and ends at 8527. It contains 22 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers.RenderUnitVectors
def RenderUnitVectors(x,y,z):GL.glEnable(GL.GL_COLOR_MATERIAL)GL.glLineWidth(1)GL.glPushMatrix()GL.glTranslate(x,y,z)GL.glBegin(GL.GL_LINES)for line,color in zip(uEdges,uColors):GL.glColor3ubv(color)GL.glVertex3fv(line[0])GL.glVertex3fv(line[1])GL.glEnd()GL.glPopMatrix()GL.glColor4ubv([0,0,0,0])GL.glDisable(GL.GL_COLOR...
2
14
3
114
0
8,529
8,542
8,529
null
[]
None
null
0
0
0
null
0
null
The function (PlotLayers.RenderUnitVectors) defined within the public class called public.The function start at line 8529 and ends at 8542. It contains 14 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [8529.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers.RenderSphere
def RenderSphere(x,y,z,radius,color):GL.glMaterialfv(GL.GL_FRONT_AND_BACK,GL.GL_DIFFUSE,color)GL.glPushMatrix()GL.glTranslate(x,y,z)GL.glMultMatrixf(B4mat.T)q = GLU.gluNewQuadric()GLU.gluSphere(q,radius,20,10)GL.glPopMatrix()
1
8
5
74
0
8,544
8,551
8,544
null
[]
None
null
0
0
0
null
0
null
The function (PlotLayers.RenderSphere) defined within the public class called public.The function start at line 8544 and ends at 8551. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [8544.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers.RenderBonds
def RenderBonds(x,y,z,Bonds,radius,color,slice=20):GL.glMaterialfv(GL.GL_FRONT_AND_BACK,GL.GL_DIFFUSE,color)GL.glPushMatrix()GL.glTranslate(x,y,z)GL.glMultMatrixf(B4mat.T)for Dx in Bonds:GL.glPushMatrix()Z = np.sqrt(np.sum(Dx**2))if Z:azm = atan2d(-Dx[1],-Dx[0])phi = acosd(Dx[2]/Z)GL.glRotate(-azm,0,0,1)GL.glRotate(phi...
3
17
7
169
0
8,553
8,569
8,553
null
[]
None
null
0
0
0
null
0
null
The function (PlotLayers.RenderBonds) defined within the public class called public.The function start at line 8553 and ends at 8569. It contains 17 lines of code and it has a cyclomatic complexity of 3. It takes 7 parameters, represented as [8553.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers.RenderPolyhedra
def RenderPolyhedra(x,y,z,Faces,color):GL.glShadeModel(GL.GL_FLAT)GL.glPushMatrix()GL.glTranslate(x,y,z)GL.glMaterialfv(GL.GL_FRONT_AND_BACK,GL.GL_DIFFUSE,color)GL.glShadeModel(GL.GL_SMOOTH)GL.glMultMatrixf(B4mat.T)for face,norm in Faces:GL.glPolygonMode(GL.GL_FRONT_AND_BACK,GL.GL_FILL)GL.glFrontFace(GL.GL_CW)GL.glNorm...
3
17
5
136
0
8,571
8,587
8,571
null
[]
None
null
0
0
0
null
0
null
The function (PlotLayers.RenderPolyhedra) defined within the public class called public.The function start at line 8571 and ends at 8587. It contains 17 lines of code and it has a cyclomatic complexity of 3. It takes 5 parameters, represented as [8571.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers.RenderLabel
def RenderLabel(x,y,z,label,matRot):GL.glPushMatrix()GL.glTranslate(x,y,z)GL.glMultMatrixf(B4mat.T)GL.glDisable(GL.GL_LIGHTING)GL.glRasterPos3f(0,0,0)GL.glMultMatrixf(matRot)GL.glRotate(180,1,0,0) #fix to flip about x-axistext = gltext.TextElement(text=label,font=Font,foreground=wx.WHITE)text.draw_text(scale=0.025)GL.g...
1
12
5
115
0
8,589
8,600
8,589
null
[]
None
null
0
0
0
null
0
null
The function (PlotLayers.RenderLabel) defined within the public class called public.The function start at line 8589 and ends at 8600. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [8589.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers.Draw
def Draw(caller=''):#useful debug?#if caller:#print caller# end of useful debugglobal AtNames,AtTypes,XYZ,Bonds,FacescPos = defaults['cameraPos']VS = np.array(Page.canvas.GetSize())aspect = float(VS[0])/float(VS[1])Tx,Ty,Tz = defaults['viewPoint'][0]Q = defaults['Quaternion']SetBackground()GL.glInitNames()GL.glPushName...
12
53
1
524
0
8,602
8,660
8,602
null
[]
None
null
0
0
0
null
0
null
The function (PlotLayers.Draw) defined within the public class called public.The function start at line 8602 and ends at 8660. It contains 53 lines of code and it has a cyclomatic complexity of 12. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers.OnSize
def OnSize(event):Draw('size')
1
2
1
9
0
8,662
8,663
8,662
null
[]
None
null
0
0
0
null
0
null
The function (PlotLayers.OnSize) defined within the public class called public.The function start at line 8662 and ends at 8663. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers.OnFocus
def OnFocus(event):Draw('focus')
1
2
1
9
0
8,665
8,666
8,665
null
[]
None
null
0
0
0
null
0
null
The function (PlotLayers.OnFocus) defined within the public class called public.The function start at line 8665 and ends at 8666. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotLayers
def PlotLayers(G2frame,Layers,laySeq,defaults,firstCall=False):'''Layer plotting package. Can show layer structures as balls & sticks'''global AtNames,AtTypes,XYZ,Bonds,Facesdef FindBonds(atTypes,XYZ):Radii = []for Atype in atTypes:Radii.append(AtInfo[Atype[0]]['Drad'])if Atype[0] == 'H':Radii[-1] = 0.5Radii = np.array...
6
78
5
950
83
8,260
8,723
8,260
null
['FaceGen', 'color', 'XYZ', 'norm', 'page', 'Units', 'projFile', 'VD', 'DQ', 'Radii', 'Bonds', 'atNames', 'q', 'dx', 'Bc', 'indB', 'bondRad', 'aspect', 'dist', 'uColors', 'A4mat', 'cPos', 'dxy', 'text', 'cent', 'face', 'CL', 'dy', 'Rd', 'Gr', 'Font', 'key', 'Bl', 'Wt', 'VS', 'xy', 'uBox', 'Faces', 'Qy', 'nb', 'dz', 'im...
None
null
0
0
0
null
0
null
The function (PlotLayers) defined within the public class called public.The function start at line 8260 and ends at 8723. It contains 78 lines of code and it has a cyclomatic complexity of 6. It takes 5 parameters, represented as [8260.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotClusterXYZ.OnMotion
def OnMotion(event):global SetPickif event.xdata and event.ydata:G2frame.G2plotNB.status.SetStatusText('x=%.3f y=%.3f'%(event.xdata,event.ydata),1)SetPick = True
3
5
1
41
0
8,741
8,745
8,741
null
[]
None
null
0
0
0
null
0
null
The function (PlotClusterXYZ.OnMotion) defined within the public class called public.The function start at line 8741 and ends at 8745. It contains 5 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotClusterXYZ.OnPick
def OnPick(event):global SetPickif SetPick:line = event.artistind = int(line.get_label().split('tion')[1])text = 'PCA Data selected: (%d) %s'%(ind,CLuDict['Files'][ind])G2frame.G2plotNB.status.SetStatusText(text,1)SetPick = Falseprint(text)
2
9
1
67
0
8,747
8,755
8,747
null
[]
None
null
0
0
0
null
0
null
The function (PlotClusterXYZ.OnPick) defined within the public class called public.The function start at line 8747 and ends at 8755. It contains 9 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotClusterXYZ
def PlotClusterXYZ(G2frame,YM,XYZ,CLuDict,Title='',PlotName='cluster'):''' To plot cluster analysis results:param wx.Frame G2frame: The main GSAS-II tree "window":param array YM: data matrix; plotted as contour:param array XYZ: array of 3D PCA coordinates; plotted as 3D scatter plot;param dict CLuDict: Cluster info; ma...
27
117
6
1,337
20
8,727
8,867
8,727
null
['meanI', 'cax', 'neighD', 'ax1', 'text', 'N', 'Ndata', 'Imin', 'ax2', 'ind', 'Codes', 'line', 'ax4', 'ax3', 'S', 'gs', 'SetPick', 'Imax', 'Colors', 'Suprise']
None
null
0
0
0
null
0
null
The function (PlotClusterXYZ) defined within the public class called public.The function start at line 8727 and ends at 8867. It contains 117 lines of code and it has a cyclomatic complexity of 27. It takes 6 parameters, represented as [8727.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PhaseWtSum
def PhaseWtSum(G2frame,histo):'''Calculate sum of phase mass*phase fraction for PWDR data (exclude magnetic phases):param G2frame: GSASII main frame structure:param str histo: histogram name:returns: sum(scale*mass) for phases in histo'''Histograms,Phases = G2frame.GetUsedHistogramsAndPhasesfromTree()wtSum = 0.0for pha...
5
11
2
106
3
75
92
75
null
['wtSum', 'phFr', 'mass']
None
null
0
0
0
null
0
null
The function (PhaseWtSum) defined within the public class called public.The function start at line 75 and ends at 92. It contains 11 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [75.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Transmission
def Transmission(Geometry,Abs,Diam):'''Calculate sample transmission:param str Geometry: one of 'Cylinder','Bragg-Brentano','Tilting flat plate in transmission','Fixed flat plate':param float Abs: absorption coeff in cm-1:param float Diam: sample thickness/diameter in mm'''if 'Cylinder' in Geometry:#Lobanov & Alte da V...
6
25
3
202
7
95
126
95
null
['T0', 'MuR', 'T4', 'T1', 'T', 'T3', 'T2']
None
null
0
0
0
null
0
null
The function (Transmission) defined within the public class called public.The function start at line 95 and ends at 126. It contains 25 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [95.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SurfaceRough
def SurfaceRough(SRA,SRB,Tth):''' Suortti (J. Appl. Cryst, 5,325-331, 1972) surface roughness correction:param float SRA: Suortti surface roughness parameter:param float SRB: Suortti surface roughness parameter:param float Tth: 2-theta(deg) - can be numpy array'''sth = npsind(Tth/2.)T1 = np.exp(-SRB/sth)T2 = SRA+(1.-SR...
1
5
3
63
3
128
138
128
null
['sth', 'T2', 'T1']
None
null
0
0
0
null
0
null
The function (SurfaceRough) defined within the public class called public.The function start at line 128 and ends at 138. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [128.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SurfaceRoughDerv
def SurfaceRoughDerv(SRA,SRB,Tth):''' Suortti surface roughness correction derivatives:param float SRA: Suortti surface roughness parameter (dimensionless):param float SRB: Suortti surface roughness parameter (dimensionless):param float Tth: 2-theta(deg) - can be numpy array:return list: [dydSRA,dydSRB] derivatives to ...
1
8
3
129
6
140
153
140
null
['T1', 'dydSRA', 'sth', 'dydSRB', 'Trans', 'T2']
None
null
0
0
0
null
0
null
The function (SurfaceRoughDerv) defined within the public class called public.The function start at line 140 and ends at 153. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [140.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Absorb.muRunder3
def muRunder3(MuR,Sth2):T0 = 16.0/(3.*np.pi)T1 = (25.99978-0.01911*Sth2**0.25)*np.exp(-0.024551*Sth2)+ \0.109561*np.sqrt(Sth2)-26.04556T2 = -0.02489-0.39499*Sth2+1.219077*Sth2**1.5- \1.31268*Sth2**2+0.871081*Sth2**2.5-0.2327*Sth2**3T3 = 0.003045+0.018167*Sth2-0.03305*Sth2**2Trns = -T0*MuR-T1*MuR**2-T2*MuR**3-T3*MuR**4r...
1
9
2
165
0
164
172
164
null
[]
None
null
0
0
0
null
0
null
The function (Absorb.muRunder3) defined within the public class called public.The function start at line 164 and ends at 172. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [164.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Absorb.muRover3
def muRover3(MuR,Sth2):T1 = 1.433902+11.07504*Sth2-8.77629*Sth2*Sth2+ \10.02088*Sth2**3-3.36778*Sth2**4T2 = (0.013869-0.01249*Sth2)*np.exp(3.27094*Sth2)+ \(0.337894+13.77317*Sth2)/(1.0+11.53544*Sth2)**1.555039T3 = 1.933433/(1.0+23.12967*Sth2)**1.686715- \0.13576*np.sqrt(Sth2)+1.163198T4 = 0.044365-0.04259/(1.0+0.41051*...
1
10
2
190
0
174
183
174
null
[]
None
null
0
0
0
null
0
null
The function (Absorb.muRover3) defined within the public class called public.The function start at line 174 and ends at 183. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [174.0] and does not return any value..