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
UpdatePhaseData.UpdatePhaseData.FillRigidBodyGrid.UpdatePhaseData.UpdatePhaseData.FillRigidBodyGrid.VecrbSizer.OnDelVecRB
def OnDelVecRB(event):Obj = event.GetEventObject()RBId = Indx[Obj.GetId()]RBData['Vector'][RBId]['useCount'] -= 1del data['RBModels']['Vector'][resIndx]G2plt.PlotStructure(G2frame,data)wx.CallAfter(FillRigidBodyGrid,True,vecId=resIndx)
1
7
1
65
0
10,023
10,029
10,023
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.FillRigidBodyGrid.UpdatePhaseData.UpdatePhaseData.FillRigidBodyGrid.VecrbSizer.OnDelVecRB) defined within the public class called public.The function start at line 10023 and ends at 10029. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function doe...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.FillRigidBodyGrid.VecrbSizer
def VecrbSizer(RBObj,resIndx):'''Displays details for selected vector rigid body'''def OnFrac(invalid,value,tc):for Id in RBObj['Ids']:if data['Atoms'][AtLookUp[Id]][cx+3]:data['Atoms'][AtLookUp[Id]][cx+3] = valuedef OnRefFrac(event):RBObj['AtomFrac'][1] = not RBObj['AtomFrac'][1]def OnDelVecRB(event):Obj = event.GetEv...
3
42
2
466
0
10,013
10,068
10,013
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.FillRigidBodyGrid.VecrbSizer) defined within the public class called public.The function start at line 10013 and ends at 10068. It contains 42 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [10013.0] and does not return any valu...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.FillRigidBodyGrid.OnVecSelect
def OnVecSelect(event):global prevVecIdprevVecId = vecSelect.GetSelection()try:resSelect.Deselect(resSelect.GetSelection())except:passtry:spnSelect.Deselect(spnSelect.GetSelection())except:passwx.CallLater(100,RepaintRBInfo,'Vector',prevVecId)
3
12
1
56
0
10,070
10,081
10,070
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.FillRigidBodyGrid.OnVecSelect) defined within the public class called public.The function start at line 10070 and ends at 10081. 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
UpdatePhaseData.UpdatePhaseData.FillRigidBodyGrid.OnResSelect
def OnResSelect(event):global prevResIdprevResId = resSelect.GetSelection()try:vecSelect.Deselect(vecSelect.GetSelection())except:passtry:spnSelect.Deselect(spnSelect.GetSelection())except:pass# define the parameters needed to drag the RB with the mousedata['testRBObj'] = {}rbType = 'Residue'data['testRBObj']['rbObj'] ...
8
43
1
441
0
10,083
10,129
10,083
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.FillRigidBodyGrid.OnResSelect) defined within the public class called public.The function start at line 10083 and ends at 10129. It contains 43 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
UpdatePhaseData.UpdatePhaseData.FillRigidBodyGrid.OnSpnSelect
def OnSpnSelect(event):global prevSpnIdprevSpnId = spnSelect.GetSelection()try:resSelect.Deselect(resSelect.GetSelection())except:passtry:vecSelect.Deselect(vecSelect.GetSelection())except:passwx.CallLater(100,RepaintRBInfo,'Spin',prevSpnId)
3
12
1
56
0
10,131
10,142
10,131
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.FillRigidBodyGrid.OnSpnSelect) defined within the public class called public.The function start at line 10131 and ends at 10142. 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
UpdatePhaseData.UpdatePhaseData.FillRigidBodyGrid.RepaintRBInfo
def RepaintRBInfo(rbType,rbIndx,Scroll=0):oldFocus = wx.Window.FindFocus()try:if 'phoenix' in wx.version():G2frame.bottomSizer.Clear(True)else:G2frame.bottomSizer.DeleteWindows()except:returnIndx.clear()rbObj = data['RBModels'][rbType][rbIndx]Quad = rbObj['Orient'][0]data['Drawing']['Quaternion'] = G2mth.invQ(Quad)if r...
6
30
3
267
0
10,144
10,173
10,144
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.FillRigidBodyGrid.RepaintRBInfo) defined within the public class called public.The function start at line 10144 and ends at 10173. It contains 30 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [10144.0] and does not return any v...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.FillRigidBodyGrid
def FillRigidBodyGrid(refresh=True,vecId=None,resId=None,spnId=None):'''Fill the Rigid Body Phase information tab page.Note that the page is a ScrolledWindow, not a Grid'''resVarLookup = []def OnThermSel(event):Obj = event.GetEventObject()RBObj = Indx[Obj.GetId()]val = Obj.GetValue()Ttype = 'A'if val == 'Uiso':Ttype = ...
30
141
4
1,198
0
9,465
10,311
9,465
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.FillRigidBodyGrid) defined within the public class called public.The function start at line 9465 and ends at 10311. It contains 141 lines of code and it has a cyclomatic complexity of 30. It takes 4 parameters, represented as [9465.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.OnRBCopyParms
def OnRBCopyParms(event):RBObjs = []for rbType in ['Vector','Residue']:RBObjs += data['RBModels'].get(rbType,[])if not len(RBObjs):print ('**** ERROR - no rigid bodies defined ****')returnif len(RBObjs) == 1:print ('**** INFO - only one rigid body defined; nothing to copy to ****')returnSource = []sourceRB = {}for RBOb...
10
29
1
218
0
10,313
10,341
10,313
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.OnRBCopyParms) defined within the public class called public.The function start at line 10313 and ends at 10341. It contains 29 lines of code and it has a cyclomatic complexity of 10. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.assignAtoms
def assignAtoms(RBData,selDict={},unmatchedRBatoms=None):'''Find the closest RB atoms to atoms in the structureIf selDict is specified, it overrides the assignments to specifyatoms that should be matched.'''general = data['General']cx,ct = general['AtomPtrs'][:2]Amat,Bmat = G2lat.cell2AB(general['Cell'][1:7])rbType = d...
27
78
3
681
0
10,343
10,431
10,343
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.assignAtoms) defined within the public class called public.The function start at line 10343 and ends at 10431. It contains 78 lines of code and it has a cyclomatic complexity of 27. It takes 3 parameters, represented as [10343.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.OnAddRB
def OnAddRB(event):'respond to RB Add button, sets RB info in phase'dataGeneral = data['General']dataGeneral['SpnIds'] = dataGeneral.get('SpnIds',{})cx,ct,cs,cia = dataGeneral['AtomPtrs']rbType = data['testRBObj']['rbType']atomData = data['Atoms']if RigidBodies.atomsGrid:matchTable = UpdateTable()else:matchTable = assi...
23
88
1
730
0
10,440
10,530
10,440
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.OnAddRB) defined within the public class called public.The function start at line 10440 and ends at 10530. It contains 88 lines of code and it has a cyclomatic complexity of 23. The function does not take any parame...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.OnCancel
def OnCancel(event):del data['testRBObj']FillRigidBodyGrid(True)
1
3
1
14
0
10,532
10,534
10,532
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.OnCancel) defined within the public class called public.The function start at line 10532 and ends at 10534. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any paramet...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.OnTorAngle
def OnTorAngle(invalid,value,tc):'''respond to a number entered into the torsion editor.Update the slider (number is already saved)recompute atom distances'''[tor,torSlide] = Indx[tc.GetId()]torSlide.ChangeValue(int(value*10))UpdateTablePlot()
1
4
3
38
0
10,536
10,543
10,536
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.OnTorAngle) defined within the public class called public.The function start at line 10536 and ends at 10543. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented a...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.OnTorSlide
def OnTorSlide(event):'''respond to the slider moving. Put value into editor & saverecompute atom distances'''Obj = event.GetEventObject()tor,ang = Indx[Obj.GetId()]Tors = data['testRBObj']['rbObj']['Torsions'][tor]val = float(Obj.GetValue())/10.Tors[0] = valang.ChangeValue(val)UpdateTablePlot()
1
8
1
68
0
10,545
10,555
10,545
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.OnTorSlide) defined within the public class called public.The function start at line 10545 and ends at 10555. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any param...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.UpdateTable
def UpdateTable(event=None):'''get fixed atom assignments, find closest mappings &update displayed table'''if not RigidBodies.atomsGrid: return []RigidBodies.atomsGrid.completeEdits()# add new atoms and reassignadded = FalseselDict = getSelectedAtoms()if selDict is None: returnfor i,l in enumerate(RigidBodies.atomsTabl...
9
19
1
166
0
10,557
10,579
10,557
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.UpdateTable) defined within the public class called public.The function start at line 10557 and ends at 10579. It contains 19 lines of code and it has a cyclomatic complexity of 9. The function does not take any par...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.OnAzSlide
def OnAzSlide(event):'''respond to the azimuth slider moving.Save & put value into azimuth edit widget; show Q &update the plot and table'''Obj = event.GetEventObject()rbObj['OrientVec'][0] = float(Obj.GetValue())/10.for i in range(4):val = rbObj['OrientVec'][i]G2frame.testRBObjSizers['OrientVecSiz'][i].ChangeValue(val...
2
13
1
144
0
10,581
10,597
10,581
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.OnAzSlide) defined within the public class called public.The function start at line 10581 and ends at 10597. It contains 13 lines of code and it has a cyclomatic complexity of 2. The function does not take any param...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.UpdateOrientation
def UpdateOrientation(*args,**kwargs):'''Respond to a change in the azimuth or vector viathe edit widget; update Q display & azimuth slider'''Q = G2mth.AVdeg2Q(rbObj['OrientVec'][0],np.inner(Amat,rbObj['OrientVec'][1:]))rbObj['Orient'][0] = Qtry:G2frame.testRBObjSizers['OrientVecSiz'][4].ChangeValue(int(10*rbObj['Orien...
2
11
2
94
0
10,599
10,612
10,599
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.UpdateOrientation) defined within the public class called public.The function start at line 10599 and ends at 10612. It contains 11 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, repre...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.UpdateTablePlot
def UpdateTablePlot(*args,**kwargs):'''update displayed table and plot'''G2plt.PlotStructure(G2frame,data,False,UpdateTable)UpdateTable()
1
3
2
25
0
10,614
10,618
10,614
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.UpdateTablePlot) defined within the public class called public.The function start at line 10614 and ends at 10618. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represen...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.UpdateSytSym
def UpdateSytSym(*args,**kwargs):Sytsym,Mult = G2spc.SytSym(rbObj['Orig'][0],data['General']['SGData'])[:2]sytsymtxt.SetLabel('Origin site symmetry: %s, multiplicity: %d '%(Sytsym,Mult))UpdateTablePlot(args,kwargs)
1
4
2
55
0
10,620
10,624
10,620
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.UpdateSytSym) defined within the public class called public.The function start at line 10620 and ends at 10624. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.getSelectedAtoms
def getSelectedAtoms():'Find the FB atoms that have been assigned to specific atoms in structure'if not RigidBodies.atomsGrid: returnRigidBodies.atomsGrid.completeEdits()tbl = RigidBodies.atomsGrid.GetTable()selDict = {}dups = []assigned = []atomsLabels = [a[0] for a in data['Atoms']]for r in range(tbl.GetRowsCount()):...
11
29
0
180
0
10,626
10,654
10,626
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.getSelectedAtoms) defined within the public class called public.The function start at line 10626 and ends at 10654. It contains 29 lines of code and it has a cyclomatic complexity of 11. The function does not take a...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.getDeltaXYZ
def getDeltaXYZ(selDict,data,rbObj):'''Evaluate the RB position & return the difference between the coordinatesand RB coordinates with origin and orientation from data['testRBObj']'''Amat,Bmat = G2lat.cell2AB(data['General']['Cell'][1:7])rbXYZ = G2mth.UpdateRBXYZ(Bmat,rbObj,data['testRBObj']['rbData'],data['testRBObj']...
3
9
3
112
0
10,656
10,667
10,656
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.getDeltaXYZ) defined within the public class called public.The function start at line 10656 and ends at 10667. It contains 9 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented ...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.objectiveDeltaPos
def objectiveDeltaPos(vals,selDict,data,rbObj_in):'''Objective function for minimization.Returns a list of distances between atom positions andlocated rigid body positions:param list vals: a 4 or 7 element array with 4 quaterian values or 4 quaterian values followed by 3 origin (x,y,z) values:returns: the 3*n distances...
2
6
4
78
0
10,669
10,684
10,669
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.objectiveDeltaPos) defined within the public class called public.The function start at line 10669 and ends at 10684. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, repres...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.onSetOrigin
def onSetOrigin(event):'Set Origin to best fit selected atoms'if rbObj['fixOrig']:wx.MessageBox('Not possible with origin locked',caption='Οrigin Locked',style=wx.ICON_EXCLAMATION)returnselDict = getSelectedAtoms()if len(selDict) < 1:wx.MessageBox('No existing atoms were selected',caption='Select Atom(s)',style=wx.ICON...
4
16
1
130
0
10,686
10,702
10,686
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.onSetOrigin) defined within the public class called public.The function start at line 10686 and ends at 10702. It contains 16 lines of code and it has a cyclomatic complexity of 4. The function does not take any par...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.onFitOrientation
def onFitOrientation(event):'Set Orientation to best fit selected atoms'selDict = getSelectedAtoms()if len(selDict) < 2:wx.MessageBox('At least two existing atoms must be selected',caption='Select Atoms',style=wx.ICON_EXCLAMATION)returnvals = rbObj['Orient'][0][:] #+ rbObj['Orig'][0][:]out = so.leastsq(objectiveDeltaPo...
2
12
1
106
0
10,704
10,715
10,704
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.onFitOrientation) defined within the public class called public.The function start at line 10704 and ends at 10715. It contains 12 lines of code and it has a cyclomatic complexity of 2. The function does not take an...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.onFitBoth
def onFitBoth(event):'Set Orientation and origin to best fit selected atoms'if rbObj['fixOrig']:wx.MessageBox('Not possible with origin locked',caption='Οrigin Locked',style=wx.ICON_EXCLAMATION)returnselDict = getSelectedAtoms()if len(selDict) < 3:wx.MessageBox('At least three existing atoms must be selected',caption='...
4
19
1
201
0
10,717
10,736
10,717
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.onFitBoth) defined within the public class called public.The function start at line 10717 and ends at 10736. It contains 19 lines of code and it has a cyclomatic complexity of 4. The function does not take any param...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.BallnSticks
def BallnSticks(event):'''Set all draw atoms in crystal structure to balls & stick'''for a in data['Drawing']['Atoms']: a[6] = "balls & sticks"FindBondsDraw(data)G2plt.PlotStructure(G2frame,data,False,UpdateTable)RigidBodies.SetFocus() # make sure tab presses go to panel
2
5
1
44
0
10,738
10,744
10,738
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.BallnSticks) defined within the public class called public.The function start at line 10738 and ends at 10744. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any para...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.Sticks
def Sticks(event):'''Set all draw atoms in crystal structure to stick'''for a in data['Drawing']['Atoms']: a[6] = "sticks"FindBondsDraw(data)G2plt.PlotStructure(G2frame,data,False,UpdateTable)RigidBodies.SetFocus() # make sure tab presses go to panel
2
5
1
44
0
10,746
10,752
10,746
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.Sticks) defined within the public class called public.The function start at line 10746 and ends at 10752. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameter...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.OnRowSelect
def OnRowSelect(event):'''Respond to the selection of a rigid body atom.Highlight the atom in the body and the paired atom in thecrystal'''event.Skip()cryatom = event.GetEventObject().Table.GetValue(event.GetRow(),4)if not cryatom:cryatom = event.GetEventObject().Table.GetValue(event.GetRow(),2)data['testRBObj']['RBhig...
4
11
1
124
0
10,754
10,768
10,754
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.OnRowSelect) defined within the public class called public.The function start at line 10754 and ends at 10768. It contains 11 lines of code and it has a cyclomatic complexity of 4. The function does not take any par...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.OnSymRadioSet
def OnSymRadioSet(event):'''Set the symmetry axis for the body asdata['testRBObj']['rbObj']['symAxis']. This may never beset, so use data['testRBObj']['rbObj'].get('symAxis') toaccess this so the default value is None.'''axis = (None,[1,0,0],[0,1,0],[0,0,1],[1,1,0],[1,1,1])[event.GetEventObject().GetSelection()]if axis...
2
7
1
95
0
10,771
10,782
10,771
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.OnSymRadioSet) defined within the public class called public.The function start at line 10771 and ends at 10782. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any pa...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.OnOrigSet
def OnOrigSet(event):data['testRBObj']['rbObj']['Orig'][0] = data['Drawing']['viewPoint'][0]for i,item in enumerate(Xsizers):item.ChangeValue(data['testRBObj']['rbObj']['Orig'][0][i])UpdateSytSym()UpdateTablePlot()
2
6
1
66
0
10,784
10,789
10,784
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.OnOrigSet) defined within the public class called public.The function start at line 10784 and ends at 10789. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parame...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.showCryAtom
def showCryAtom(*args,**kwargs):'''Respond to selection of a crystal atom'''data['testRBObj']['CRYhighLight'] = [i for i,a in enumerate(data['Atoms']) if a[0] == showAtom[0]]G2plt.PlotStructure(G2frame,data,False,UpdateTable)
3
4
2
55
0
10,792
10,797
10,792
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.OnRBAssign.UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw.showCryAtom) defined within the public class called public.The function start at line 10792 and ends at 10797. It contains 4 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented ...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw
def Draw():'''Create the window for assigning RB to atoms'''def OnAddRB(event):'respond to RB Add button, sets RB info in phase'dataGeneral = data['General']dataGeneral['SpnIds'] = dataGeneral.get('SpnIds',{})cx,ct,cs,cia = dataGeneral['AtomPtrs']rbType = data['testRBObj']['rbType']atomData = data['Atoms']if RigidBodie...
30
305
0
2,647
0
10,437
11,093
10,437
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.OnRBAssign.Draw) defined within the public class called public.The function start at line 10437 and ends at 11093. It contains 305 lines of code and it has a cyclomatic complexity of 30. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.OnRBAssign
def OnRBAssign(event):'''Assign RB to atoms in a phase with tools to locate the RB in the structure'''def Draw():'''Create the window for assigning RB to atoms'''def OnAddRB(event):'respond to RB Add button, sets RB info in phase'dataGeneral = data['General']dataGeneral['SpnIds'] = dataGeneral.get('SpnIds',{})cx,ct,cs,...
26
113
1
957
0
10,433
11,212
10,433
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.OnRBAssign) defined within the public class called public.The function start at line 10433 and ends at 11212. It contains 113 lines of code and it has a cyclomatic complexity of 26. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.OnAutoFindResRB
def OnAutoFindResRB(event):RBData = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.root,'Rigid bodies'))rbKeys = list(RBData['Residue'].keys())rbKeys.remove('AtInfo')if not len(rbKeys):print ('**** ERROR - no residue rigid bodies are defined ****')returnRBNames = [RBData['Residue'][k]['RBname'] for...
22
101
1
948
0
11,214
11,316
11,214
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.OnAutoFindResRB) defined within the public class called public.The function start at line 11214 and ends at 11316. It contains 101 lines of code and it has a cyclomatic complexity of 22. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.OnRBRemoveAll
def OnRBRemoveAll(event):data['RBModels']['Residue'] = []data['RBModels']['Vector'] = []data['RBModels']['Spin'] = []RBData = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.root,'Rigid bodies'))for RBType in ['Vector','Residue','Spin']:for rbId in RBData[RBType]:RBData[RBType][rbId]['useCount'] = 0...
3
10
1
91
0
11,318
11,327
11,318
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.OnRBRemoveAll) defined within the public class called public.The function start at line 11318 and ends at 11327. It contains 10 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
UpdatePhaseData.OnGlobalResRBTherm
def OnGlobalResRBTherm(event):RBObjs = data['RBModels']['Residue']names = ['None','Uiso','T','TL','TLS']cia = data['General']['AtomPtrs'][3]AtLookUp = G2mth.FillAtomLookUp(data['Atoms'],cia+8)dlg = wx.SingleChoiceDialog(G2frame,'Select','Residue thermal motion model',names)if dlg.ShowModal() == wx.ID_OK:sel = dlg.GetSe...
6
19
1
163
0
11,329
11,347
11,329
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.OnGlobalResRBTherm) defined within the public class called public.The function start at line 11329 and ends at 11347. It contains 19 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
UpdatePhaseData.OnGlobalResRBRef
def OnGlobalResRBRef(event):RBObjs = data['RBModels']['Residue']names = ['Origin','Orient. angle','Full Orient.']nTor = 0for rbObj in RBObjs:nTor = max(nTor,len(rbObj['Torsions']))names += ['Torsion '+str(i) for i in range(nTor)]if np.any([rbObj['ThermalMotion'][0] == 'Uiso' for rbObj in RBObjs]): names += ['Uiso',]if ...
30
70
1
703
0
11,349
11,419
11,349
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.OnGlobalResRBRef) defined within the public class called public.The function start at line 11349 and ends at 11419. It contains 70 lines of code and it has a cyclomatic complexity of 30. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.UpdateMCSA.OnPosRef
def OnPosRef(event):Obj = event.GetEventObject()model,item,ix = Indx[Obj.GetId()]model[item][1][ix] = Obj.GetValue()
1
4
1
42
0
11,425
11,428
11,425
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.UpdateMCSA.OnPosRef) defined within the public class called public.The function start at line 11425 and ends at 11428. 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
UpdatePhaseData.UpdatePhaseData.UpdateMCSA.OnPosVal
def OnPosVal(invalid,value,tc):G2plt.PlotStructure(G2frame,data)
1
2
3
17
0
11,430
11,431
11,430
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.UpdateMCSA.OnPosVal) defined within the public class called public.The function start at line 11430 and ends at 11431. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [11430.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.UpdateMCSA.OnPosRange
def OnPosRange(event):event.Skip()Obj = event.GetEventObject()model,item,ix = Indx[Obj.GetId()]Range = Obj.GetValue().split()try:rmin,rmax = [float(Range[i]) for i in range(2)]if rmin >= rmax:raise ValueErrorexcept (ValueError,IndexError):rmin,rmax = model[item][2][ix]model[item][2][ix] = [rmin,rmax]Obj.SetValue('%.3f ...
4
13
1
120
0
11,433
11,445
11,433
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.UpdateMCSA.OnPosRange) defined within the public class called public.The function start at line 11433 and ends at 11445. It contains 13 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
UpdatePhaseData.UpdatePhaseData.UpdateMCSA.atomSizer
def atomSizer(model):atomsizer = wx.FlexGridSizer(0,7,5,5)atomsizer.Add(wx.StaticText(G2frame.MCSA,-1,' Atom: '+model['name']+': '),0,WACV)for ix,item in enumerate(['x','y','z']):posRef = wx.CheckBox(G2frame.MCSA,-1,label=item+': ')posRef.SetValue(model['Pos'][1][ix])posRef.Bind(wx.EVT_CHECKBOX,OnPosRef)Indx[posRef.Get...
3
21
1
315
0
11,447
11,469
11,447
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.UpdateMCSA.atomSizer) defined within the public class called public.The function start at line 11447 and ends at 11469. It contains 21 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
UpdatePhaseData.UpdatePhaseData.UpdateMCSA.UpdatePhaseData.UpdatePhaseData.UpdateMCSA.rbSizer.OnOrVar
def OnOrVar(event):Obj = event.GetEventObject()model = Indx[Obj.GetId()]model['Ovar'] = Obj.GetValue()
1
4
1
32
0
11,473
11,476
11,473
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.UpdateMCSA.UpdatePhaseData.UpdatePhaseData.UpdateMCSA.rbSizer.OnOrVar) defined within the public class called public.The function start at line 11473 and ends at 11476. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any param...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.UpdateMCSA.UpdatePhaseData.UpdatePhaseData.UpdateMCSA.rbSizer.OnOriVal
def OnOriVal(event):event.Skip()Obj = event.GetEventObject()model,ix,ObjA,ObjV = Indx[Obj.GetId()]A = model['Ori'][0][0]V = model['Ori'][0][1:]if ix:Anew = AVec = ObjV.GetValue().split()try:Vnew = [float(Vec[i]) for i in range(3)]except ValueError:Vnew = Velse:Vnew = Vtry:Anew = float(ObjA.GetValue())if not Anew:#==0.0...
7
31
1
246
0
11,478
11,508
11,478
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.UpdateMCSA.UpdatePhaseData.UpdatePhaseData.UpdateMCSA.rbSizer.OnOriVal) defined within the public class called public.The function start at line 11478 and ends at 11508. It contains 31 lines of code and it has a cyclomatic complexity of 7. The function does not take any par...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.UpdateMCSA.UpdatePhaseData.UpdatePhaseData.UpdateMCSA.rbSizer.OnMolCent
def OnMolCent(event):Obj = event.GetEventObject()model = Indx[Obj.GetId()]model['MolCent'][1] = Obj.GetValue()if model['MolCent'][1]:G2mth.SetMolCent(model,RBData)G2plt.PlotStructure(G2frame,data)
2
7
1
60
0
11,510
11,516
11,510
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.UpdateMCSA.UpdatePhaseData.UpdatePhaseData.UpdateMCSA.rbSizer.OnMolCent) defined within the public class called public.The function start at line 11510 and ends at 11516. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any par...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.UpdateMCSA.rbSizer
def rbSizer(model):def OnOrVar(event):Obj = event.GetEventObject()model = Indx[Obj.GetId()]model['Ovar'] = Obj.GetValue()def OnOriVal(event):event.Skip()Obj = event.GetEventObject()model,ix,ObjA,ObjV = Indx[Obj.GetId()]A = model['Ori'][0][0]V = model['Ori'][0][1:]if ix:Anew = AVec = ObjV.GetValue().split()try:Vnew = [f...
7
93
1
1,359
0
11,471
11,613
11,471
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.UpdateMCSA.rbSizer) defined within the public class called public.The function start at line 11471 and ends at 11613. It contains 93 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
UpdatePhaseData.UpdatePhaseData.UpdateMCSA.UpdatePhaseData.UpdatePhaseData.UpdateMCSA.MDSizer.OnPORef
def OnPORef(event):POData['Coef'][1] = poRef.GetValue()
1
2
1
18
0
11,617
11,618
11,617
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.UpdateMCSA.UpdatePhaseData.UpdatePhaseData.UpdateMCSA.MDSizer.OnPORef) defined within the public class called public.The function start at line 11617 and ends at 11618. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any param...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.UpdateMCSA.UpdatePhaseData.UpdatePhaseData.UpdateMCSA.MDSizer.OnPORange
def OnPORange(event):event.Skip()Range = poRange.GetValue().split()try:rmin,rmax = [float(Range[i]) for i in range(2)]if 0. < rmin < rmax:passelse:raise ValueErrorexcept (ValueError,IndexError):rmin,rmax = POData['Coef'][2]POData['Coef'][2] = [rmin,rmax]poRange.SetValue('%.3f %.3f'%(rmin,rmax))
4
13
1
99
0
11,620
11,632
11,620
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.UpdateMCSA.UpdatePhaseData.UpdatePhaseData.UpdateMCSA.MDSizer.OnPORange) defined within the public class called public.The function start at line 11620 and ends at 11632. It contains 13 lines of code and it has a cyclomatic complexity of 4. The function does not take any pa...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.UpdateMCSA.UpdatePhaseData.UpdatePhaseData.UpdateMCSA.MDSizer.OnPOAxis
def OnPOAxis(event):event.Skip()Saxis = poAxis.GetValue().split()try:hkl = [int(Saxis[i]) for i in range(3)]except (ValueError,IndexError):hkl = POData['axis']if not np.any(np.array(hkl)):hkl = POData['axis']POData['axis'] = hklh,k,l = hklpoAxis.SetValue('%3d %3d %3d'%(h,k,l))
4
12
1
101
0
11,634
11,645
11,634
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.UpdateMCSA.UpdatePhaseData.UpdatePhaseData.UpdateMCSA.MDSizer.OnPOAxis) defined within the public class called public.The function start at line 11634 and ends at 11645. It contains 12 lines of code and it has a cyclomatic complexity of 4. The function does not take any par...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.UpdateMCSA.MDSizer
def MDSizer(POData):def OnPORef(event):POData['Coef'][1] = poRef.GetValue()def OnPORange(event):event.Skip()Range = poRange.GetValue().split()try:rmin,rmax = [float(Range[i]) for i in range(2)]if 0. < rmin < rmax:passelse:raise ValueErrorexcept (ValueError,IndexError):rmin,rmax = POData['Coef'][2]POData['Coef'][2] = [r...
1
24
1
293
0
11,615
11,668
11,615
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.UpdateMCSA.MDSizer) defined within the public class called public.The function start at line 11615 and ends at 11668. It contains 24 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
UpdatePhaseData.UpdatePhaseData.UpdateMCSA.UpdatePhaseData.UpdatePhaseData.UpdateMCSA.ResultsSizer.OnCellChange
def OnCellChange(event):r,c = event.GetRow(),event.GetCol()if c == 0:for row in range(resultsGrid.GetNumberRows()):resultsTable.SetValue(row,c,False)Results[row][0] = Falseresult = Results[r]Models = data['MCSA']['Models']SetSolution(result,Models)Results[r][0] = TrueresultsTable.SetValue(r,0,True)#resultsGrid.ForceRef...
5
20
1
176
0
11,672
11,692
11,672
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.UpdateMCSA.UpdatePhaseData.UpdatePhaseData.UpdateMCSA.ResultsSizer.OnCellChange) defined within the public class called public.The function start at line 11672 and ends at 11692. It contains 20 lines of code and it has a cyclomatic complexity of 5. The function does not tak...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.UpdateMCSA.ResultsSizer
def ResultsSizer(Results):def OnCellChange(event):r,c = event.GetRow(),event.GetCol()if c == 0:for row in range(resultsGrid.GetNumberRows()):resultsTable.SetValue(row,c,False)Results[row][0] = Falseresult = Results[r]Models = data['MCSA']['Models']SetSolution(result,Models)Results[r][0] = TrueresultsTable.SetValue(r,0,...
7
28
1
276
0
11,670
11,720
11,670
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.UpdateMCSA.ResultsSizer) defined within the public class called public.The function start at line 11670 and ends at 11720. It contains 28 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
UpdatePhaseData.UpdatePhaseData.UpdateMCSA.OnSelect
def OnSelect(event):rbId = rbids[select.GetSelection()]wx.CallLater(100,RepaintRBInfo,rbId)
1
3
1
25
0
11,722
11,724
11,722
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.UpdateMCSA.OnSelect) defined within the public class called public.The function start at line 11722 and ends at 11724. 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
UpdatePhaseData.UpdatePhaseData.UpdateMCSA.RepaintRBInfo
def RepaintRBInfo(rbId,Scroll=0):oldFocus = wx.Window.FindFocus()if 'phoenix' in wx.version():G2frame.bottomSizer.Clear(True)else:G2frame.bottomSizer.DeleteWindows()Indx.clear()rbObj = data['MCSA']['Models'][rbId]G2frame.bottomSizer.Insert(0,rbSizer(rbObj))mainSizer.Layout()G2frame.dataWindow.Refresh()G2frame.dataWindo...
2
13
2
101
0
11,726
11,738
11,726
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.UpdateMCSA.RepaintRBInfo) defined within the public class called public.The function start at line 11726 and ends at 11738. It contains 13 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [11726.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.UpdateMCSA.OnShoLabels
def OnShoLabels(event):data['MCSA']['showLabels'] = not data['MCSA']['showLabels']G2plt.PlotStructure(G2frame,data)
1
3
1
29
0
11,740
11,742
11,740
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.UpdateMCSA.OnShoLabels) defined within the public class called public.The function start at line 11740 and ends at 11742. 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
UpdatePhaseData.UpdateMCSA
def UpdateMCSA(Scroll=0):Indx = {}def OnPosRef(event):Obj = event.GetEventObject()model,item,ix = Indx[Obj.GetId()]model[item][1][ix] = Obj.GetValue()def OnPosVal(invalid,value,tc):G2plt.PlotStructure(G2frame,data)def OnPosRange(event):event.Skip()Obj = event.GetEventObject()model,item,ix = Indx[Obj.GetId()]Range = Obj...
11
79
1
730
0
11,422
11,818
11,422
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdateMCSA) defined within the public class called public.The function start at line 11422 and ends at 11818. It contains 79 lines of code and it has a cyclomatic complexity of 11. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.SetSolution
def SetSolution(result,Models):for key,val in zip(result[-1],result[4:-1]):vals = key.split(':')nObj,name = int(vals[0]),vals[1]if 'A' in name:ind = ['Ax','Ay','Az'].index(name)Models[nObj]['Pos'][0][ind] = valelif 'Q' in name:ind = ['Qa','Qi','Qj','Qk'].index(name)Models[nObj]['Ori'][0][ind] = valelif 'P' in name:ind ...
6
18
2
205
0
11,820
11,837
11,820
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.SetSolution) defined within the public class called public.The function start at line 11820 and ends at 11837. It contains 18 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [11820.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.OnRunMultiMCSA
def OnRunMultiMCSA(event):RunMCSA('multi')
1
2
1
9
0
11,839
11,840
11,839
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.OnRunMultiMCSA) defined within the public class called public.The function start at line 11839 and ends at 11840. 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
UpdatePhaseData.OnRunSingleMCSA
def OnRunSingleMCSA(event):RunMCSA('single')
1
2
1
9
0
11,842
11,843
11,842
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.OnRunSingleMCSA) defined within the public class called public.The function start at line 11842 and ends at 11843. 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
UpdatePhaseData.RunMCSA
def RunMCSA(process):generalData = data['General']mcsaControls = generalData['MCSA controls']reflName = mcsaControls['Data source']phaseName = generalData['Name']MCSAdata = data['MCSA']saveResult = []for result in MCSAdata['Results']:if result[1]: #keep?saveResult.append(result)MCSAdata['Results'] = saveResultcovData =...
18
83
1
745
0
11,845
11,927
11,845
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.RunMCSA) defined within the public class called public.The function start at line 11845 and ends at 11927. It contains 83 lines of code and it has a cyclomatic complexity of 18. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.OnMCSAaddAtom
def OnMCSAaddAtom(event):dlg = G2elemGUI.PickElement(G2frame)if dlg.ShowModal() == wx.ID_OK:El = dlg.Elem.strip()Info = G2elem.GetAtomInfo(El)dlg.Destroy()atom = {'Type':'Atom','atType':El,'Pos':[[0.,0.,0.],[False,False,False],[[0.,1.],[0.,1.],[0.,1.]]],'name':El+'('+str(len(data['MCSA']['Models']))+')'}data['MCSA']['M...
2
13
1
173
0
11,929
11,942
11,929
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.OnMCSAaddAtom) defined within the public class called public.The function start at line 11929 and ends at 11942. It contains 13 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
UpdatePhaseData.OnMCSAaddRB
def OnMCSAaddRB(event):rbData = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.root,'Rigid bodies'))rbNames = {}for rbVec in rbData['Vector']:if rbVec != 'AtInfo':rbNames[rbData['Vector'][rbVec]['RBname']] = ['Vector',rbVec]for rbRes in rbData['Residue']:if rbRes != 'AtInfo':rbNames[rbData['Residue...
9
33
1
474
0
11,944
11,976
11,944
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.OnMCSAaddRB) defined within the public class called public.The function start at line 11944 and ends at 11976. It contains 33 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
UpdatePhaseData.OnMCSAclear
def OnMCSAclear(event):data['MCSA'] = {'Models':[{'Type':'MD','Coef':[1.0,False,[.8,1.2],],'axis':[0,0,1]}],'Results':[],'AtInfo':{}}G2plt.PlotStructure(G2frame,data)UpdateMCSA()
1
4
1
72
0
11,978
11,981
11,978
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.OnMCSAclear) defined within the public class called public.The function start at line 11978 and ends at 11981. 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
UpdatePhaseData.OnMCSAmove
def OnMCSAmove(event):general = data['General']Amat,Bmat = G2lat.cell2AB(general['Cell'][1:7])xyz,aTypes = G2mth.UpdateMCSAxyz(Bmat,data['MCSA'])for iat,atype in enumerate(aTypes):x,y,z = xyz[iat]AtomAdd(x,y,z,atype,Name=atype+'(%d)'%(iat+1))G2plt.PlotStructure(G2frame,data)
2
8
1
94
0
11,983
11,990
11,983
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.OnMCSAmove) defined within the public class called public.The function start at line 11983 and ends at 11990. It contains 8 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
UpdatePhaseData.OnClearResults
def OnClearResults(event):data['MCSA']['Results'] = []UpdateMCSA()
1
3
1
18
0
11,992
11,994
11,992
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.OnClearResults) defined within the public class called public.The function start at line 11992 and ends at 11994. 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
UpdatePhaseData.UpdatePhaseData.FillPawleyReflectionsGrid.onRefineDClick
def onRefineDClick(event):'''Called after a double-click on a cell label'''c =event.GetCol()if c == 5: #refine column label: just select it (& redisplay)G2frame.PawleyRefl.ClearSelection()G2frame.PawleyRefl.SelectCol(c,True)choice = ['Y - vary all','N - vary none',]dlg = wx.SingleChoiceDialog(G2frame,'Select refinement...
6
16
1
139
0
11,999
12,015
11,999
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.FillPawleyReflectionsGrid.onRefineDClick) defined within the public class called public.The function start at line 11999 and ends at 12015. It contains 16 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return an...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.UpdatePhaseData.FillPawleyReflectionsGrid.KeyEditPawleyGrid
def KeyEditPawleyGrid(event):colList = G2frame.PawleyRefl.GetSelectedCols()rowList = G2frame.PawleyRefl.GetSelectedRows()PawleyPeaks = data['Pawley ref']if event.GetKeyCode() == wx.WXK_RETURN:event.Skip(True)elif event.GetKeyCode() == wx.WXK_CONTROL:event.Skip(True)elif event.GetKeyCode() == wx.WXK_SHIFT:event.Skip(Tru...
14
26
1
205
0
12,017
12,042
12,017
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.UpdatePhaseData.FillPawleyReflectionsGrid.KeyEditPawleyGrid) defined within the public class called public.The function start at line 12017 and ends at 12042. It contains 26 lines of code and it has a cyclomatic complexity of 14. The function does not take any parameters and does not retur...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData.FillPawleyReflectionsGrid
def FillPawleyReflectionsGrid():def onRefineDClick(event):'''Called after a double-click on a cell label'''c =event.GetCol()if c == 5: #refine column label: just select it (& redisplay)G2frame.PawleyRefl.ClearSelection()G2frame.PawleyRefl.SelectCol(c,True)choice = ['Y - vary all','N - vary none',]dlg = wx.SingleChoiceD...
15
61
0
615
0
11,997
12,105
11,997
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData.FillPawleyReflectionsGrid) defined within the public class called public.The function start at line 11997 and ends at 12105. It contains 61 lines of code and it has a cyclomatic complexity of 15. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePhaseData
def UpdatePhaseData(G2frame,Item,data):'''Create the data display window contents when a phase is clicked onin the main (data tree) window.Called only from :meth:`GSASIIdataGUI.SelectDataTreeItem`,which in turn is called from :meth:`GSASIIdataGUI.GSASII.OnDataTreeSelChanged`when a Phase tree item is selected. This crea...
1
126
3
260
0
1,590
12,105
1,590
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePhaseData) defined within the public class called public.The function start at line 1590 and ends at 12105. It contains 126 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [1590.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
OnPawleySet.DisablePawleyOpts
def DisablePawleyOpts(*args):'dis-/enable Pawley options'for c in PawleyCtrlsList:c.Enable(generalData['doPawley'])
2
4
1
21
0
12,118
12,121
12,118
null
[]
None
null
0
0
0
null
0
null
The function (OnPawleySet.DisablePawleyOpts) defined within the public class called public.The function start at line 12118 and ends at 12121. It contains 4 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
OnPawleySet.OnOK
def OnOK(event): genDlg.EndModal(wx.ID_OK)mainSizer.Add([5,5])btnsizer = wx.StdDialogButtonSizer()btn = wx.Button(genDlg, wx.ID_OK)btn.Bind(wx.EVT_BUTTON, OnOK)btn.SetDefault()btnsizer.AddButton(btn)btn = wx.Button(genDlg, wx.ID_CANCEL)btnsizer.AddButton(btn)btnsizer.Realize()mainSizer.Add(btnsizer, 0, wx.ALIGN_CENTER|...
4
22
1
196
0
12,181
12,205
12,181
null
[]
None
null
0
0
0
null
0
null
The function (OnPawleySet.OnOK) defined within the public class called public.The function start at line 12181 and ends at 12205. It contains 22 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
OnPawleySet
def OnPawleySet(event):'''Open dialog to set Pawley parameters and optionally recompute reflections.This is called from the Phase/Pawley Reflections "Pawley Settings"menu command. These settings are also available on the Phase/General tab.'''def DisablePawleyOpts(*args):'dis-/enable Pawley options'for c in PawleyCtrlsL...
8
57
1
541
0
12,113
12,220
12,113
null
[]
None
null
0
0
0
null
0
null
The function (OnPawleySet) defined within the public class called public.The function start at line 12113 and ends at 12220. It contains 57 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
OnPawleyLoad
def OnPawleyLoad(event):generalData = data['General']histograms = data['Histograms'].keys()cell = generalData['Cell'][1:7]A = G2lat.cell2A(cell)SGData = generalData['SGData']dmin = generalData['Pawley dmin']dmax = generalData['Pawley dmax']for hist in histograms:if 'PWDR' in hist[:4]:Id = G2gd.GetGPXtreeItemId(G2frame,...
16
61
1
535
0
12,222
12,283
12,222
null
[]
None
null
0
0
0
null
0
null
The function (OnPawleyLoad) defined within the public class called public.The function start at line 12222 and ends at 12283. It contains 61 lines of code and it has a cyclomatic complexity of 16. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
OnPawleyEstimate
def OnPawleyEstimate(event):#Algorithm thanks to James Hestertry:Refs = data['Pawley ref']Histograms = data['Histograms']except KeyError:G2frame.ErrorDialog('Pawley estimate','No histograms defined for this phase')returnVst = 1.0/data['General']['Cell'][7] #Get volumegeneralData = data['General']im = 0if generalData['M...
12
57
1
653
0
12,285
12,348
12,285
null
[]
None
null
0
0
0
null
0
null
The function (OnPawleyEstimate) defined within the public class called public.The function start at line 12285 and ends at 12348. It contains 57 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
OnPawleyUpdate
def OnPawleyUpdate(event):'''This is the place for any reflection modification trickPatterson squared, etc.'''try:Refs = data['Pawley ref']Histograms = data['Histograms']except KeyError:G2frame.ErrorDialog('Pawley update','No histograms defined for this phase')returnHistoNames = list(Histograms.keys())PatternId = G2gd....
8
34
1
232
0
12,350
12,386
12,350
null
[]
None
null
0
0
0
null
0
null
The function (OnPawleyUpdate) defined within the public class called public.The function start at line 12350 and ends at 12386. It contains 34 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
OnPawleySelAll
def OnPawleySelAll(event):refcol = [G2frame.PawleyRefl.GetColLabelValue(c) for c in range(G2frame.PawleyRefl.GetNumberCols())].index('refine')for r in range(G2frame.PawleyRefl.GetNumberRows()):G2frame.PawleyRefl.GetTable().SetValue(r,refcol,True)G2frame.PawleyRefl.ForceRefresh()
3
5
1
72
0
12,388
12,393
12,388
null
[]
None
null
0
0
0
null
0
null
The function (OnPawleySelAll) defined within the public class called public.The function start at line 12388 and ends at 12393. 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
OnPawleySelNone
def OnPawleySelNone(event):refcol = [G2frame.PawleyRefl.GetColLabelValue(c) for c in range(G2frame.PawleyRefl.GetNumberCols())].index('refine')for r in range(G2frame.PawleyRefl.GetNumberRows()):G2frame.PawleyRefl.GetTable().SetValue(r,refcol,False)G2frame.PawleyRefl.ForceRefresh()
3
5
1
72
0
12,394
12,398
12,394
null
[]
None
null
0
0
0
null
0
null
The function (OnPawleySelNone) defined within the public class called public.The function start at line 12394 and ends at 12398. 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
OnPawleyToggle
def OnPawleyToggle(event):refcol = [G2frame.PawleyRefl.GetColLabelValue(c) for c in range(G2frame.PawleyRefl.GetNumberCols())].index('refine')for r in range(G2frame.PawleyRefl.GetNumberRows()):G2frame.PawleyRefl.GetTable().SetValue(r,refcol,not G2frame.PawleyRefl.GetTable().GetValueAsBool(r,refcol))G2frame.PawleyRefl.F...
3
7
1
86
0
12,400
12,407
12,400
null
[]
None
null
0
0
0
null
0
null
The function (OnPawleyToggle) defined within the public class called public.The function start at line 12400 and ends at 12407. It contains 7 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
FillMapPeaksGrid.RowSelect
def RowSelect(event):r,c =event.GetRow(),event.GetCol()if r < 0 and c < 0:if G2frame.MapPeaks.IsSelection():G2frame.MapPeaks.ClearSelection()else:for row in range(G2frame.MapPeaks.GetNumberRows()):G2frame.MapPeaks.SelectRow(row,True)elif c < 0: #only row clicksif event.ControlDown():if r in getAtomSelections(G2frame.Ma...
14
37
1
280
0
12,412
12,449
12,412
null
[]
None
null
0
0
0
null
0
null
The function (FillMapPeaksGrid.RowSelect) defined within the public class called public.The function start at line 12412 and ends at 12449. It contains 37 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
FillMapPeaksGrid
def FillMapPeaksGrid():def RowSelect(event):r,c =event.GetRow(),event.GetCol()if r < 0 and c < 0:if G2frame.MapPeaks.IsSelection():G2frame.MapPeaks.ClearSelection()else:for row in range(G2frame.MapPeaks.GetNumberRows()):G2frame.MapPeaks.SelectRow(row,True)elif c < 0: #only row clicksif event.ControlDown():if r in getAt...
8
42
0
440
0
12,410
12,493
12,410
null
[]
None
null
0
0
0
null
0
null
The function (FillMapPeaksGrid) defined within the public class called public.The function start at line 12410 and ends at 12493. It contains 42 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
OnPeaksMove
def OnPeaksMove(event):if 'Map Peaks' in data:mapPeaks = np.array(data['Map Peaks'])peakMax = np.amax(mapPeaks.T[0])Ind = getAtomSelections(G2frame.MapPeaks)pgbar = wx.ProgressDialog('Move peaks','Map peak no. 0 processed',len(Ind)+1,style = wx.PD_ELAPSED_TIME|wx.PD_AUTO_HIDE)for i,ind in enumerate(Ind):mag,x,y,z = map...
3
13
1
147
0
12,495
12,507
12,495
null
[]
None
null
0
0
0
null
0
null
The function (OnPeaksMove) defined within the public class called public.The function start at line 12495 and ends at 12507. It contains 13 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
OnPeaksClear
def OnPeaksClear(event):data['Map Peaks'] = []FillMapPeaksGrid()G2plt.PlotStructure(G2frame,data)
1
4
1
23
0
12,509
12,512
12,509
null
[]
None
null
0
0
0
null
0
null
The function (OnPeaksClear) defined within the public class called public.The function start at line 12509 and ends at 12512. 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
OnPeaksSave
def OnPeaksSave(event):if 'Map Peaks' in data:mapPeaks = data['Map Peaks']pfName = PhaseName+'_peaks.csv'pfFile = ''pth = G2G.GetExportPath(G2frame)dlg = wx.FileDialog(G2frame, 'Choose map peaks file name', pth, pfName,'csv (*.csv)|*.csv',wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)try:if dlg.ShowModal() == wx.ID_OK:pfFile = dlg...
6
20
1
158
0
12,514
12,534
12,514
null
[]
None
null
0
0
0
null
0
null
The function (OnPeaksSave) defined within the public class called public.The function start at line 12514 and ends at 12534. It contains 20 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
OnPeaksDelete
def OnPeaksDelete(event):if 'Map Peaks' in data:mapPeaks = np.array(data['Map Peaks'])Ind = getAtomSelections(mapPeaks)Ind.sort()Ind.reverse()for ind in Ind:mapPeaks = np.delete(mapPeaks,ind,0)data['Map Peaks'] = mapPeaksFillMapPeaksGrid()G2plt.PlotStructure(G2frame,data)
3
11
1
71
0
12,536
12,546
12,536
null
[]
None
null
0
0
0
null
0
null
The function (OnPeaksDelete) defined within the public class called public.The function start at line 12536 and ends at 12546. It contains 11 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
OnPeaksInvert
def OnPeaksInvert(event):if 'Map Peaks' in data:generalData = data['General']mapData = generalData['Map']try:mapData['rho'] = np.flip(mapData['rho'],(0,1,2))except TypeError:mapData['rho'] = np.flip(mapData['rho'],0)mapData['rho'] = np.flip(mapData['rho'],1)mapData['rho'] = np.flip(mapData['rho'],2)mapData['rho'] = np....
3
14
1
154
0
12,548
12,561
12,548
null
[]
None
null
0
0
0
null
0
null
The function (OnPeaksInvert) defined within the public class called public.The function start at line 12548 and ends at 12561. It contains 14 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
OnRollMap
def OnRollMap(event):if 'Map Peaks' in data:half = np.array([.5,.5,.5])mapPeaks = data['Map Peaks']generalData = data['General']mapData = generalData['Map']if mapData['Flip'] != True:wx.MessageBox('Only valid for charge flip maps',caption='Roll map error',style=wx.ICON_EXCLAMATION)returnAmat,Bmat = G2lat.cell2AB(genera...
8
29
1
403
0
12,563
12,592
12,563
null
[]
None
null
0
0
0
null
0
null
The function (OnRollMap) defined within the public class called public.The function start at line 12563 and ends at 12592. It contains 29 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
OnPeaksEquiv
def OnPeaksEquiv(event):if 'Map Peaks' in data:mapPeaks = np.array(data['Map Peaks'])Ind = getAtomSelections(mapPeaks)if Ind:wx.BeginBusyCursor()try:Ind = G2mth.PeaksEquiv(data,Ind)for r in range(G2frame.MapPeaks.GetNumberRows()):if r in Ind:G2frame.MapPeaks.SelectRow(r,addToSelected=True)else:G2frame.MapPeaks.Deselect...
6
16
1
103
0
12,594
12,609
12,594
null
[]
None
null
0
0
0
null
0
null
The function (OnPeaksEquiv) defined within the public class called public.The function start at line 12594 and ends at 12609. It contains 16 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
OnShowBonds
def OnShowBonds(event):generalData = data['General']if generalData['Map'].get('Show bonds',False):generalData['Map']['Show bonds'] = FalseG2frame.dataWindow.MapPeaksEdit.SetLabel(G2G.wxID_SHOWBONDS,'Show bonds')else:generalData['Map']['Show bonds'] = TrueG2frame.dataWindow.MapPeaksEdit.SetLabel(G2G.wxID_SHOWBONDS,'Hide...
2
10
1
83
0
12,611
12,620
12,611
null
[]
None
null
0
0
0
null
0
null
The function (OnShowBonds) defined within the public class called public.The function start at line 12611 and ends at 12620. It contains 10 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
OnPeaksUnique
def OnPeaksUnique(event):if 'Map Peaks' in data:mapPeaks = np.array(data['Map Peaks'])Ind = getAtomSelections(G2frame.MapPeaks)if Ind:choice = ['x=0','y=0','z=0','origin','center']dlg = wx.SingleChoiceDialog(G2frame,'Peaks closest to:','Select',choice)if dlg.ShowModal() == wx.ID_OK:sel = dlg.GetSelection()+1dlg.Destroy...
10
27
1
266
0
12,622
12,649
12,622
null
[]
None
null
0
0
0
null
0
null
The function (OnPeaksUnique) defined within the public class called public.The function start at line 12622 and ends at 12649. It contains 27 lines of code and it has a cyclomatic complexity of 10. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
OnPeaksViewPoint
def OnPeaksViewPoint(event):# set view pointindx = getAtomSelections(G2frame.MapPeaks)if not indx:G2frame.ErrorDialog('Set viewpoint','No peaks selected')returnmapPeaks = data['Map Peaks']drawingData = data['Drawing']drawingData['viewPoint'][0] = mapPeaks[indx[0]][1:4]G2plt.PlotStructure(G2frame,data)
2
9
1
66
0
12,651
12,660
12,651
null
[]
None
null
0
0
0
null
0
null
The function (OnPeaksViewPoint) defined within the public class called public.The function start at line 12651 and ends at 12660. 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
OnPeaksDistVP
def OnPeaksDistVP(event):# distance to view pointindx = getAtomSelections(G2frame.MapPeaks)if not indx:G2frame.ErrorDialog('Peak distance','No peaks selected')returngeneralData = data['General']Amat,Bmat = G2lat.cell2AB(generalData['Cell'][1:7])mapPeaks = data['Map Peaks']drawingData = data['Drawing']viewPt = np.array(...
4
19
1
207
0
12,662
12,681
12,662
null
[]
None
null
0
0
0
null
0
null
The function (OnPeaksDistVP) defined within the public class called public.The function start at line 12662 and ends at 12681. 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
OnPeaksDA
def OnPeaksDA(event):#distance, angleindx = getAtomSelections(G2frame.MapPeaks)if len(indx) not in [2,3]:G2frame.ErrorDialog('Peak distance/angle','Wrong number of atoms for distance or angle calculation')returngeneralData = data['General']Amat,Bmat = G2lat.cell2AB(generalData['Cell'][1:7])mapPeaks = data['Map Peaks']x...
4
15
1
138
0
12,683
12,698
12,683
null
[]
None
null
0
0
0
null
0
null
The function (OnPeaksDA) defined within the public class called public.The function start at line 12683 and ends at 12698. It contains 15 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
OnFourierMaps
def OnFourierMaps(event):generalData = data['General']mapData = generalData['Map']reflNames = mapData['RefList']if not generalData['Map']['MapType']:G2frame.ErrorDialog('Fourier map error','Fourier map type not defined')returnif not reflNames[0]:G2frame.ErrorDialog('Fourier map error','No reflections defined for Fourie...
7
40
1
291
0
12,700
12,739
12,700
null
[]
None
null
0
0
0
null
0
null
The function (OnFourierMaps) defined within the public class called public.The function start at line 12700 and ends at 12739. It contains 40 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
OnFourClear
def OnFourClear(event):generalData = data['General']generalData['Map'] = mapDefault.copy()data['Drawing']['showMap'] = FalseG2plt.PlotStructure(G2frame,data)
1
5
1
38
0
12,741
12,745
12,741
null
[]
None
null
0
0
0
null
0
null
The function (OnFourClear) defined within the public class called public.The function start at line 12741 and ends at 12745. 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
printRho
def printRho(SGLaue,rho,rhoMax):dim = len(rho.shape)if dim == 2:ix,jy = rho.shapefor j in range(jy):line = ''if SGLaue in ['3','3m1','31m','6/m','6/mmm']:line += (jy-j)*''for i in range(ix):r = int(100*rho[i,j]/rhoMax)line += '%4d'%(r)print (line+'\n')else:ix,jy,kz = rho.shapefor k in range(kz):print ('k = %d'%k)for j ...
9
24
3
198
0
12,748
12,771
12,748
null
[]
None
null
0
0
0
null
0
null
The function (printRho) defined within the public class called public.The function start at line 12748 and ends at 12771. It contains 24 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [12748.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
OnSearchMaps
def OnSearchMaps(event):print (' Begin fourier map search - can take some time')time0 = time.time()generalData = data['General']drawingData = data['Drawing']mapData = generalData['Map']if len(mapData['rho']):wx.BeginBusyCursor()try:peaks,mags,dzeros,dcents = G2mth.SearchMap(generalData,drawingData)if mapData['MapType']...
6
29
1
261
0
12,774
12,803
12,774
null
[]
None
null
0
0
0
null
0
null
The function (OnSearchMaps) defined within the public class called public.The function start at line 12774 and ends at 12803. It contains 29 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
On4DChargeFlip
def On4DChargeFlip(event):generalData = data['General']mapData = generalData['Map']map4DData = generalData['4DmapData']flipData = generalData['Flip']reflNames = flipData['RefList']if not reflNames[0]:G2frame.ErrorDialog('Charge flip error','No reflections defined for charge flipping')returnphaseName = generalData['Name...
7
39
1
324
0
12,805
12,843
12,805
null
[]
None
null
0
0
0
null
0
null
The function (On4DChargeFlip) defined within the public class called public.The function start at line 12805 and ends at 12843. It contains 39 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
OnChargeFlip
def OnChargeFlip(event):generalData = data['General']mapData = generalData['Map']flipData = generalData['Flip']reflNames = flipData['RefList']if not reflNames[0]:G2frame.ErrorDialog('Charge flip error','No reflections defined for charge flipping')returnphaseName = generalData['Name']ReflData = GetReflData(G2frame,phase...
9
45
1
439
0
12,845
12,889
12,845
null
[]
None
null
0
0
0
null
0
null
The function (OnChargeFlip) defined within the public class called public.The function start at line 12845 and ends at 12889. It contains 45 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
OnTextureRefine
def OnTextureRefine(event):General = data['General']phaseName = General['Name']keyList = G2frame.GetHistogramNames('PWDR')histNames = []refData = {}Gangls = {}for name in keyList:if 'PWDR' in name:im = 0it = 0histNames.append(name)Id = G2gd.GetGPXtreeItemId(G2frame,G2frame.root,name)Inst = G2frame.GPXtree.GetItemPyData...
8
40
1
495
0
12,891
12,930
12,891
null
[]
None
null
0
0
0
null
0
null
The function (OnTextureRefine) defined within the public class called public.The function start at line 12891 and ends at 12930. It contains 40 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
OnTextureClear
def OnTextureClear(event):print ('clear texture? - does nothing')
1
2
1
9
0
12,932
12,933
12,932
null
[]
None
null
0
0
0
null
0
null
The function (OnTextureClear) defined within the public class called public.The function start at line 12932 and ends at 12933. 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
FillSelectPageMenu.OnSelectPage
def OnSelectPage(event):'Called when an item is selected from the Select page menu'# lookup the menu item that called us and get its texttabname = TabSelectionIdDict.get(event.GetId())if not tabname:print ('Warning: menu item not in dict! id=%d'%event.GetId())return# find the matching tabfor PageNum in range(G2frame.ph...
4
12
1
78
0
12,940
12,953
12,940
null
[]
None
null
0
0
0
null
0
null
The function (FillSelectPageMenu.OnSelectPage) defined within the public class called public.The function start at line 12940 and ends at 12953. 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
FillSelectPageMenu
def FillSelectPageMenu(TabSelectionIdDict, menuBar):'''Fill "Select tab" menu with menu items for each tab and assignbindings to the menu item to switch between phase tabs'''def OnSelectPage(event):'Called when an item is selected from the Select page menu'# lookup the menu item that called us and get its texttabname =...
3
10
2
85
0
12,936
12,961
12,936
null
[]
None
null
0
0
0
null
0
null
The function (FillSelectPageMenu) defined within the public class called public.The function start at line 12936 and ends at 12961. It contains 10 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [12936.0] and does not return any value..