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
UpdateWavesData.OnAtmSel
def OnAtmSel(event):Obj = event.GetEventObject()G2frame.atmSel = Obj.GetValue()RepaintAtomInfo()
1
4
1
24
0
2,010
2,013
2,010
null
[]
None
null
0
0
0
null
0
null
The function (UpdateWavesData.OnAtmSel) defined within the public class called public.The function start at line 2010 and ends at 2013. 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
UpdateWavesData.RepaintAtomInfo
def RepaintAtomInfo(Scroll=0):G2frame.bottomSizer.Clear(True)G2frame.bottomSizer = ShowAtomInfo()mainSizer.Add(G2frame.bottomSizer)mainSizer.Layout()G2frame.dataWindow.Refresh()waveData.SetVirtualSize(mainSizer.GetMinSize())waveData.Scroll(0,Scroll)G2frame.dataWindow.SendSizeEvent()
1
9
1
67
0
2,015
2,023
2,015
null
[]
None
null
0
0
0
null
0
null
The function (UpdateWavesData.RepaintAtomInfo) defined within the public class called public.The function start at line 2015 and ends at 2023. It contains 9 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
UpdateWavesData.UpdateWavesData.ShowAtomInfo.UpdateWavesData.UpdateWavesData.ShowAtomInfo.AtomSizer.OnShowWave
def OnShowWave(event):Obj = event.GetEventObject()atom = Indx[Obj.GetId()]Ax = Obj.GetValue()G2plt.ModulationPlot(G2frame,data,atom,Ax)
1
5
1
41
0
2,031
2,035
2,031
null
[]
None
null
0
0
0
null
0
null
The function (UpdateWavesData.UpdateWavesData.ShowAtomInfo.UpdateWavesData.UpdateWavesData.ShowAtomInfo.AtomSizer.OnShowWave) defined within the public class called public.The function start at line 2031 and ends at 2035. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take an...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateWavesData.UpdateWavesData.ShowAtomInfo.AtomSizer
def AtomSizer(atom):global mapSeldef OnShowWave(event):Obj = event.GetEventObject()atom = Indx[Obj.GetId()]Ax = Obj.GetValue()G2plt.ModulationPlot(G2frame,data,atom,Ax)atomSizer = wx.BoxSizer(wx.HORIZONTAL)atomSizer.Add(wx.StaticText(waveData,label=' Modulation data for atom: %sSite sym: %s'%(atom[0],atom[cs].strip()))...
2
15
1
149
0
2,028
2,048
2,028
null
[]
None
null
0
0
0
null
0
null
The function (UpdateWavesData.UpdateWavesData.ShowAtomInfo.AtomSizer) defined within the public class called public.The function start at line 2028 and ends at 2048. It contains 15 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
UpdateWavesData.UpdateWavesData.ShowAtomInfo.UpdateWavesData.UpdateWavesData.ShowAtomInfo.WaveSizer.OnWaveType
def OnWaveType(event):Obj = event.GetEventObject()item = Indx[Obj.GetId()]if len(atm[-1]['SS1'][item]) <= 1:atm[-1]['SS1'][item] = [0,]atm[-1]['SS1'][item][0] = waveType.GetValue()wx.CallAfter(RepaintAtomInfo,G2frame.waveData.GetScrollPos(wx.VERTICAL))else:if len(waveTypes[Stype]) > 1:waveType.SetValue(atm[-1]['SS1'][S...
3
11
1
135
0
2,052
2,062
2,052
null
[]
None
null
0
0
0
null
0
null
The function (UpdateWavesData.UpdateWavesData.ShowAtomInfo.UpdateWavesData.UpdateWavesData.ShowAtomInfo.WaveSizer.OnWaveType) defined within the public class called public.The function start at line 2052 and ends at 2062. It contains 11 lines of code and it has a cyclomatic complexity of 3. The function does not take a...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateWavesData.UpdateWavesData.ShowAtomInfo.UpdateWavesData.UpdateWavesData.ShowAtomInfo.WaveSizer.OnAddWave
def OnAddWave(event):Obj = event.GetEventObject()item = Indx[Obj.GetId()]nt = numVals[Stype]if not len(atm[-1]['SS1'][item]):if waveTyp in ['ZigZag','Block','Crenel']:nt = numVals[waveTyp]atm[-1]['SS1'][item] = [0,]atm[-1]['SS1'][item][0] = waveType.GetValue()atm[-1]['SS1'][item].append([[0.0 for i in range(nt)],False]...
4
11
1
146
0
2,064
2,074
2,064
null
[]
None
null
0
0
0
null
0
null
The function (UpdateWavesData.UpdateWavesData.ShowAtomInfo.UpdateWavesData.UpdateWavesData.ShowAtomInfo.WaveSizer.OnAddWave) defined within the public class called public.The function start at line 2064 and ends at 2074. It contains 11 lines of code and it has a cyclomatic complexity of 4. The function does not take an...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateWavesData.UpdateWavesData.ShowAtomInfo.UpdateWavesData.UpdateWavesData.ShowAtomInfo.WaveSizer.OnRefWave
def OnRefWave(event):Obj = event.GetEventObject()item,iwave = Indx[Obj.GetId()]atm[-1]['SS1'][item][iwave+1][1] = not atm[-1]['SS1'][item][iwave+1][1]
1
4
1
64
0
2,076
2,079
2,076
null
[]
None
null
0
0
0
null
0
null
The function (UpdateWavesData.UpdateWavesData.ShowAtomInfo.UpdateWavesData.UpdateWavesData.ShowAtomInfo.WaveSizer.OnRefWave) defined within the public class called public.The function start at line 2076 and ends at 2079. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateWavesData.UpdateWavesData.ShowAtomInfo.UpdateWavesData.UpdateWavesData.ShowAtomInfo.WaveSizer.OnDelWave
def OnDelWave(event):Obj = event.GetEventObject()item,iwave = Indx[Obj.GetId()]del atm[-1]['SS1'][item][iwave+1]if len(atm[-1]['SS1'][item]) == 1:atm[-1]['SS1'][item][0] = 'Fourier'wx.CallAfter(RepaintAtomInfo,G2frame.waveData.GetScrollPos(wx.VERTICAL))
2
7
1
92
0
2,081
2,087
2,081
null
[]
None
null
0
0
0
null
0
null
The function (UpdateWavesData.UpdateWavesData.ShowAtomInfo.UpdateWavesData.UpdateWavesData.ShowAtomInfo.WaveSizer.OnDelWave) defined within the public class called public.The function start at line 2081 and ends at 2087. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateWavesData.UpdateWavesData.ShowAtomInfo.UpdateWavesData.UpdateWavesData.ShowAtomInfo.WaveSizer.OnWavePlot
def OnWavePlot(invalid,value,tc):if len(D4Map['rho']):Ax = mapSel.GetValue()if Ax:G2plt.ModulationPlot(G2frame,data,atm,Ax)
3
5
3
40
0
2,089
2,093
2,089
null
[]
None
null
0
0
0
null
0
null
The function (UpdateWavesData.UpdateWavesData.ShowAtomInfo.UpdateWavesData.UpdateWavesData.ShowAtomInfo.WaveSizer.OnWavePlot) defined within the public class called public.The function start at line 2089 and ends at 2093. It contains 5 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, repres...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateWavesData.UpdateWavesData.ShowAtomInfo.WaveSizer
def WaveSizer(iatm,wavedata,Stype,typeName,Names):def OnWaveType(event):Obj = event.GetEventObject()item = Indx[Obj.GetId()]if len(atm[-1]['SS1'][item]) <= 1:atm[-1]['SS1'][item] = [0,]atm[-1]['SS1'][item][0] = waveType.GetValue()wx.CallAfter(RepaintAtomInfo,G2frame.waveData.GetScrollPos(wx.VERTICAL))else:if len(waveTy...
26
96
5
893
0
2,050
2,184
2,050
null
[]
None
null
0
0
0
null
0
null
The function (UpdateWavesData.UpdateWavesData.ShowAtomInfo.WaveSizer) defined within the public class called public.The function start at line 2050 and ends at 2184. It contains 96 lines of code and it has a cyclomatic complexity of 26. It takes 5 parameters, represented as [2050.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateWavesData.ShowAtomInfo
def ShowAtomInfo():global mapSel #so it can be seen below in OnWavePlotdef AtomSizer(atom):global mapSeldef OnShowWave(event):Obj = event.GetEventObject()atom = Indx[Obj.GetId()]Ax = Obj.GetValue()G2plt.ModulationPlot(G2frame,data,atom,Ax)atomSizer = wx.BoxSizer(wx.HORIZONTAL)atomSizer.Add(wx.StaticText(waveData,label=...
6
17
0
137
0
2,025
2,199
2,025
null
[]
None
null
0
0
0
null
0
null
The function (UpdateWavesData.ShowAtomInfo) defined within the public class called public.The function start at line 2025 and ends at 2199. It contains 17 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
UpdateWavesData
def UpdateWavesData(G2frame,data,Scroll=0):generalData = data['General']cx,ct,cs,cia = generalData['AtomPtrs']typeNames = {'Sfrac':' Site fraction','Spos':' Position','Sadp':' Thermal motion','Smag':' Magnetic moment'}numVals = {'Sfrac':2,'Spos':6,'Sadp':12,'Smag':6,'ZigZag':5,'Block':5,'Crenel':2}posNames = ['Xsin','Y...
5
44
3
470
47
1,975
2,208
1,975
null
['Obj', 'topSizer', 'item', 'names', 'waveAdd', 'posNames', 'adpNames', 'atom', 'atomSizer', 'axchoice', 'iatm', 'Labels', 'nt', 'waveName', 'nterm', 'typeNames', 'waveVal', 'waveTyp', 'CSI', 'SGData', 'nx', 'atms', 'Indx', 'atNames', 'waveDel', 'Ax', 'xyz', 'minmax', 'waveHead', 'waveTypes', 'magNames', 'waveBlk', 'Wa...
None
null
0
0
0
null
0
null
The function (UpdateWavesData) defined within the public class called public.The function start at line 1975 and ends at 2208. It contains 44 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [1975.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetColorMap
def GetColorMap(color):try:return mpl.colormaps[color]except:return mpl.cm.get_cmap(color)
2
5
1
25
0
179
183
179
null
[]
None
null
0
0
0
null
0
null
The function (GetColorMap) defined within the public class called public.The function start at line 179 and ends at 183. 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
Write2csv
def Write2csv(fil,dataItems,header=False):'''Write a line to a CSV file:param object fil: file object:param list dataItems: items to write as row in file:param bool header: True if all items should be written with quotes (default is False)'''line = ''for item in dataItems:if line: line += ','item = str(item)if header o...
5
10
3
59
2
185
200
185
null
['line', 'item']
None
null
0
0
0
null
0
null
The function (Write2csv) defined within the public class called public.The function start at line 185 and ends at 200. It contains 10 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [185.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
__init__
def __init__(self,parent,id=-1,dpi=None,**kwargs):self.replotFunction = Noneself.replotArgs = []self.replotKwArgs = {}self.plotInvalid = False # validself.plotRequiresRedraw = True # delete plot if not updatedwx.Panel.__init__(self,parent,id=id,**kwargs)
1
7
5
63
0
204
210
204
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 204 and ends at 210. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [204.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
__init__
def __init__(self,parent,id=-1,dpi=None,publish=None,**kwargs):_tabPlotWin.__init__(self,parent,id=id,**kwargs)mpl.rcParams['legend.fontsize'] = 12mpl.rcParams['axes.grid'] = Falseself.figure = mplfig.Figure(dpi=dpi,figsize=(5,6))self.canvas = Canvas(self,-1,self.figure)self.toolbar = GSASIItoolbar(self.canvas,publish=...
1
14
6
188
0
214
228
214
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 214 and ends at 228. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [214.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SetToolTipString
def SetToolTipString(self,text):if 'phoenix' in wx.version():return self.canvas.SetToolTip(text)else:return self.canvas.SetToolTipString(text)
2
5
2
36
0
230
234
230
null
[]
None
null
0
0
0
null
0
null
The function (SetToolTipString) defined within the public class called public.The function start at line 230 and ends at 234. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [230.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ToolBarDraw
def ToolBarDraw(self):try:self.toolbar.canvas.draw_idle()except:self.toolbar.draw()
2
5
1
25
0
236
240
236
null
[]
None
null
0
0
0
null
0
null
The function (ToolBarDraw) defined within the public class called public.The function start at line 236 and ends at 240. 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
__init__
def __init__(self,parent,id=-1,dpi=None,**kwargs):self.figure = _tabPlotWin.__init__(self,parent,id=id,**kwargs)if 'win' in sys.platform: #Windows (& Mac) already double bufferedself.canvas = wx.glcanvas.GLCanvas(self,-1,**kwargs)else: #fix from Jim Hester for X systemsattribs = (wx.glcanvas.WX_GL_DOUBLEBUFFER,wx.glcan...
3
18
5
214
0
244
262
244
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 244 and ends at 262. It contains 18 lines of code and it has a cyclomatic complexity of 3. It takes 5 parameters, represented as [244.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SetToolTipString
def SetToolTipString(self,text):if 'phoenix' in wx.version():self.canvas.SetToolTip(wx.ToolTip(text))else:self.canvas.SetToolTipString(text)
2
5
2
39
0
264
268
264
null
[]
None
null
0
0
0
null
0
null
The function (SetToolTipString) defined within the public class called public.The function start at line 264 and ends at 268. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [264.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
__init__
def __init__(self,parent,id=-1,dpi=None,**kwargs):_tabPlotWin.__init__(self,parent,id=id,**kwargs)self.figure = mplfig.Figure(dpi=dpi,figsize=(6,6))self.canvas = Canvas(self,-1,self.figure)self.toolbar = GSASIItoolbar(self.canvas,Arrows=False)self.toolbar.Realize()sizer=wx.BoxSizer(wx.VERTICAL)sizer.Add(self.canvas,1,w...
1
10
5
129
0
272
283
272
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 272 and ends at 283. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [272.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SetToolTipString
def SetToolTipString(self,text):if 'phoenix' in wx.version():self.canvas.SetToolTip(wx.ToolTip(text))else:self.canvas.SetToolTipString(text)
2
5
2
39
0
285
289
264
null
[]
None
null
0
0
0
null
0
null
The function (SetToolTipString) defined within the public class called public.The function start at line 285 and ends at 289. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [264.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ToolBarDraw
def ToolBarDraw(self):try:self.toolbar.canvas.draw_idle()except:self.toolbar.draw()
2
5
1
25
0
291
295
236
null
[]
None
null
0
0
0
null
0
null
The function (ToolBarDraw) defined within the public class called public.The function start at line 291 and ends at 295. 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
__init__
def __init__(self,parent,id=-1,G2frame=None):wx.Panel.__init__(self,parent,id=id)#so one can't delete a plot page from tab!!self.nb = wx.aui.AuiNotebook(self, \style=wx.aui.AUI_NB_DEFAULT_STYLE ^ wx.aui.AUI_NB_CLOSE_ON_ACTIVE_TAB)sizer = wx.BoxSizer()sizer.Add(self.nb,1,wx.EXPAND)self.SetSizer(sizer)self.status = paren...
1
19
4
185
0
299
323
299
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 299 and ends at 323. It contains 19 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [299.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
OnNotebookKey
def OnNotebookKey(self,event):'''Called when a keystroke event gets picked up by the notebook windowrather the child. This is not expected, but somehow it does sometimeson the Mac and perhaps Linux.Assume that the page associated with the currently displayed tabhas a child, .canvas; give that child the focus and pass i...
3
11
2
57
0
325
342
325
null
[]
None
null
0
0
0
null
0
null
The function (OnNotebookKey) defined within the public class called public.The function start at line 325 and ends at 342. It contains 11 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [325.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SetNoDelete
def SetNoDelete(self,name):'''Indicate that a plot does not need to be redrawn'''if name not in self.plotList:print('Error, in SetNoDelete plot not found: '+name)returnpage = self.panelList[self.plotList.index(name)]page.plotRequiresRedraw = False # plot should not be deleted even if not redrawn
2
6
2
43
0
344
351
344
null
[]
None
null
0
0
0
null
0
null
The function (SetNoDelete) defined within the public class called public.The function start at line 344 and ends at 351. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [344.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
RegisterRedrawRoutine
def RegisterRedrawRoutine(self,name,routine=None,args=(),kwargs={}):'''Save information to determine how to redraw a plot:param str name: label on tab of plot:param Object routine: a function to be called:param args: a list of positional parameters for the function:param kwargs: a dict with keyword parameters for the f...
2
8
4
67
0
353
366
353
null
[]
None
null
0
0
0
null
0
null
The function (RegisterRedrawRoutine) defined within the public class called public.The function start at line 353 and ends at 366. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [353.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetTabIndex
def GetTabIndex(self,label):'''Look up a tab label and return the index in the notebook (this appears to beindependent to the order it is dragged to -- at least in Windows) as well asthe associated wx.PanelAn exception is raised if the label is not found'''for i in range(self.nb.GetPageCount()):if label == self.nb.GetP...
3
6
2
52
0
368
379
368
null
[]
None
null
0
0
0
null
0
null
The function (GetTabIndex) defined within the public class called public.The function start at line 368 and ends at 379. It contains 6 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [368.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FindPlotTab
def FindPlotTab(self,label,Type,newImage=True,publish=None):'''Open a plot tab for initial plotting, or raise the tab if it already existsSet a flag (Page.plotInvalid) that it has been redrawnRecord the name of the this plot in self.lastRaisedPlotTab:param str label: title of plot:param str Type: determines the type of...
13
43
5
321
0
393
467
393
null
[]
None
null
0
0
0
null
0
null
The function (FindPlotTab) defined within the public class called public.The function start at line 393 and ends at 467. It contains 43 lines of code and it has a cyclomatic complexity of 13. It takes 5 parameters, represented as [393.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
_addPage
def _addPage(self,name,page):'''Add the newly created page to the notebook and associated lists.:param name: the label placed on the tab, which should be unique:param page: the wx.Frame for the matplotlib, openGL, etc. window'''#self.skipPageChange = Trueif name in self.plotList:print('Warning: duplicate plot name! Nam...
2
7
3
54
0
469
482
469
null
[]
None
null
0
0
0
null
0
null
The function (_addPage) defined within the public class called public.The function start at line 469 and ends at 482. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [469.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
addMpl
def addMpl(self,name="",publish=None):'Add a tabbed page with a matplotlib plot'page = G2PlotMpl(self.nb,publish=publish)self._addPage(name,page)return page.figure
1
5
3
38
0
490
494
490
null
[]
None
null
0
0
0
null
0
null
The function (addMpl) defined within the public class called public.The function start at line 490 and ends at 494. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [490.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
add3D
def add3D(self,name=""):'Add a tabbed page with a 3D plot'page = G2Plot3D(self.nb)self._addPage(name,page)mplv = eval(mpl.__version__.replace('.',','))if mplv[0] == 3:if mplv == [3,0,3] or mplv[1] >= 3:passelif not self.MPLwarn: # patch for bad MPL 3Dself.MPLwarn = TrueG2G.G2MessageBox(self,'3D plots with Matplotlib 3....
5
13
2
97
0
496
508
496
null
[]
None
null
0
0
0
null
0
null
The function (add3D) defined within the public class called public.The function start at line 496 and ends at 508. It contains 13 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [496.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
addOgl
def addOgl(self,name=""):'Add a tabbed page with an openGL plot'page = G2PlotOgl(self.nb)self._addPage(name,page)self.RaisePageNoRefresh(page) # need to give window focus before GL usereturn page.figure
1
6
2
36
0
510
515
510
null
[]
None
null
0
0
0
null
0
null
The function (addOgl) defined within the public class called public.The function start at line 510 and ends at 515. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [510.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Delete
def Delete(self,name):'delete a tabbed page'try:item = self.plotList.index(name)del self.plotList[item]del self.panelList[item]self.nb.DeletePage(item)except ValueError:#no plot of this name - do nothingreturn
2
9
2
46
0
517
525
517
null
[]
None
null
0
0
0
null
0
null
The function (Delete) defined within the public class called public.The function start at line 517 and ends at 525. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [517.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
clear
def clear(self):'clear all pages from plot window'for i in range(self.nb.GetPageCount()-1,-1,-1):self.nb.DeletePage(i)self.plotList = []self.panelList = []self.status.DestroyChildren() #get rid of special stuff on status bar
2
7
1
55
0
527
533
527
null
[]
None
null
0
0
0
null
0
null
The function (clear) defined within the public class called public.The function start at line 527 and ends at 533. It contains 7 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
Rename
def Rename(self,oldName,newName):'rename a tab'try:item = self.plotList.index(oldName)self.plotList[item] = newNameself.nb.SetPageText(item,newName)except ValueError:#no plot of this name - do nothingreturn
2
8
3
44
0
535
542
535
null
[]
None
null
0
0
0
null
0
null
The function (Rename) defined within the public class called public.The function start at line 535 and ends at 542. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [535.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
RaisePageNoRefresh
def RaisePageNoRefresh(self,Page):'Raises a plot tab without triggering a refresh via OnPageChanged'if plotDebug: print ('Raise'+str(self).split('0x')[1])#self.skipPageChange = TruePage.SetFocus()
2
4
2
33
0
544
548
544
null
[]
None
null
0
0
0
null
0
null
The function (RaisePageNoRefresh) defined within the public class called public.The function start at line 544 and ends at 548. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [544.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SetSelectionNoRefresh
def SetSelectionNoRefresh(self,plotNum):'Raises a plot tab without triggering a refresh via OnPageChanged'if plotDebug: print ('Select'+str(self).split('0x')[1])#self.skipPageChange = Trueself.nb.SetSelection(plotNum) # raises plot tabPage = self.G2frame.G2plotNB.nb.GetPage(plotNum)Page.SetFocus()
2
6
2
55
0
551
557
551
null
[]
None
null
0
0
0
null
0
null
The function (SetSelectionNoRefresh) defined within the public class called public.The function start at line 551 and ends at 557. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [551.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
OnPageChanged
def OnPageChanged(self,event):'''respond to someone pressing a tab on the plot window.Called when a plot tab is clicked. on some platforms (Mac for sure) thisis also called when a plot is created or selected with .SetSelection() or.SetFocus().(removed) The self.skipPageChange is used variable is set to suppress repeate...
2
9
2
93
0
560
575
560
null
[]
None
null
0
0
0
null
0
null
The function (OnPageChanged) defined within the public class called public.The function start at line 560 and ends at 575. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [560.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SetHelpButton
def SetHelpButton(self,help):'''Adds a Help button to the status bar on plots.TODO: This has a problem with G2pwpl.PlotPatterns where creation of theHelpButton causes the notebook tabs to be duplicated. A manualresize fixes that, but the SendSizeEvent has not worked.'''hlp = G2G.HelpButton(self.status,helpIndex=help)re...
1
7
2
57
0
577
589
577
null
[]
None
null
0
0
0
null
0
null
The function (SetHelpButton) defined within the public class called public.The function start at line 577 and ends at 589. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [577.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
InvokeTreeItem
def InvokeTreeItem(self,pid):'''This is called to select an item from the tree using the self.allowZoomResetflag to prevent a reset to the zoom of the plot (where implemented)'''self.allowZoomReset = Falseif pid: self.G2frame.GPXtree.SelectItem(pid)self.allowZoomReset = Trueif plotDebug: print ('invoke'+str(self).split...
3
5
2
56
0
592
599
592
null
[]
None
null
0
0
0
null
0
null
The function (InvokeTreeItem) defined within the public class called public.The function start at line 592 and ends at 599. It contains 5 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [592.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
__init__
def __init__(self,plotCanvas,publish=None,Arrows=True):'''Adds additional icons to toolbar'''self.arrows = {}# try to remove a button from the barPOS_CONFIG_SPLTS_BTN = 6 # position of button to removeself.plotCanvas = plotCanvasToolbar.__init__(self,plotCanvas)self.updateActions = None # defines a call to be made as p...
7
25
4
226
0
603
630
603
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 603 and ends at 630. It contains 25 lines of code and it has a cyclomatic complexity of 7. It takes 4 parameters, represented as [603.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
set_message
def set_message(self,s):''' this removes spurious text messages from the tool bar'''pass
1
2
2
9
0
632
635
632
null
[]
None
null
0
0
0
null
0
null
The function (set_message) defined within the public class called public.The function start at line 632 and ends at 635. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [632.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
AddToolBarTool
def AddToolBarTool(self,label,title,filename,callback):bmpFilename = GSASIIpath.getIconFile(filename)if bmpFilename is None:print(f'Could not find bitmap file {filename!r}; skipping')bmp = wx.EmptyBitmap(32,32)else:bmp = wx.Bitmap(bmpFilename)#bmp = wx.Bitmap(bmpFilename,type=wx.BITMAP_TYPE_ANY) # probably betterif 'ph...
3
13
5
122
0
637
650
637
null
[]
None
null
0
0
0
null
0
null
The function (AddToolBarTool) defined within the public class called public.The function start at line 637 and ends at 650. It contains 13 lines of code and it has a cyclomatic complexity of 3. It takes 5 parameters, represented as [637.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
_update_view
def _update_view(self):'''Overrides the post-buttonbar update action to invoke a redraw; needed for plot magnification'''if self.updateActions:wx.CallAfter(*self.updateActions)Toolbar._update_view(self)
2
4
1
26
0
652
657
652
null
[]
None
null
0
0
0
null
0
null
The function (_update_view) defined within the public class called public.The function start at line 652 and ends at 657. 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
AnyActive
def AnyActive(self):for Itool in range(self.GetToolsCount()):if self.GetToolState(self.GetToolByPos(Itool).GetId()):return Truereturn False
3
5
1
38
0
659
663
659
null
[]
None
null
0
0
0
null
0
null
The function (AnyActive) defined within the public class called public.The function start at line 659 and ends at 663. 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
GetActive
def GetActive(self):for Itool in range(self.GetToolsCount()):tool = self.GetToolByPos(Itool)if self.GetToolState(tool.GetId()):return tool.GetLabel()return None
3
6
1
45
0
665
670
665
null
[]
None
null
0
0
0
null
0
null
The function (GetActive) defined within the public class called public.The function start at line 665 and ends at 670. It contains 6 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
OnArrow
def OnArrow(self,event):'reposition limits to scan or zoom by button press'axlist = self.plotCanvas.figure.get_axes()if len(axlist) == 1: ax = axlist[0] ax1 = Noneelif len(axlist) == 3: # used in "w" mode in G2pwpl.PlotPatterns _,ax,ax1 = axlist xmin,xmax,ymin1,ymax1 = ax1.axis()else:returnxmin,xmax,ymin,ymax = ax.axis...
14
55
2
391
0
672
730
672
null
[]
None
null
0
0
0
null
0
null
The function (OnArrow) defined within the public class called public.The function start at line 672 and ends at 730. It contains 55 lines of code and it has a cyclomatic complexity of 14. It takes 2 parameters, represented as [672.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
OnHelp
def OnHelp(self,event):'Respond to press of help button on plot toolbar'bookmark = self.Parent.helpKey# get help category used to create plot#if GSASIIpath.GetConfigValue('debug'): print 'plot help: key=',bookmarkG2G.ShowHelp(bookmark,self.TopLevelParent)
1
4
2
25
0
732
736
732
null
[]
None
null
0
0
0
null
0
null
The function (OnHelp) defined within the public class called public.The function start at line 732 and ends at 736. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [732.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
OnKey
def OnKey(self,event):'''Provide user with list of keystrokes defined for plot as well as analternate way to access the same functionality'''parent = self.GetParent()if parent.Choice:# remove the 1st entry in list if key pressif 'key press' in parent.Choice[0].lower():choices = list(parent.Choice[1:])else:choices = lis...
5
22
2
139
0
738
763
738
null
[]
None
null
0
0
0
null
0
null
The function (OnKey) defined within the public class called public.The function start at line 738 and ends at 763. It contains 22 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [738.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
get_zoompan
def get_zoompan(self):"""Return "Zoom" if Zoom is active, "Pan" if Pan is active,or None if neither"""return self.GetActive()
1
2
1
12
0
766
770
766
null
[]
None
null
0
0
0
null
0
null
The function (get_zoompan) defined within the public class called public.The function start at line 766 and ends at 770. 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
SetCursor
def SetCursor(page):mode = page.toolbar.GetActive()if mode == 'Pan':if 'phoenix' in wx.version():page.canvas.Cursor = wx.Cursor(wx.CURSOR_SIZING)else:page.canvas.SetCursor(wx.StockCursor(wx.CURSOR_SIZING))elif mode == 'Zoom':if 'phoenix' in wx.version():page.canvas.Cursor = wx.Cursor(wx.CURSOR_MAGNIFIER)else:page.canva...
6
17
1
146
1
814
830
814
null
['mode']
None
null
0
0
0
null
0
null
The function (SetCursor) defined within the public class called public.The function start at line 814 and ends at 830. It contains 17 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
PlotFPAconvolutors
def PlotFPAconvolutors(G2frame,NISTpk,conv2T=None,convI=None,convList=None):'''Plot the convolutions used for the current peak computed with:func:`GSASIIfpaGUI.doFPAcalc`'''import NIST_profile as FPnew,plotNum,Page,Plot,lim = G2frame.G2plotNB.FindPlotTab('FPA convolutors','mpl')Page.SetToolTipString('')cntr = NISTpk.tw...
9
39
5
409
11
832
875
832
null
['FFT', 'legend', 'ttmax', 'refColors', 'i', 'color', 'ttArr', 'f', 'convList', 'ttmin', 'cntr']
None
null
0
0
0
null
0
null
The function (PlotFPAconvolutors) defined within the public class called public.The function start at line 832 and ends at 875. It contains 39 lines of code and it has a cyclomatic complexity of 9. It takes 5 parameters, represented as [832.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SetupLegendPick
def SetupLegendPick(legend,new,delay=5):mplv = eval(mpl.__version__.replace('.',','))legend.delay = delay*1000 # Hold time in ms for clear; 0 == foreverfor line in legend.get_lines():if mplv[0] >= 3 and mplv[1] >= 3:line.set_pickradius(4)else:line.set_picker(4)# bug: legend items with single markers don't seem to respo...
7
15
3
112
1
877
893
877
null
['mplv']
None
null
0
0
0
null
0
null
The function (SetupLegendPick) defined within the public class called public.The function start at line 877 and ends at 893. It contains 15 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [877.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
onLegendPick.clearHighlight
def clearHighlight(event):if not canvas.timer: returnl,lm,lms,lmw = canvas.timer.lineinfol.set_marker(lm)l.set_markersize(lms)l.set_markeredgewidth(lmw)canvas.draw()canvas.timer = None
2
8
1
53
0
900
907
900
null
[]
None
null
0
0
0
null
0
null
The function (onLegendPick.clearHighlight) defined within the public class called public.The function start at line 900 and ends at 907. 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
onLegendPick
def onLegendPick(event):'''When a line in the legend is selected, find the matching linein the plot and then highlight it by adding/enlarging markers.Set up a timer to make a reset after delay selected in SetupLegendPick'''def clearHighlight(event):if not canvas.timer: returnl,lm,lms,lmw = canvas.timer.lineinfol.set_ma...
11
33
1
283
4
895
944
895
null
['delay', 'plot', 'canvas', 'lbl']
None
null
0
0
0
null
0
null
The function (onLegendPick) defined within the public class called public.The function start at line 895 and ends at 944. It contains 33 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
PlotSngl.OnSCKeyPress
def OnSCKeyPress(event):i = zones.index(Data['Zone'])newPlot = FalsepwdrChoice = {'f':'Fo','s':'Fosq','u':'Unit Fc'}hklfChoice = {'1':'|DFsq|>sig','3':'|DFsq|>3sig','w':'|DFsq|/sig','f':'Fo','s':'Fosq','u':'Unit Fc','o':'Fo only'}if event.key == 'h':Data['Zone'] = '100'newPlot = Trueelif event.key == 'k':Data['Zone'] =...
13
32
1
284
0
955
986
955
null
[]
None
null
0
0
0
null
0
null
The function (PlotSngl.OnSCKeyPress) defined within the public class called public.The function start at line 955 and ends at 986. It contains 32 lines of code and it has a cyclomatic complexity of 13. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotSngl.OnSCMotion
def OnSCMotion(event):xpos = event.xdataif xpos:xpos = round(xpos)#avoid out of frame mouse positionypos = round(event.ydata)zpos = Data['Layer']if '100' in Data['Zone']:HKLtxt = '(%d,%d,%d)'%(zpos,xpos,ypos)elif '010' in Data['Zone']:HKLtxt = '(%d,%d,%d)'%(xpos,zpos,ypos)elif '001' in Data['Zone']:HKLtxt = '(%d,%d,%d)...
5
14
1
110
0
988
1,001
988
null
[]
None
null
0
0
0
null
0
null
The function (PlotSngl.OnSCMotion) defined within the public class called public.The function start at line 988 and ends at 1001. It contains 14 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
PlotSngl.OnSCPress
def OnSCPress(event):zpos = Data['Layer']xpos = event.xdataif xpos:pos = int(round(event.xdata)),int(round(event.ydata))if '100' in Data['Zone']:hkl = np.array([zpos,pos[0],pos[1]])elif '010' in Data['Zone']:hkl = np.array([pos[0],zpos,pos[1]])elif '001' in Data['Zone']:hkl = np.array([pos[0],pos[1],zpos])h,k,l = hklhk...
6
17
1
214
0
1,003
1,019
1,003
null
[]
None
null
0
0
0
null
0
null
The function (PlotSngl.OnSCPress) defined within the public class called public.The function start at line 1003 and ends at 1019. It contains 17 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
PlotSngl.OnPick
def OnPick(event):pick = event.artistHKLtext = pick.get_gid()Page.SetToolTipString(HKLtext)G2frame.G2plotNB.status.SetStatusText('H = '+HKLtext,0)
1
5
1
37
0
1,021
1,025
1,021
null
[]
None
null
0
0
0
null
0
null
The function (PlotSngl.OnPick) defined within the public class called public.The function start at line 1021 and ends at 1025. 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
PlotSngl
def PlotSngl(G2frame,newPlot=False,Data=None,hklRef=None,Title=''):'''Structure factor plotting package - displays zone of reflections as rings proportionalto F, F**2, etc. as requested via matpltlib; plots are not geometrically correct'''from matplotlib.patches import Circleglobal HKL,HKLF,HKLrefHKLref = hklRefdef OnS...
41
159
5
1,395
42
947
1,180
947
null
['zones', 'HKLref', 'Title', 'newPlot', 'xylim', 'i', 'radius', 'Super', 'HKL', 'Type', 'pwdrChoice', 'hkl', 'hklf', 'sumFo', 'hid', 'scale', 'hklfChoice', 'HKLtext', 'pick', 'FosqMax', 'C', 'pzone', 'B', 'ylabel', 'ypos', 'HKLtxt', 'HKLmax', 'HKLmin', 'h', 'xy', 'xpos', 'A', 'H', 'pos', 'SuperVec', 'izone', 'FoMax', '...
None
null
0
0
0
null
0
null
The function (PlotSngl) defined within the public class called public.The function start at line 947 and ends at 1180. It contains 159 lines of code and it has a cyclomatic complexity of 41. It takes 5 parameters, represented as [947.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Plot1DSngl.OnKeyPress
def OnKeyPress(event):if event.key == 'q':Page.qaxis = not Page.qaxiselif event.key == 'f':Page.faxis = not Page.faxiselif event.key == 'v':Page.vaxis = not Page.vaxisDraw()
4
8
1
53
0
1,189
1,196
1,189
null
[]
None
null
0
0
0
null
0
null
The function (Plot1DSngl.OnKeyPress) defined within the public class called public.The function start at line 1189 and ends at 1196. It contains 8 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
Plot1DSngl.OnPick
def OnPick(event):H = hkl[:,event.ind[0]]Page.SetToolTipString('#%d: %d,%d,%d'%(event.ind[0],H[0],H[1],H[2]))
1
3
1
48
0
1,198
1,200
1,198
null
[]
None
null
0
0
0
null
0
null
The function (Plot1DSngl.OnPick) defined within the public class called public.The function start at line 1198 and ends at 1200. 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
Plot1DSngl.OnMotion
def OnMotion(event):global Xxpos = event.xdatalimx = Plot.get_xlim()if xpos:#avoid out of frame mouse positionXpos = xposif Page.qaxis:dT = np.fabs(2.*np.pi/limx[0]-2.*np.pi/limx[1])/100.Xpos = 2.*np.pi/xposfound = hklRef[np.where(np.fabs(hklRef.T[4+Super]-Xpos) < dT/2.)]else:dT = np.fabs(limx[1]-limx[0])/100.found = h...
11
40
1
324
0
1,202
1,241
1,202
null
[]
None
null
0
0
0
null
0
null
The function (Plot1DSngl.OnMotion) defined within the public class called public.The function start at line 1202 and ends at 1241. It contains 40 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
Plot1DSngl.Draw
def Draw():global xylim,hklPlot.clear()Plot.set_title(Title)Plot.set_xlabel(r'd, '+Angstr,fontsize=14)Plot.set_ylabel(r'F'+super2,fontsize=14)colors=['b','r','g','c','m','k']Page.keyPress = OnKeyPresshkl = hklRef.T[:3]if 'HKLF' in Name:Fosq,sig,Fcsq = hklRef.T[5+Super:8+Super]else:Fosq,sig,Fcsq = hklRef.T[8+Super],np.n...
10
72
0
835
0
1,243
1,317
1,243
null
[]
None
null
0
0
0
null
0
null
The function (Plot1DSngl.Draw) defined within the public class called public.The function start at line 1243 and ends at 1317. It contains 72 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
Plot1DSngl
def Plot1DSngl(G2frame,newPlot=False,hklRef=None,Super=0,Title=False):'''1D Structure factor plotting package - displays reflections as sticks proportionalto F, F**2, etc. as requested'''global xylim,X,hklName = G2frame.GPXtree.GetItemText(G2frame.PatternId)def OnKeyPress(event):if event.key == 'q':Page.qaxis = not Pag...
3
23
5
172
25
1,183
1,335
1,183
null
['fmt', 'XY', 'Ymax', 'xylim', 'newPlot', 'd', 'limx', 'hkl', 'n', 's', 'dT', 'dxylim', 'Z', 'found', 'ypos', 'Xpos', 'XZ', 'xpos', 'lines', 'H', 'Y', 'colors', 'XD', 'Name', 'X']
None
null
0
0
0
null
0
null
The function (Plot1DSngl) defined within the public class called public.The function start at line 1183 and ends at 1335. It contains 23 lines of code and it has a cyclomatic complexity of 3. It takes 5 parameters, represented as [1183.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Plot3DSngl.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")try:Fname = os.path.join(...
6
33
1
265
0
1,344
1,376
1,344
null
[]
None
null
0
0
0
null
0
null
The function (Plot3DSngl.OnKeyBox) defined within the public class called public.The function start at line 1344 and ends at 1376. It contains 33 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
Plot3DSngl.OnKey
def OnKey(event): #on key UP!!global ifBoxChoice = {'F':'Fo','S':'Fosq','U':'Unit','D':'dFsq','W':'dFsq/sig'}viewChoice = {'L':np.array([[0,0,1],[1,0,0],[0,1,0]]),'K':np.array([[0,1,0],[0,0,1],[1,0,0]]),'H':np.array([[1,0,0],[0,0,1],[0,1,0]])}try:keyCode = event.GetKeyCode()if keyCode > 255:keyCode = 0key = chr(keyCode...
21
76
1
784
0
1,378
1,453
1,378
null
[]
None
null
0
0
0
null
0
null
The function (Plot3DSngl.OnKey) defined within the public class called public.The function start at line 1378 and ends at 1453. It contains 76 lines of code and it has a cyclomatic complexity of 21. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Plot3DSngl.FillHKLRC
def FillHKLRC():sumFo2 = 0.sumDF2 = 0.sumFo = 0.sumDF = 0.R = np.zeros(len(hklRef))C = []HKL = []for i,refl in enumerate(hklRef):if Data['Shell'][1]:if not (Data['Shell'][0] <= 0.5/refl[4+Super] <= Data['Shell'][0]+.1):continueH = refl[:3]if 'HKLF' in Name:Fosq,sig,Fcsq = refl[5+Super:8+Super]if refl[3+Super] < 0:Fosq,...
20
75
0
578
0
1,486
1,560
1,486
null
[]
None
null
0
0
0
null
0
null
The function (Plot3DSngl.FillHKLRC) defined within the public class called public.The function start at line 1486 and ends at 1560. It contains 75 lines of code and it has a cyclomatic complexity of 20. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Plot3DSngl.GetTruePosition
def GetTruePosition(xy):View = GL.glGetIntegerv(GL.GL_VIEWPORT)Proj = GL.glGetDoublev(GL.GL_PROJECTION_MATRIX)Model = GL.glGetDoublev(GL.GL_MODELVIEW_MATRIX)Zmax = 1.xy = [int(xy[0]),int(View[3]-xy[1])]for i,ref in enumerate(hklRef):h,k,l = ref[:3]try:X,Y,Z = GLU.gluProject(h,k,l,Model,Proj,View)XY = [int(X),int(Y)]if ...
5
16
1
179
0
1,562
1,577
1,562
null
[]
None
null
0
0
0
null
0
null
The function (Plot3DSngl.GetTruePosition) defined within the public class called public.The function start at line 1562 and ends at 1577. It contains 16 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
Plot3DSngl.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
13
1
151
0
1,580
1,594
1,580
null
[]
None
null
0
0
0
null
0
null
The function (Plot3DSngl.SetTranslation) defined within the public class called public.The function start at line 1580 and ends at 1594. 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
Plot3DSngl.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
18
1
197
0
1,596
1,617
1,596
null
[]
None
null
0
0
0
null
0
null
The function (Plot3DSngl.SetRotation) defined within the public class called public.The function start at line 1596 and ends at 1617. It contains 18 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
Plot3DSngl.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
1,619
1,643
1,619
null
[]
None
null
0
0
0
null
0
null
The function (Plot3DSngl.SetRotationZ) defined within the public class called public.The function start at line 1619 and ends at 1643. 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
Plot3DSngl.OnMouseDown
def OnMouseDown(event):xy = event.GetPosition()drawingData['oldxy'] = list(xy)
1
3
1
21
0
1,645
1,647
1,645
null
[]
None
null
0
0
0
null
0
null
The function (Plot3DSngl.OnMouseDown) defined within the public class called public.The function start at line 1645 and ends at 1647. 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
Plot3DSngl.OnMouseMove
def OnMouseMove(event):if event.ShiftDown(): #don't want any inadvertant moves when pickingreturnnewxy = event.GetPosition()if event.Dragging():if event.LeftIsDown():SetRotation(newxy)elif event.RightIsDown():SetTranslation(newxy)Tx,Ty,Tz = drawingData['viewPoint'][0]elif event.MiddleIsDown():SetRotationZ(newxy)Draw('m...
7
19
1
129
0
1,649
1,668
1,649
null
[]
None
null
0
0
0
null
0
null
The function (Plot3DSngl.OnMouseMove) defined within the public class called public.The function start at line 1649 and ends at 1668. It contains 19 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
Plot3DSngl.OnMouseWheel
def OnMouseWheel(event):if event.ShiftDown():returndrawingData['cameraPos'] += event.GetWheelRotation()/120.drawingData['cameraPos'] = max(0.1,min(20.00,drawingData['cameraPos']))Draw('wheel')
2
6
1
53
0
1,670
1,675
1,670
null
[]
None
null
0
0
0
null
0
null
The function (Plot3DSngl.OnMouseWheel) defined within the public class called public.The function start at line 1670 and ends at 1675. It contains 6 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
Plot3DSngl.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
1,677
1,680
1,677
null
[]
None
null
0
0
0
null
0
null
The function (Plot3DSngl.SetBackground) defined within the public class called public.The function start at line 1677 and ends at 1680. 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
Plot3DSngl.SetLights
def SetLights():try:GL.glEnable(GL.GL_DEPTH_TEST)except:if GSASIIpath.GetConfigValue('debug'): print('depth test failed')return#GL.glShadeModel(GL.GL_SMOOTH)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,1])GL.glLightfv(GL...
3
11
0
99
0
1,682
1,693
1,682
null
[]
None
null
0
0
0
null
0
null
The function (Plot3DSngl.SetLights) defined within the public class called public.The function start at line 1682 and ends at 1693. 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
Plot3DSngl.RenderBox
def RenderBox(x,y,z):GL.glEnable(GL.GL_COLOR_MATERIAL)GL.glLineWidth(1)GL.glPushMatrix()GL.glTranslate(x,y,z)GL.glColor4ubv([0,0,0,0])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.glDi...
2
15
3
128
0
1,695
1,709
1,695
null
[]
None
null
0
0
0
null
0
null
The function (Plot3DSngl.RenderBox) defined within the public class called public.The function start at line 1695 and ends at 1709. It contains 15 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [1695.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Plot3DSngl.RenderUnitVectors
def RenderUnitVectors(x,y,z,labxyz=['','','']):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 list(zip(uEdges,uColors))[:3]:GL.glColor3ubv(color)GL.glVertex3fv([0,0,0])#GL.glVertex3fv(-line[1])GL.glVertex3fv(line[1])GL.glEnd()GL.glRotate(...
4
22
4
241
0
1,711
1,733
1,711
null
[]
None
null
0
0
0
null
0
null
The function (Plot3DSngl.RenderUnitVectors) defined within the public class called public.The function start at line 1711 and ends at 1733. It contains 22 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [1711.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Plot3DSngl.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.glColor3ubv(c)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
112
0
1,735
1,749
1,735
null
[]
None
null
0
0
0
null
0
null
The function (Plot3DSngl.RenderDots) defined within the public class called public.The function start at line 1735 and ends at 1749. It contains 15 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [1735.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Plot3DSngl.Draw
def Draw(caller=''):#useful debug?#if caller:#print caller# end of useful debugVS = np.array(Page.canvas.GetSize())aspect = float(VS[0])/float(VS[1])cPos = drawingData['cameraPos']Zclip = drawingData['Zclip']*cPos/20.if Data['Zone']:Zclip = 0.002Q = drawingData['Quaternion']Tx,Ty,Tz = drawingData['viewPoint'][0][:3]G,g...
8
59
1
675
0
1,751
1,817
1,751
null
[]
None
null
0
0
0
null
0
null
The function (Plot3DSngl.Draw) defined within the public class called public.The function start at line 1751 and ends at 1817. It contains 59 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
Plot3DSngl
def Plot3DSngl(G2frame,newPlot=False,Data=None,hklRef=None,Title=False):'''3D Structure factor plotting package - displays reflections as spots proportionalto F, F**2, etc. as requested as 3D array via pyOpenGl'''global ifBoxifBox = Falsedef OnKeyBox(event):mode = cb.GetValue()if mode in ['jpeg','bmp','tiff',]:try:impo...
7
78
5
898
72
1,338
1,849
1,338
null
['im', 'uColors', 'Title', 'dF', 'newxy', 'XY', 'cPos', 'dxy', 'Super', 'text', 'cent', 'XYZ', 'HKL', 'f', 'cell', 'matRot', 'oldxy', 'cb', 'Rd', 'hkl', 'R', 'sumFo', 'View', 'GS', 'Gr', 'C', 'Qx', 'sumFo2', 'VD', 'Font', 'Proj', 'RF2', 'DQ', 'Zclip', 'Q', 'keyCode', 'key', 'Bl', 'Choice', 'V', 'aspect', 'Wt', 'RF', 'u...
None
null
0
0
0
null
0
null
The function (Plot3DSngl) defined within the public class called public.The function start at line 1338 and ends at 1849. It contains 78 lines of code and it has a cyclomatic complexity of 7. It takes 5 parameters, represented as [1338.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotDeltSig
def PlotDeltSig(G2frame,kind,PatternName=None):'Produces normal probability plot for a powder or single crystal histogram'if PatternName:G2frame.PatternId = G2gd.GetGPXtreeItemId(G2frame, G2frame.root, PatternName)new,plotNum,Page,Plot,lim = G2frame.G2plotNB.FindPlotTab('Error analysis','mpl')if new:G2frame.Cmin = 0.0G...
9
77
3
1,013
27
1,853
1,930
1,853
null
['im', 'sumFobs', 'EDS', 'limits', 'sumDelt', 'bot', 'refl', 'top', 'xmin', 'sumWobs', 'xye', 'frac', 'DX', 'sum2Delt', 'xmax', 'Nobs', 'sumF2obs', 'w2', 'sumWdelt', 'low1', 'DS', 'sumObs', 'hi1', 'PatternId', 'Pattern', 'wtFactor', 'T']
None
null
0
0
0
null
0
null
The function (PlotDeltSig) defined within the public class called public.The function start at line 1853 and ends at 1930. It contains 77 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [1853.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotISFG.OnPlotKeyUp
def OnPlotKeyUp(event):if event.key == 'shift':G2frame.ShiftDown = Falsereturn
2
4
1
18
0
1,945
1,948
1,945
null
[]
None
null
0
0
0
null
0
null
The function (PlotISFG.OnPlotKeyUp) defined within the public class called public.The function start at line 1945 and ends at 1948. 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
PlotISFG.OnPlotKeyPress
def OnPlotKeyPress(event):if event.key == 'shift':G2frame.ShiftDown = TruereturnnewPlot = Falseif G2frame.ShiftDown: event.key = event.key.upper()if event.key == 'u':if G2frame.Contour:G2frame.Cmax = min(1.0,G2frame.Cmax*1.2)elif Page.Offset[1] < 100.: Page.Offset[1] += 1.elif event.key == 'd':if G2frame.Contour:G2fram...
38
89
1
738
0
1,950
2,038
1,950
null
[]
None
null
0
0
0
null
0
null
The function (PlotISFG.OnPlotKeyPress) defined within the public class called public.The function start at line 1950 and ends at 2038. It contains 89 lines of code and it has a cyclomatic complexity of 38. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotISFG.OnMotion
def OnMotion(event):xpos = event.xdataif xpos:#avoid out of frame mouse positionypos = event.ydataSetCursor(Page)try:if G2frame.Contour:G2frame.G2plotNB.status.SetStatusText('R =%.3fA pattern ID =%5d'%(xpos,int(ypos)),1)else:G2frame.G2plotNB.status.SetStatusText('R =%.3fA %s =%.2f'%(xpos,plotType,ypos),1)except TypeErr...
4
12
1
91
0
2,040
2,051
2,040
null
[]
None
null
0
0
0
null
0
null
The function (PlotISFG.OnMotion) defined within the public class called public.The function start at line 2040 and ends at 2051. 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
PlotISFG.PlotISFG.OnPick.OnDragLine
def OnDragLine(event):'''Respond to dragging of a plot line'''if event.xdata is None: return # ignore if cursor out of windowPage.canvas.restore_region(savedplot)coords = G2frame.itemPicked.get_data()coords[0][0] = coords[0][1] = event.xdatacoords = G2frame.itemPicked.set_data(coords)Page.figure.gca().draw_artist(G2fra...
2
8
1
90
0
2,055
2,064
2,055
null
[]
None
null
0
0
0
null
0
null
The function (PlotISFG.PlotISFG.OnPick.OnDragLine) defined within the public class called public.The function start at line 2055 and ends at 2064. 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
PlotISFG.OnPick
def OnPick(event):def OnDragLine(event):'''Respond to dragging of a plot line'''if event.xdata is None: return # ignore if cursor out of windowPage.canvas.restore_region(savedplot)coords = G2frame.itemPicked.get_data()coords[0][0] = coords[0][1] = event.xdatacoords = G2frame.itemPicked.set_data(coords)Page.figure.gca()...
5
25
1
267
0
2,053
2,090
2,053
null
[]
None
null
0
0
0
null
0
null
The function (PlotISFG.OnPick) defined within the public class called public.The function start at line 2053 and ends at 2090. 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
PlotISFG.OnRelease
def OnRelease(event):if Peaks == None: returnif G2frame.itemPicked == None: returnif G2frame.cid is not None: # if there is a drag connection, delete itPage.canvas.mpl_disconnect(G2frame.cid)G2frame.cid = Noneif event.xdata is None or event.ydata is None: # ignore drag if cursor is outside of plotPage.canvas.mpl_discon...
10
25
1
209
0
2,092
2,116
2,092
null
[]
None
null
0
0
0
null
0
null
The function (PlotISFG.OnRelease) defined within the public class called public.The function start at line 2092 and ends at 2116. It contains 25 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
PlotISFG
def PlotISFG(G2frame,data,newPlot=False,plotType='',peaks=None):''' Plotting package for PDF analysis; displays I(Q), S(Q), F(Q) and G(r) as singleor multiple plots with waterfall and contour plots as options'''global PeaksPeaks = peaksG2frame.ShiftDown = Falseif not plotType:plotType = G2frame.G2plotNB.plotList[G2fram...
51
240
5
2,268
66
1,933
2,355
1,933
null
['Xmax', 'numlines', 'XYlist', 'pId', 'colorRange', 'Ymax', 'newPlot', 'xylim', 'ContourX', 'ifCalc', 'PDFdata', 'color', 'Page', 'dy', 'Ymin', 'savedplot', 'PlotList', 'pick', 'acolor', 'lenX', 'dlg', 'xye', 'lgndlist', 'ind', 'ifin', 'D', 'coords', 'line', 'Z', 'ymin', 'Nseq', 'Img', 'plotType', 'ypos', 'Peaks', 'nam...
None
null
0
0
0
null
0
null
The function (PlotISFG) defined within the public class called public.The function start at line 1933 and ends at 2355. It contains 240 lines of code and it has a cyclomatic complexity of 51. It takes 5 parameters, represented as [1933.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotCalib.OnMotion
def OnMotion(event):xpos = event.xdataif xpos:#avoid out of frame mouse positionypos = event.ydataSetCursor(Page)try:G2frame.G2plotNB.status.SetStatusText('X =%9.3f %s =%9.3g'%(xpos,Title,ypos),1)except TypeError:G2frame.G2plotNB.status.SetStatusText('Select '+Title+' pattern first',1)found = []xlim = Plot.get_xlim()wi...
5
21
1
170
0
2,363
2,383
2,363
null
[]
None
null
0
0
0
null
0
null
The function (PlotCalib.OnMotion) defined within the public class called public.The function start at line 2363 and ends at 2383. It contains 21 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
PlotCalib
def PlotCalib(G2frame,Inst,XY,Sigs,newPlot=False):'''plot of CW or TOF peak calibration'''global Plotdef OnMotion(event):xpos = event.xdataif xpos:#avoid out of frame mouse positionypos = event.ydataSetCursor(Page)try:G2frame.G2plotNB.status.SetStatusText('X =%9.3f %s =%9.3g'%(xpos,Title,ypos),1)except TypeError:G2fram...
12
59
5
441
15
2,358
2,442
2,358
null
['Title', 'pos', 'Q', 'xylim', 'newPlot', 'Y', 'found', 'ypos', 'W', 'Yc', 'wid', 'E', 'bin', 'xlim', 'xpos']
None
null
0
0
0
null
0
null
The function (PlotCalib) defined within the public class called public.The function start at line 2358 and ends at 2442. It contains 59 lines of code and it has a cyclomatic complexity of 12. It takes 5 parameters, represented as [2358.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotXY.OnKeyPress
def OnKeyPress(event):if event.key == 'u':if Page.Offset[1] < 100.:Page.Offset[1] += 1.elif event.key == 'd':if Page.Offset[1] > 0.:Page.Offset[1] -= 1.elif event.key == 'l':Page.Offset[0] -= 1.elif event.key == 'r':Page.Offset[0] += 1.elif event.key == 'o':Page.Offset = [0,0]elif event.key == 's':if len(XY):G2IO.XYsav...
12
21
1
178
0
2,465
2,485
2,465
null
[]
None
null
0
0
0
null
0
null
The function (PlotXY.OnKeyPress) defined within the public class called public.The function start at line 2465 and ends at 2485. It contains 21 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
PlotXY.OnMotion
def OnMotion(event):xpos = event.xdataif xpos:#avoid out of frame mouse positionypos = event.ydataSetCursor(Page)try:G2frame.G2plotNB.status.SetStatusText('X =%9.3f %s =%9.3f'%(xpos,Title,ypos),1)except TypeError:G2frame.G2plotNB.status.SetStatusText('Select '+Title+' pattern first',1)
3
9
1
63
0
2,487
2,495
2,487
null
[]
None
null
0
0
0
null
0
null
The function (PlotXY.OnMotion) defined within the public class called public.The function start at line 2487 and ends at 2495. It contains 9 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
PlotXY.Draw
def Draw():global xylimPlot.clear()Plot.set_title(Title,fontsize=16)Plot.set_xlabel(r''+labelX,fontsize=16)Plot.set_ylabel(r''+labelY,fontsize=16)Plot.tick_params(labelsize=14)colors = ['xkcd:blue','xkcd:red','xkcd:green','xkcd:cyan','xkcd:magenta','xkcd:black','xkcd:pink','xkcd:brown','xkcd:teal','xkcd:orange','xkcd:g...
15
58
0
632
0
2,497
2,554
2,497
null
[]
None
null
0
0
0
null
0
null
The function (PlotXY.Draw) defined within the public class called public.The function start at line 2497 and ends at 2554. It contains 58 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
PlotXY
def PlotXY(G2frame,XY,XY2=[],labelX='X',labelY='Y',newPlot=False,Title='',lines=False,points2=False,names=[],names2=[],vertLines=[]):'''simple plot of xy data:param wx.Frame G2frame: The main GSAS-II tree "window":param list XY: a list of X,Y array pairs; len(X) = len(Y):param list XY2: a secondary list of X,Y pairs:pa...
4
22
12
177
10
2,445
2,572
2,445
null
['Xmax', 'Ymax', 'xylim', 'newPlot', 'ypos', 'colors', 'dY', 'NC', 'xpos', 'dX']
None
null
0
0
0
null
0
null
The function (PlotXY) defined within the public class called public.The function start at line 2445 and ends at 2572. It contains 22 lines of code and it has a cyclomatic complexity of 4. It takes 12 parameters, represented as [2445.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotXYZ.OnKeyPress
def OnKeyPress(event):if event.key == 'u':G2frame.Cmax = min(1.0,G2frame.Cmax*1.2)elif event.key == 'd':G2frame.Cmax = max(0.0,G2frame.Cmax*0.8)elif event.key == 'o':G2frame.Cmax = 1.0elif event.key == 'g':mpl.rcParams['axes.grid'] = not mpl.rcParams['axes.grid']elif event.key == 'i':choice = ['nearest','bilinear','bic...
10
31
1
299
0
2,591
2,624
2,591
null
[]
None
null
0
0
0
null
0
null
The function (PlotXYZ.OnKeyPress) defined within the public class called public.The function start at line 2591 and ends at 2624. It contains 31 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
PlotXYZ.OnMotion
def OnMotion(event):xpos = event.xdataif xpos and Xmin<xpos<Xmax:#avoid out of frame mouse positionypos = event.ydataif ypos and Ymin<ypos<Ymax:Xwd = Xmax-XminYwd = Ymax-YminSetCursor(Page)ix = int(Nxy[0]*(xpos-Xmin)/Xwd)iy = int(Nxy[1]*(ypos-Ymin)/Ywd)try:G2frame.G2plotNB.status.SetStatusText('%s =%9.3f %s =%9.3f val ...
6
15
1
132
0
2,626
2,640
2,626
null
[]
None
null
0
0
0
null
0
null
The function (PlotXYZ.OnMotion) defined within the public class called public.The function start at line 2626 and ends at 2640. It contains 15 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
PlotXYZ.OnPress
def OnPress(event):if Page.toolbar.AnyActive():# prevent ops. if a toolbar zoom button pressedreturnxpos,ypos = event.xdata,event.ydataif xpos and buttonHandler:buttonHandler(xpos,ypos)
4
6
1
37
0
2,642
2,647
2,642
null
[]
None
null
0
0
0
null
0
null
The function (PlotXYZ.OnPress) defined within the public class called public.The function start at line 2642 and ends at 2647. It contains 6 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..