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
UpdatePDFPeaks
def UpdatePDFPeaks(G2frame,peaks,data):def limitSizer():def NewLim(invalid,value,tc):if invalid:returnG2plt.PlotISFG(G2frame,data,newPlot=False,plotType='G(R)',peaks=peaks)limitBox = wx.BoxSizer(wx.HORIZONTAL)limitBox.Add(wx.StaticText(G2frame.dataWindow,label=' PDF Limits: '),0,WACV)lowLim = G2G.ValidatedTxtCtrl(G2fra...
2
26
3
229
35
10,267
10,458
10,267
null
['colLabels', 'Names', 'rowLabels', 'pId', 'PDFPeaks', 'backBox', 'Source', 'items', 'lowLim', 'el', 'SeqResult', 'PE', 'dlg', 'peakBox', 'TextList', 'parms', 'peakTable', 'slope', 'olddata', 'name', 'limitBox', 'PatternId', 'peaks', 'Types', 'sel', 'c', 'od', 'mainSizer', 'refbk', 'PDFlist', 'Id', 'newpeaks', 'highLim...
None
null
0
0
0
null
0
null
The function (UpdatePDFPeaks) defined within the public class called public.The function start at line 10267 and ends at 10458. It contains 26 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [10267.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ReplotPattern
def ReplotPattern(G2frame,newPlot,plotType,PatternName=None,PickName=None):'''This does the same as PlotPatterns except that it expects the informationto be plotted (pattern name, item picked in tree + eventually the reflection list)to be passed as names rather than references to wx tree items, defined as class entries...
9
22
5
150
1
95
121
95
null
['pId']
None
null
0
0
0
null
0
null
The function (ReplotPattern) defined within the public class called public.The function start at line 95 and ends at 121. It contains 22 lines of code and it has a cyclomatic complexity of 9. It takes 5 parameters, represented as [95.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
plotVline
def plotVline(Page,Plot,Lines,Parms,pos,color,pick,style='dotted'):'''shortcut to plot vertical lines for limits & Laue satellites.Was used for extrapeaks'''if Page.plotStyle['qPlot']:Lines.append(Plot.axvline(2.*np.pi/G2lat.Pos2dsp(Parms,pos),color=color,picker=pick,pickradius=2.,linestyle=style))elif Page.plotStyle['...
3
10
8
145
0
123
134
123
null
[]
None
null
0
0
0
null
0
null
The function (plotVline) defined within the public class called public.The function start at line 123 and ends at 134. It contains 10 lines of code and it has a cyclomatic complexity of 3. It takes 8 parameters, represented as [123.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotPatterns.PublishPlot
def PublishPlot(event):msg = ""if 'PWDR' not in plottype:msg += " * only PWDR histograms can be used"if G2frame.Contour or not G2frame.SinglePlot:if msg: msg += '\n'msg += " * only when a single histogram is plotted"if Page.plotStyle['logPlot']:if msg: msg += '\n'msg += " * only when the intensity scale is linear/sqrt ...
9
23
1
137
0
173
195
173
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.PublishPlot) defined within the public class called public.The function start at line 173 and ends at 195. It contains 23 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
PlotPatterns.OnPlotKeyPress
def OnPlotKeyPress(event):try:#one way to check if key stroke will work on plotParms,Parms2 = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Instrument Parameters'))except TypeError:G2frame.G2plotNB.status.SetStatusText('Select '+plottype+' pattern first',1)returnnewPlot = Falseif event...
143
277
1
2,601
0
197
479
197
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.OnPlotKeyPress) defined within the public class called public.The function start at line 197 and ends at 479. It contains 277 lines of code and it has a cyclomatic complexity of 143. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotPatterns.OnMotion
def OnMotion(event):'''PlotPatterns: respond to motion of the cursor. The status line will be updated with info based on the mouse position. Also displays reflection labels as tooltips when mouse is over tickmarks'''global PlotListG2plt.SetCursor(Page)# excluded region animationif Page.excludeMode and Page.savedplot:if...
51
158
1
1,290
0
481
645
481
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.OnMotion) defined within the public class called public.The function start at line 481 and ends at 645. It contains 158 lines of code and it has a cyclomatic complexity of 51. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotPatterns.OnPress
def OnPress(event): #ugh - this removes a matplotlib error for mouse clicks in log plotsnp.seterr(invalid='ignore')
1
2
1
13
0
647
648
647
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.OnPress) defined within the public class called public.The function start at line 647 and ends at 648. 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
PlotPatterns.onMoveDiffCurve
def onMoveDiffCurve(event):'''Respond to a menu command to move the difference curve. '''if not DifLine[0]:print('No difference curve!')returnG2frame.itemPicked = DifLine[0]G2frame.G2plotNB.Parent.Raise()OnPickPwd(None)
2
7
1
39
0
650
658
650
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.onMoveDiffCurve) defined within the public class called public.The function start at line 650 and ends at 658. 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
PlotPatterns.onMoveTopTick
def onMoveTopTick(event):'''Respond to a menu command to move the tick locations. '''if len(Page.phaseList) == 0:print("there are tick marks (no phases)")returnG2frame.itemPicked = Page.tickDict[Page.phaseList[0]]G2frame.G2plotNB.Parent.Raise()OnPickPwd(None)
2
7
1
49
0
660
668
660
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.onMoveTopTick) defined within the public class called public.The function start at line 660 and ends at 668. 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
PlotPatterns.onMoveTickSpace
def onMoveTickSpace(event):'''Respond to a menu command to move the tick spacing. '''if len(Page.phaseList) == 0:print("there are tick marks (no phases)")returnG2frame.itemPicked = Page.tickDict[Page.phaseList[-1]]G2frame.G2plotNB.Parent.Raise()OnPickPwd(None)
2
7
1
50
0
670
678
670
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.onMoveTickSpace) defined within the public class called public.The function start at line 670 and ends at 678. 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
PlotPatterns.onMovePeak
def onMovePeak(event):reflGrid = G2frame.reflGridselectedPeaks = list(set([row for row,col in reflGrid.GetSelectedCells()] +reflGrid.GetSelectedRows()))if len(selectedPeaks) != 1:tbl = reflGrid.GetTable().datachoices = [f"{i[0]:.2f}" for i in tbl]dlg = G2G.G2SingleChoiceDialog(G2frame,'Select peak to move','select peak...
7
18
1
144
0
680
697
680
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.onMovePeak) defined within the public class called public.The function start at line 680 and ends at 697. It contains 18 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
PlotPatterns.PlotPatterns.OnPickPwd.OnDragMarker
def OnDragMarker(event):'''Respond to dragging of a plot Marker'''if event.xdata is None or event.ydata is None: return # ignore if cursor out of windowif G2frame.itemPicked is None: return # not sure why this happens, if it doesPage.canvas.restore_region(savedplot)G2frame.itemPicked.set_data([event.xdata], [event.ydat...
5
11
1
98
0
704
716
704
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.PlotPatterns.OnPickPwd.OnDragMarker) defined within the public class called public.The function start at line 704 and ends at 716. It contains 11 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotPatterns.PlotPatterns.OnPickPwd.OnDragLine
def OnDragLine(event):'''Respond to dragging of a plot line'''if event.xdata is None: return # ignore if cursor out of windowif G2frame.itemPicked is None: return # not sure why this happens Page.canvas.restore_region(savedplot)coords = G2frame.itemPicked.get_data()coords[0][0] = coords[0][1] = event.xdatacoords = G2fr...
4
13
1
112
0
718
732
718
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.PlotPatterns.OnPickPwd.OnDragLine) defined within the public class called public.The function start at line 718 and ends at 732. 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
PlotPatterns.PlotPatterns.OnPickPwd.OnDragLabel
def OnDragLabel(event):'''Respond to dragging of a HKL label'''if event.xdata is None: return # ignore if cursor out of windowif G2frame.itemPicked is None: return # not sure why this happenstry:coords = list(G2frame.itemPicked.get_position())coords[1] = event.ydatadata = G2frame.GPXtree.GetItemPyData(G2frame.PatternId...
6
23
1
212
0
734
758
734
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.PlotPatterns.OnPickPwd.OnDragLabel) defined within the public class called public.The function start at line 734 and ends at 758. It contains 23 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
PlotPatterns.PlotPatterns.OnPickPwd.OnDragTickmarks
def OnDragTickmarks(event):'''Respond to dragging of the reflection tick marks'''if event.ydata is None: return # ignore if cursor out of windowif Page.tickDict is None: return # not sure why this happens, if it doesPage.canvas.restore_region(savedplot)if Page.pickTicknum:refDelt = -(event.ydata-Page.plotStyle['refOffs...
6
21
1
175
0
760
782
760
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.PlotPatterns.OnPickPwd.OnDragTickmarks) defined within the public class called public.The function start at line 760 and ends at 782. It contains 21 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
PlotPatterns.PlotPatterns.OnPickPwd.OnDragDiffCurve
def OnDragDiffCurve(event):'''Respond to dragging of the difference curve. '''if event.ydata is None: return # ignore if cursor out of windowif G2frame.itemPicked is None: return # not sure why this happens Page.canvas.restore_region(savedplot)coords = G2frame.itemPicked.get_data()coords[1][:] += Page.diffOffset + even...
3
10
1
100
0
784
795
784
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.PlotPatterns.OnPickPwd.OnDragDiffCurve) defined within the public class called public.The function start at line 784 and ends at 795. 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
PlotPatterns.PlotPatterns.OnPickPwd.DeleteHKLlabel
def DeleteHKLlabel(HKLmarkers,key):'''Delete an HKL label'''del HKLmarkers[key[0]][key[1]]G2frame.itemPicked = NonePlotPatterns(G2frame,plotType=plottype,extraKeys=extraKeys)
1
4
2
39
0
797
801
797
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.PlotPatterns.OnPickPwd.DeleteHKLlabel) defined within the public class called public.The function start at line 797 and ends at 801. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [797.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotPatterns.OnPickPwd
def OnPickPwd(event):'''Respond to an item being picked. This usually means that the itemwill be dragged with the mouse, or sometimes the pick object is used to create a peak or an excluded region'''def OnDragMarker(event):'''Respond to dragging of a plot Marker'''if event.xdata is None or event.ydata is None: return #...
78
299
1
2,900
0
699
1,135
699
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.OnPickPwd) defined within the public class called public.The function start at line 699 and ends at 1135. It contains 299 lines of code and it has a cyclomatic complexity of 78. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotPatterns.OnRelease
def OnRelease(event):'''This is called when the mouse button is released when a plot object is draggeddue to an item pick, or when invoked via a menu item (such as in onMoveDiffCurve),or for background points, which may be added/moved/deleted here.New peaks are also added here.'''plotNum = G2frame.G2plotNB.plotList.ind...
69
169
1
1,658
0
1,137
1,320
1,137
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.OnRelease) defined within the public class called public.The function start at line 1137 and ends at 1320. It contains 169 lines of code and it has a cyclomatic complexity of 69. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotPatterns.PlotPatterns.onSetPlotLim.onChecked
def onChecked(event):try:i = cbox.index(event.EventObject)showChecked(i)except:pass
2
6
1
24
0
1,325
1,330
1,325
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.PlotPatterns.onSetPlotLim.onChecked) defined within the public class called public.The function start at line 1325 and ends at 1330. 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
PlotPatterns.PlotPatterns.onSetPlotLim.showChecked
def showChecked(i):checked = cbox[i].GetValue()if not checked:# fake out validation to avoid ugly yellow dbox[i].invalid = Falsedbox[i]._IndicateValidity()else: # reset validationdbox[i].ChangeValue(dbox[i].GetValue())dbox[i].Enable(checked)
2
8
1
62
0
1,331
1,339
1,331
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.PlotPatterns.onSetPlotLim.showChecked) defined within the public class called public.The function start at line 1331 and ends at 1339. 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
PlotPatterns.PlotPatterns.onSetPlotLim.applyLims
def applyLims(event):Page.toolbar.push_current()# Page.toolbar.set_history_buttons() # this may be needed to update the zoom buttons (needs test)# Page.canvas.draw_idle() # schedule an MPL update (needs test)CurLims = {}CurLims['xlims'] = list(Plot.get_xlim())if G2frame.Weight:CurLims['ylims'] = list(Page.figure.axes[1...
9
32
1
307
0
1,340
1,375
1,340
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.PlotPatterns.onSetPlotLim.applyLims) defined within the public class called public.The function start at line 1340 and ends at 1375. It contains 32 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
PlotPatterns.onSetPlotLim
def onSetPlotLim(event):'''Specify plot limits manually'''def onChecked(event):try:i = cbox.index(event.EventObject)showChecked(i)except:passdef showChecked(i):checked = cbox[i].GetValue()if not checked:# fake out validation to avoid ugly yellow dbox[i].invalid = Falsedbox[i]._IndicateValidity()else: # reset validation...
5
50
1
562
0
1,322
1,427
1,322
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.onSetPlotLim) defined within the public class called public.The function start at line 1322 and ends at 1427. It contains 50 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
PlotPatterns.onPlotFormat
def onPlotFormat(event):'''Change the appearance of the current plot'''changePlotSettings(G2frame,Plot)
1
2
1
12
0
1,429
1,431
1,429
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.onPlotFormat) defined within the public class called public.The function start at line 1429 and ends at 1431. 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
PlotPatterns.refPlotUpdate
def refPlotUpdate(Histograms,cycle=None,restore=False):'''called to update an existing plot during a Rietveld fit; it only updates the curves, not the reflection marks or the legend. It should be called with restore=True to reset plotting parameters after the refinement is done.'''if restore:(G2frame.SinglePlot,G2frame...
16
67
3
746
0
1,433
1,508
1,433
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.refPlotUpdate) defined within the public class called public.The function start at line 1433 and ends at 1508. It contains 67 lines of code and it has a cyclomatic complexity of 16. It takes 3 parameters, represented as [1433.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlotPatterns.incCptn
def incCptn(string):'''Adds a underscore to "hide" a MPL object from the legend if obsInCaption is False'''if plotOpt['obsInCaption']:return stringelse:return '_'+string
2
5
1
20
0
1,510
1,517
1,510
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.incCptn) defined within the public class called public.The function start at line 1510 and ends at 1517. 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
PlotPatterns.Replot
def Replot(*args):PlotPatterns(G2frame,plotType=plottype,extraKeys=extraKeys)
1
2
1
18
0
1,519
1,520
1,519
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.Replot) defined within the public class called public.The function start at line 1519 and ends at 1520. 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
PlotPatterns.PlotPatterns.onHKLabelConfig.onDelAll
def onDelAll(event):'''Delete all HKL markers in all phases'''data[0]['HKLmarkers'] = {}dlg.EndModal(wx.ID_OK)Replot()
1
4
1
27
0
1,524
1,528
1,524
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.PlotPatterns.onHKLabelConfig.onDelAll) defined within the public class called public.The function start at line 1524 and ends at 1528. 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
PlotPatterns.onHKLabelConfig
def onHKLabelConfig(event):'''Configure all HKL markers in all phases'''def onDelAll(event):'''Delete all HKL markers in all phases'''data[0]['HKLmarkers'] = {}dlg.EndModal(wx.ID_OK)Replot()data = G2frame.GPXtree.GetItemPyData(G2frame.PatternId)data[0]['HKLconfig'] = data[0].get('HKLconfig',{})dlg = wx.Dialog(G2frame,s...
1
51
1
516
0
1,522
1,580
1,522
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.onHKLabelConfig) defined within the public class called public.The function start at line 1522 and ends at 1580. It contains 51 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
PlotPatterns.onPartialConfig
def onPartialConfig(event):'''respond to Phase partials config menu command. Computes partials if needed and then displays a window with optionsfor each phase. Plot is refreshed each time a setting is changed.'''Controls = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.root, 'Controls'))phPartialFi...
6
17
1
128
0
1,582
1,602
1,582
null
[]
None
null
0
0
0
null
0
null
The function (PlotPatterns.onPartialConfig) defined within the public class called public.The function start at line 1582 and ends at 1602. 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
PlotPatterns
def PlotPatterns(G2frame,newPlot=False,plotType='PWDR',data=None, extraKeys=[],refineMode=False,indexFrom='',fromTree=False):'''Powder pattern plotting package - displays single or multiple powder patterns as intensity vs 2-theta, q or TOF. Can display multiple patterns as "waterfall plots" or contour plots. Log I plot...
439
1,174
8
11,576
237
136
2,886
136
null
['refColors', 'YB', 'font', 'color', 'backDict', 'NoffY', 'msg', 'pwidth', 'Ifin', 'ZB', 'Lmask', 'Xlist', 'lW', 'excl', 'nxcl', 'CY', 'lims', 'num', 'r', 'ml0', 'Temps', 'q', 'pickIdText', 'savedSettings', 'found', 'vbox', 'Phases', 'mcolors', 'x', 'labels', 'xlim', 'tpos', 'rgb_light', 'found_indices', 'backPts', 'ar...
None
null
0
0
0
null
0
null
The function (PlotPatterns) defined within the public class called public.The function start at line 136 and ends at 2886. It contains 1174 lines of code and it has a cyclomatic complexity of 439. It takes 8 parameters, represented as [136.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PublishRietveldPlot.Init_fmts
def Init_fmts():figure = mplfig.Figure(dpi=200,figsize=(6,8))canvas = hcCanvas(figure)fmtDict = canvas.get_supported_filetypes()plotWidgets['fmtChoices'] = [fmtDict[j]+', '+j for j in sorted(fmtDict)]plotWidgets['fmtChoices'].append('Data file with plot elements, csv')plotWidgets['fmtChoices'].append('Grace input file,...
3
10
0
100
0
2,898
2,907
2,898
null
[]
None
null
0
0
0
null
0
null
The function (PublishRietveldPlot.Init_fmts) defined within the public class called public.The function start at line 2898 and ends at 2907. 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
PublishRietveldPlot.Initialize
def Initialize():'''Set up initial values in plotOpt'''plotOpt['initNeeded'] = False# create a temporary hard-copy figure to get output optionsfigure = mplfig.Figure(dpi=200,figsize=(6,8))canvas = hcCanvas(figure)figure.clear()fmtDict = canvas.get_supported_filetypes()if plotOpt['format'] is None:if 'pdf' in fmtDict:pl...
5
22
0
184
0
2,908
2,932
2,908
null
[]
None
null
0
0
0
null
0
null
The function (PublishRietveldPlot.Initialize) defined within the public class called public.The function start at line 2908 and ends at 2932. It contains 22 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PublishRietveldPlot.GetColors
def GetColors():'''Set up initial values in plotOpt for colors and legend. Also catalog phases.'''if hasattr(mpcls,'to_rgba'):MPL2rgba = mpcls.to_rgbaelse:MPL2rgba = mpcls.ColorConverter().to_rgbafor i,l in enumerate(Plot.lines):lbl = l.get_label()if 'magline' in lbl:passelif lbl[1:] in plotOpt['lineList']: # item not ...
10
24
0
219
0
2,939
2,964
2,939
null
[]
None
null
0
0
0
null
0
null
The function (PublishRietveldPlot.GetColors) defined within the public class called public.The function start at line 2939 and ends at 2964. It contains 24 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
PublishRietveldPlot.RefreshPlot
def RefreshPlot(*args,**kwargs):'''Update the plot on the dialog'''figure.clear()CopyRietveldPlot(G2frame,Pattern,Plot,Page,figure,plotWidgets['phaseList'])figure.canvas.draw()
1
4
2
39
0
2,966
2,971
2,966
null
[]
None
null
0
0
0
null
0
null
The function (PublishRietveldPlot.RefreshPlot) defined within the public class called public.The function start at line 2966 and ends at 2971. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [2966.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PublishRietveldPlot.PublishRietveldPlot.CopyRietveld2Grace.ClosestColorNumber
def ClosestColorNumber(color):'''Convert a RGB value to the closest default Grace color'''import matplotlib.colors as mpclscolorlist = ('white','black','red','green','blue','yellow','brown','gray','purple','cyan','magenta','orange') # ordered by grace's #if not hasattr(mpcls,'to_rgba'): mpcls = mpcls.ColorConverter()re...
3
7
1
103
0
2,979
2,987
2,979
null
[]
None
null
0
0
0
null
0
null
The function (PublishRietveldPlot.PublishRietveldPlot.CopyRietveld2Grace.ClosestColorNumber) defined within the public class called public.The function start at line 2979 and ends at 2987. 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 ...
AdvancedPhotonSource_GSAS-II
public
public
0
0
PublishRietveldPlot.CopyRietveld2Grace
def CopyRietveld2Grace(Pattern,Plot,Page,plotOpt,filename):'''Copy the contents of the Rietveld graph from the plot window toa Grace input file (tested with QtGrace). Uses values from Pattern to also generate a delta/sigma plot below. '''def ClosestColorNumber(color):'''Convert a RGB value to the closest default Grace ...
34
222
5
1,855
0
2,974
3,233
2,974
null
[]
None
null
0
0
0
null
0
null
The function (PublishRietveldPlot.CopyRietveld2Grace) defined within the public class called public.The function start at line 2974 and ends at 3233. It contains 222 lines of code and it has a cyclomatic complexity of 34. It takes 5 parameters, represented as [2974.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PublishRietveldPlot.PublishRietveldPlot.CopyRietveld2Origin.origin_shutdown_exception_hook
def origin_shutdown_exception_hook(exctype, value, tracebk):'''Ensures Origin gets shut down if an uncaught exception'''try: op.exit()except:passprint('\n****OriginPro error****')import tracebacktraceback.print_exception(exctype, value, tracebk)G2G.G2MessageBox(G2frame,'Failed to connect to OriginPro. Is it installed?\...
2
10
3
44
0
3,238
3,248
3,238
null
[]
None
null
0
0
0
null
0
null
The function (PublishRietveldPlot.PublishRietveldPlot.CopyRietveld2Origin.origin_shutdown_exception_hook) defined within the public class called public.The function start at line 3238 and ends at 3248. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [3238.0] a...
AdvancedPhotonSource_GSAS-II
public
public
0
0
PublishRietveldPlot.PublishRietveldPlot.CopyRietveld2Origin.increase_line_width
def increase_line_width(plot):layr = op.GLayer(plot.layer)pindex = plot.index()pname = layr.obj.GetStrProp('plot{}.name'.format(pindex+1))layr.lt_exec('set {} -w 1000'.format(pname))
1
5
1
50
0
3,252
3,256
3,252
null
[]
None
null
0
0
0
null
0
null
The function (PublishRietveldPlot.PublishRietveldPlot.CopyRietveld2Origin.increase_line_width) defined within the public class called public.The function start at line 3252 and ends at 3256. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not retur...
AdvancedPhotonSource_GSAS-II
public
public
0
0
PublishRietveldPlot.CopyRietveld2Origin
def CopyRietveld2Origin(Pattern,Plot,Page,plotOpt,G2frame):# Exports plot to Origin. This function was written by Conrad Gillard (conrad.gillard@gmail.com).def origin_shutdown_exception_hook(exctype, value, tracebk):'''Ensures Origin gets shut down if an uncaught exception'''try: op.exit()except:passprint('\n****Origin...
31
156
5
1,276
0
3,235
3,452
3,235
null
[]
None
null
0
0
0
null
0
null
The function (PublishRietveldPlot.CopyRietveld2Origin) defined within the public class called public.The function start at line 3235 and ends at 3452. It contains 156 lines of code and it has a cyclomatic complexity of 31. It takes 5 parameters, represented as [3235.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PublishRietveldPlot.PublishRietveldPlot.CopyRietveld2Igor.Write2cols
def Write2cols(fil,dataItems):'''Write a line to a file in space-separated columns. Skips masked items. :param object fil: file object:param list dataItems: items to write as row in file'''line = ''for item in dataItems:if ma.is_masked(item): returnif line: line += ' 'item = str(item)if ' ' in item:line += '"'+item+'"'...
5
11
2
62
0
3,467
3,483
3,467
null
[]
None
null
0
0
0
null
0
null
The function (PublishRietveldPlot.PublishRietveldPlot.CopyRietveld2Igor.Write2cols) defined within the public class called public.The function start at line 3467 and ends at 3483. It contains 11 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [3467.0] and does not return any...
AdvancedPhotonSource_GSAS-II
public
public
0
0
PublishRietveldPlot.CopyRietveld2Igor
def CopyRietveld2Igor(Pattern,Plot,Page,plotOpt,filename,G2frame):'''Copy the contents of the Rietveld graph from the plot window toa Igor Pro input file (tested with v7.05). Uses values from Pattern to also generate a delta/sigma plot below. Coded with lots of help from Jan Ilavsky.'''import itertools # delay this unt...
22
133
6
905
0
3,454
3,621
3,454
null
[]
None
null
0
0
0
null
0
null
The function (PublishRietveldPlot.CopyRietveld2Igor) defined within the public class called public.The function start at line 3454 and ends at 3621. It contains 133 lines of code and it has a cyclomatic complexity of 22. It takes 6 parameters, represented as [3454.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PublishRietveldPlot
def PublishRietveldPlot(G2frame,Pattern,Plot,Page,reuse=None):'''Creates a window to show a customizable "Rietveld" plot. Exports that plot as a publication-quality file. Will only work only when a single pattern is displayed.:param wx.Frame G2Frame: the main GSAS-II window:param list Pattern: list of np.array items wi...
1
8
5
30
0
2,888
3,621
2,888
null
[]
None
null
0
0
0
null
0
null
The function (PublishRietveldPlot) defined within the public class called public.The function start at line 2888 and ends at 3621. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [2888.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CopyRietveld2csv
def CopyRietveld2csv(Pattern,Plot,Page,filename):'''Copy the contents of the Rietveld graph from the plot window to.csv file'''import itertools # delay this since not commonly called or neededlblList = []valueList = []tickpos = {}lblList.append('used')try:valueList.append([0 if i else 1 for i in savedX.mask])except:pas...
26
76
4
682
0
3,666
3,749
3,666
null
[]
None
null
0
0
0
null
0
null
The function (CopyRietveld2csv) defined within the public class called public.The function start at line 3666 and ends at 3749. It contains 76 lines of code and it has a cyclomatic complexity of 26. It takes 4 parameters, represented as [3666.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
onSave
def onSave(event):'''Write the current plot to a file'''hcfigure = mplfig.Figure(dpi=plotOpt['dpi'],figsize=(plotOpt['width'],plotOpt['height']))CopyRietveldPlot(G2frame,Pattern,Plot,Page,hcfigure,plotWidgets['phaseList'])if 'OriginPro' in plotOpt['format']:CopyRietveld2Origin(Pattern,Plot,Page,plotOpt,G2frame)dlg.EndM...
11
21
1
217
0
3,751
3,773
3,751
null
[]
None
null
0
0
0
null
0
null
The function (onSave) defined within the public class called public.The function start at line 3751 and ends at 3773. It contains 21 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
OnSelectColour
def OnSelectColour(event):'''Respond to a change in color'''#lbl = plotOpt['colorButtons'].get(list(event.GetEventObject())[:3])if event.GetEventObject() not in plotWidgets['colorButtons']:print('Unexpected button',str(event.GetEventObject()))returnlbl = plotWidgets['colorButtons'][event.GetEventObject()]c = event.GetV...
2
8
1
99
0
3,775
3,785
3,775
null
[]
None
null
0
0
0
null
0
null
The function (OnSelectColour) defined within the public class called public.The function start at line 3775 and ends at 3785. 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
OnSavePlotOpt
def OnSavePlotOpt(event):'Save current "publish" settings to a JSON file with extension .pltopts'import jsonfilroot = os.path.splitext(G2frame.GSASprojectfile)[0]+'.pltopts'saveFile = G2G.askSaveFile(G2frame,filroot,'.pltopts','Saved plot options')if saveFile:json.dump(plotOpt,open(saveFile,'w'))print(f'Plot options wr...
2
9
1
60
0
3,787
3,795
3,787
null
[]
None
null
0
0
0
null
0
null
The function (OnSavePlotOpt) defined within the public class called public.The function start at line 3787 and ends at 3795. 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
OnLoadPlotOpt
def OnLoadPlotOpt(event):'Set current "publish" settings from saved settings in a JSON file (extension .pltopts)'import jsonfilroot = os.path.splitext(G2frame.GSASprojectfile)[0]+'.pltopts'fdlg = wx.FileDialog(dlg, 'Choose saved plot options file',filroot,style=wx.FD_OPEN, wildcard='plot options file(*.pltopts)|*.pltop...
2
12
1
104
0
3,797
3,808
3,797
null
[]
None
null
0
0
0
null
0
null
The function (OnLoadPlotOpt) defined within the public class called public.The function start at line 3797 and ends at 3808. It contains 12 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
CopyRietveldPlot
def CopyRietveldPlot(G2frame,Pattern,Plot,Page,figure,phaseList):'''Copy the contents of the Rietveld graph from the plot window to anothermpl figure which can be on screen or can be a file for hard copy.Uses values from Pattern to also generate a delta/sigma plot below the main figure, since the weights are not availa...
28
119
6
1,345
19
4,012
4,156
4,012
null
['lineWid', 'ax1', 'p', 'legLine', 'legLbl', 'siz', 'props', 'mew', 'lims', 'DZ', 'uselbl', 'lbl', 'ax0', 'ph', 'gs', 'wtFactor', 'marker', 'c', 'art']
None
null
0
0
0
null
0
null
The function (CopyRietveldPlot) defined within the public class called public.The function start at line 4012 and ends at 4156. It contains 119 lines of code and it has a cyclomatic complexity of 28. It takes 6 parameters, represented as [4012.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
changePlotSettings.RefreshPlot
def RefreshPlot(*args,**kwargs):'''Apply settings to the plot'''Plot.figure.subplots_adjust(left=int(plotOpt['labelSize'])/100.,bottom=int(plotOpt['labelSize'])/150.,right=.98,top=1.-int(plotOpt['labelSize'])/200.,hspace=0.0)for P in Plot.figure.axes:P.get_xaxis().get_label().set_fontsize(plotOpt['labelSize'])P.get_yax...
10
30
2
340
0
4,162
4,193
4,162
null
[]
None
null
0
0
0
null
0
null
The function (changePlotSettings.RefreshPlot) defined within the public class called public.The function start at line 4162 and ends at 4193. It contains 30 lines of code and it has a cyclomatic complexity of 10. It takes 2 parameters, represented as [4162.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
changePlotSettings
def changePlotSettings(G2frame,Plot):'''Code in development to allow changes to plot settingsprior to export of plot with "floppy disk" button'''def RefreshPlot(*args,**kwargs):'''Apply settings to the plot'''Plot.figure.subplots_adjust(left=int(plotOpt['labelSize'])/100.,bottom=int(plotOpt['labelSize'])/150.,right=.98...
5
61
2
831
8
4,158
4,260
4,158
null
['OKbtn', 'txtChoices', 'lwidChoices', 'vbox', 'hbox', 'lbl', 'dlg', 'w']
None
null
0
0
0
null
0
null
The function (changePlotSettings) defined within the public class called public.The function start at line 4158 and ends at 4260. It contains 61 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [4158.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
uneqImgShow.midPoints
def midPoints(x):'''Return the pixel corners for a series of stepsFor the series [1,2,3,5] this will be [0.5,1.5,2.5,4,6]Note that n+1 points are returned for input of n points'''return np.concatenate( [[1.5*x[0] - x[1]/2], (x[:-1]+x[1:])/2, [1.5*x[-1] - x[-2]/2]] )
1
2
1
68
0
4,286
4,291
4,286
null
[]
None
null
0
0
0
null
0
null
The function (uneqImgShow.midPoints) defined within the public class called public.The function start at line 4286 and ends at 4291. 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
uneqImgShow
def uneqImgShow(figure,ax,Xlist,Ylist,cmap,vmin,vmax,Ylbls=[]):'''Plots a contour plot where point spacing varies within a dataset and where the X values may differ between histograms. Note that the length of Xlist and Ylist must be the same and will be the numberof histograms to be plotted :param matplotlib.figure fig...
4
16
8
198
4
4,262
4,310
4,262
null
['pos', 'ax1', 'lenX', 'meshlist']
None
null
0
0
0
null
0
null
The function (uneqImgShow) defined within the public class called public.The function start at line 4262 and ends at 4310. It contains 16 lines of code and it has a cyclomatic complexity of 4. It takes 8 parameters, represented as [4262.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
initPartialOpts
def initPartialOpts(phaseColors):'''Make sure that the options for display of partials are all defined'''for p in phaseColors:partialOpts[p] = partialOpts.get(p,{})partialOpts[p]['Show'] = partialOpts[p].get('Show',True)partialOpts[p]['color'] = partialOpts[p].get('color',phaseColors[p])partialOpts[p]['width'] = partia...
2
8
1
123
0
4,314
4,323
4,314
null
[]
None
null
0
0
0
null
0
null
The function (initPartialOpts) defined within the public class called public.The function start at line 4314 and ends at 4323. 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
configPartialDisplay.OnSelectColor
def OnSelectColor(event):'''Respond to a change in color'''p = event.GetEventObject().phasec = event.GetValue()# convert wx.Colour to mpl color stringpartialOpts[p]['color'] = mpl.colors.to_hex(np.array(c.Get())/255)phaseColors[p] = partialOpts[p]['color']RefreshPlot()
1
6
1
64
0
4,329
4,337
4,329
null
[]
None
null
0
0
0
null
0
null
The function (configPartialDisplay.OnSelectColor) defined within the public class called public.The function start at line 4329 and ends at 4337. It contains 6 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
configPartialDisplay.StyleChange
def StyleChange(*args):'define MPL line style from line style index'for p in partialOpts:try: partialOpts[p]['MPLstyle'] = ltypeMPLname[partialOpts[p]['style']]except:partialOpts[p]['MPLstyle'] = '-'RefreshPlot()
3
8
1
46
0
4,339
4,346
4,339
null
[]
None
null
0
0
0
null
0
null
The function (configPartialDisplay.StyleChange) defined within the public class called public.The function start at line 4339 and ends at 4346. It contains 8 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
configPartialDisplay
def configPartialDisplay(G2frame,phaseColors,RefreshPlot):'''Select which phase are diplayed with phase partials and how they are displayed'''def OnSelectColor(event):'''Respond to a change in color'''p = event.GetEventObject().phasec = event.GetValue()# convert wx.Colour to mpl color stringpartialOpts[p]['color'] = mp...
3
53
3
544
14
4,325
4,402
4,325
null
['ltypeChoices', 'ltypeMPLname', 'OKbtn', 'txt', 'lwidChoices', 'headers', 'c', 'mainSizer', 'gsizer', 'b', 'dlg', 'btnsizer', 'ch', 'p']
None
null
0
0
0
null
0
null
The function (configPartialDisplay) defined within the public class called public.The function start at line 4325 and ends at 4402. It contains 53 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [4325.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetSelectedRows
def GetSelectedRows(widget,lbl='edit',G2frame=None):'''Returns a list of selected rows. Rows can be selected, blocks of cellsor individual cells can be selected. The column for selected cells is ignored.'''try:rows = widget.GetSelectedRows()if rows: return rowstop = widget.GetSelectionBlockTopLeft()bot = widget.GetSele...
11
22
3
185
5
41
68
41
null
['rows', 'bot', 'top', 'dlg', 'choices']
None
null
0
0
0
null
0
null
The function (GetSelectedRows) defined within the public class called public.The function start at line 41 and ends at 68. It contains 22 lines of code and it has a cyclomatic complexity of 11. It takes 3 parameters, represented as [41.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateRestraints.getMacroFile
def getMacroFile(macName):defDir = os.path.join(GSASIIpath.path2GSAS2,'inputs','GSASIImacros')if not os.path.exists(defDir): # patch 3/2024 for svn dir organizationdefDir = os.path.join(GSASIIpath.path2GSAS2,'GSASIImacros')if not os.path.exists(defDir):print('Warning: GSASIImacros directory not found')returndlg = wx.Fi...
6
23
1
165
0
76
98
76
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.getMacroFile) defined within the public class called public.The function start at line 76 and ends at 98. It contains 23 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
UpdateRestraints.getMOGULFile
def getMOGULFile():colNums = [0,2,3,5,6,7] # location for these fields:# Type, Fragment, No. of hits, Query value, Mean, Std. dev.dlg = wx.FileDialog(G2frame,message='Choose MOGUL csv file',defaultDir='.',defaultFile="",wildcard="MOGUL csv file (*.csv)|*.csv",style=wx.FD_OPEN | wx.FD_CHANGE_DIR)try:mogul = ''if dlg.Sho...
6
25
0
168
0
100
125
100
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.getMOGULFile) defined within the public class called public.The function start at line 100 and ends at 125. It contains 25 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
UpdateRestraints.OnPlotAARestraint
def OnPlotAARestraint(event):page = G2frame.restrBook.GetSelection()if 'Torsion' in G2frame.restrBook.GetPageText(page):torNames = []torNames += list(restrData['Torsion']['Coeff'].keys())dlg = wx.SingleChoiceDialog(G2frame,'Select','Torsion data',torNames)try:if dlg.ShowModal() == wx.ID_OK:torName = torNames[dlg.GetSel...
16
54
1
569
0
127
181
127
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.OnPlotAARestraint) defined within the public class called public.The function start at line 127 and ends at 181. It contains 54 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
UpdateRestraints.SetupParmDict
def SetupParmDict(G2frame):'''Creates a parameter dict with variable names as keys and numerical values (only)'''G2cnstG.CheckAllScalePhaseFractions(G2frame,refine=False)try:parmDict,varyList = G2frame.MakeLSParmDict()except:print('Error retrieving parameters')return {}return {i:parmDict[i][0] for i in parmDict}
3
8
1
52
0
183
193
183
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.SetupParmDict) defined within the public class called public.The function start at line 183 and ends at 193. It contains 8 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
UpdateRestraints.OnAddRestraint
def OnAddRestraint(event):'''Adds a restraint depending on which tab is currently displayed'''page = G2frame.restrBook.GetSelection()if 'Bond' in G2frame.restrBook.GetPageText(page):AddBondRestraint(restrData['Bond'])elif 'Angle' in G2frame.restrBook.GetPageText(page):AddAngleRestraint(restrData['Angle'])elif 'Plane' i...
9
23
1
217
0
195
218
195
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.OnAddRestraint) defined within the public class called public.The function start at line 195 and ends at 218. It contains 23 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
UpdateRestraints.OnAddAARestraint
def OnAddAARestraint(event):page = G2frame.restrBook.GetSelection()if 'Bond' in G2frame.restrBook.GetPageText(page):AddAABondRestraint(restrData['Bond'])elif 'Angle' in G2frame.restrBook.GetPageText(page):AddAAAngleRestraint(restrData['Angle'])elif 'Plane' in G2frame.restrBook.GetPageText(page):AddAAPlaneRestraint(rest...
7
14
1
128
0
220
233
220
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.OnAddAARestraint) defined within the public class called public.The function start at line 220 and ends at 233. It contains 14 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
UpdateRestraints.OnUseMogul
def OnUseMogul(event):page = G2frame.restrBook.GetSelection()if 'Bond' in G2frame.restrBook.GetPageText(page):AddMogulBondRestraint(restrData['Bond'])elif 'Angle' in G2frame.restrBook.GetPageText(page):AddMogulAngleRestraint(restrData['Angle'])
3
6
1
52
0
235
240
235
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.OnUseMogul) defined within the public class called public.The function start at line 235 and ends at 240. 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
UpdateRestraints.makeChains
def makeChains(Names,Ids):Chains = {}atoms = zip(Names,Ids)for name,Id in atoms:items = name.split(' ',2)rnum,res = items[0].split(':')rnum = int(rnum)if items[1] not in Chains:Residues = {}Chains[items[1]] = Residuesif rnum not in Residues:Residues[rnum] = [[],[]]if items[2][3] in [' ','A']:Residues[rnum][0].append([r...
6
17
2
169
0
242
258
242
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.makeChains) defined within the public class called public.The function start at line 242 and ends at 258. It contains 17 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [242.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateRestraints.AddBondRestraint
def AddBondRestraint(bondRestData):Lists = {'origin':[],'target':[]}for listName in ['origin','target']:dlg = G2G.G2MultiChoiceDialog(G2frame,'Bond restraint '+listName+' for '+General['Name'],'Select bond restraint '+listName+' atoms',Names)if dlg.ShowModal() == wx.ID_OK:sel = dlg.GetSelections()for x in sel:if 'all' ...
14
35
1
345
0
260
295
260
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.AddBondRestraint) defined within the public class called public.The function start at line 260 and ends at 295. It contains 35 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
UpdateRestraints.AddAABondRestraint
def AddAABondRestraint(bondRestData):macro = getMacroFile('bond')if not macro:returnmacStr = macro.readline()atoms = zip(Names,Coords,Ids)Factor = bondRestData['Range']while macStr:items = macStr.split()if 'F' in items[0]:restrData['Bond']['wtFactor'] = float(items[1])elif 'S' in items[0]:oIds = []oCoords = []oDis = []...
15
46
1
419
0
297
342
297
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.AddAABondRestraint) defined within the public class called public.The function start at line 297 and ends at 342. It contains 46 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
UpdateRestraints.AddMogulBondRestraint
def AddMogulBondRestraint(bondRestData):mogul,colNums = getMOGULFile()badNames = []badCount = 0for line in mogul:items = line.split(',')if 'bond' == items[colNums[0]]:oName,tName = items[colNums[1]].split()try:oInd = Names.index(oName)except:badCount += 1badNames.append(oName)continuetry:tInd = Names.index(tName)except...
8
34
1
229
0
344
377
344
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.AddMogulBondRestraint) defined within the public class called public.The function start at line 344 and ends at 377. 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
UpdateRestraints.AddAngleRestraint
def AddAngleRestraint(angleRestData):Radii = dict(zip(General['AtomTypes'],zip(General['BondRadii'],General['AngleRadii'])))Lists = {'A-atom':[],'B-atom':[],'C-atom':[]}for listName in ['A-atom','B-atom']:dlg = G2G.G2MultiChoiceDialog(G2frame,'Select '+listName+' for angle A-B-C for '+General['Name'] ,'Select angle res...
30
71
1
810
0
378
449
378
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.AddAngleRestraint) defined within the public class called public.The function start at line 378 and ends at 449. It contains 71 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
UpdateRestraints.AddAAAngleRestraint
def AddAAAngleRestraint(angleRestData):macro = getMacroFile('angle')if not macro:returnChains = makeChains(Names,Ids)macStr = macro.readline()while macStr:items = macStr.split()if 'F' in items[0]:restrData['Angle']['wtFactor'] = float(items[1])elif 'S' in items[0]:Res = items[1]Value = float(items[2])Esd = float(items[...
21
60
1
439
0
451
510
451
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.AddAAAngleRestraint) defined within the public class called public.The function start at line 451 and ends at 510. It contains 60 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
UpdateRestraints.AddMogulAngleRestraint
def AddMogulAngleRestraint(angleRestData):mogul,colNums = getMOGULFile()for line in mogul:items = line.split(',')if 'angle' == items[colNums[0]]:aName,bName,cName = items[colNums[1]].split()aInd = Names.index(aName)bInd = Names.index(bName)cInd = Names.index(cName)if items[colNums[2]] != 'No hits':angle = float(items[c...
5
19
1
185
0
512
530
512
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.AddMogulAngleRestraint) defined within the public class called public.The function start at line 512 and ends at 530. It contains 19 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
UpdateRestraints.AddPlaneRestraint
def AddPlaneRestraint(restrData):ids = []dlg = G2G.G2MultiChoiceDialog(G2frame,'Select 4 or more atoms for plane in '+General['Name'],'Select 4+ atoms',Names[iBeg:])if dlg.ShowModal() == wx.ID_OK:sel = dlg.GetSelections()if len(sel) > 3:for x in sel:ids.append(Ids[x+iBeg])ops = ['1' for i in range(len(sel))]plane = [id...
6
16
1
132
0
532
547
532
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.AddPlaneRestraint) defined within the public class called public.The function start at line 532 and ends at 547. 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
UpdateRestraints.AddAAPlaneRestraint
def AddAAPlaneRestraint(planeRestData):macro = getMacroFile('plane')if not macro:returnChains = makeChains(Names,Ids)macStr = macro.readline()while macStr:items = macStr.split()if 'F' in items[0]:restrData['Plane']['wtFactor'] = float(items[1])elif 'S' in items[0]:Res = items[1]Esd = float(items[2])Atms = items[3:]pAtm...
25
62
1
458
0
549
610
549
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.AddAAPlaneRestraint) defined within the public class called public.The function start at line 549 and ends at 610. It contains 62 lines of code and it has a cyclomatic complexity of 25. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateRestraints.AddAAChiralRestraint
def AddAAChiralRestraint(chiralRestData):macro = getMacroFile('chiral')if not macro:returnChains = makeChains(Names,Ids)macStr = macro.readline()while macStr:items = macStr.split()if 'F' in items[0]:restrData['Chiral']['wtFactor'] = float(items[1])elif 'S' in items[0]:Res = items[1]Value = float(items[2])Esd = float(it...
19
52
1
376
0
612
663
612
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.AddAAChiralRestraint) defined within the public class called public.The function start at line 612 and ends at 663. It contains 52 lines of code and it has a cyclomatic complexity of 19. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateRestraints.AddAATorsionRestraint
def AddAATorsionRestraint(torsionRestData):macro = getMacroFile('torsion')if not macro:returnChains = makeChains(Names,Ids)macStr = macro.readline()[:-1]while macStr:items = macStr.split()if 'F' in items[0]:restrData['Torsion']['wtFactor'] = float(items[1])elif 'A' in items[0]:name = items[10]coeff = np.zeros(9)for i,i...
25
68
1
518
0
665
732
665
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.AddAATorsionRestraint) defined within the public class called public.The function start at line 665 and ends at 732. It contains 68 lines of code and it has a cyclomatic complexity of 25. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateRestraints.AddAARamaRestraint
def AddAARamaRestraint(ramaRestData):macro = getMacroFile('Ramachandran')if not macro:returnChains = makeChains(Names,Ids)macStr = macro.readline()while macStr:items = macStr.split()if 'F' in items[0]:restrData['Rama']['wtFactor'] = float(items[1])elif 'A' in items[0]:nTerms = int(items[1])name = items[2]coeff = np.zer...
33
87
1
717
0
734
820
734
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.AddAARamaRestraint) defined within the public class called public.The function start at line 734 and ends at 820. It contains 87 lines of code and it has a cyclomatic complexity of 33. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateRestraints.AddChemCompRestraint
def AddChemCompRestraint(chemcompRestData):ids = []factors = []dlg = G2G.G2MultiChoiceDialog(G2frame,'Select atoms for chemical restraint in '+General['Name'],'Select atoms',Names)if dlg.ShowModal() == wx.ID_OK:sel = dlg.GetSelections()for x in sel:if 'all' in Names[x]:allType = Types[x]for name,Type,Id in zip(Names,Ty...
10
29
1
232
0
822
850
822
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.AddChemCompRestraint) defined within the public class called public.The function start at line 822 and ends at 850. 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
UpdateRestraints.AddMomentRestraint
def AddMomentRestraint(momentRestData):ids = []dlg = G2G.G2MultiChoiceDialog(G2frame,'Select 2 or more atoms for average moment restraint in '+General['Name'],'Select 2+ atoms',Names[iBeg:])if dlg.ShowModal() == wx.ID_OK:sel = dlg.GetSelections()if len(sel) > 1:for x in sel:ids.append(Ids[x+iBeg])moment = [ids,0.0,0.01...
5
15
1
115
0
852
866
852
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.AddMomentRestraint) defined within the public class called public.The function start at line 852 and ends at 866. It contains 15 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
UpdateRestraints.AddTextureRestraint
def AddTextureRestraint(textureRestData):dlg = wx.TextEntryDialog(G2frame,'Enter h k l for pole figure restraint','Enter HKL','')if dlg.ShowModal() == wx.ID_OK:text = dlg.GetValue()vals = text.split()try:hkl = [int(vals[i]) for i in range(3)]texture = [hkl,24,0.01,False,1.0]if texture not in textureRestData['HKLs']:tex...
5
14
1
119
0
869
882
869
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.AddTextureRestraint) defined within the public class called public.The function start at line 869 and ends at 882. 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
UpdateRestraints.UpdateRestraints.WtBox.OnUseData
def OnUseData(event):Obj = event.GetEventObject()restData['Use'] = Obj.GetValue()
1
3
1
22
0
887
889
887
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.UpdateRestraints.WtBox.OnUseData) defined within the public class called public.The function start at line 887 and ends at 889. 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
UpdateRestraints.WtBox
def WtBox(wind,restData):if 'Range' not in restData: restData['Range'] = 1.1 #patchdef OnUseData(event):Obj = event.GetEventObject()restData['Use'] = Obj.GetValue()wtBox = wx.BoxSizer(wx.HORIZONTAL)wtBox.Add(wx.StaticText(wind,-1,'Phase '+phaseName+' Restraint weight factor: '),0,WACV)wtfactor = G2G.ValidatedTxtCtrl(wi...
4
17
2
220
0
884
904
884
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.WtBox) defined within the public class called public.The function start at line 884 and ends at 904. It contains 17 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [884.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateRestraints.OnRowSelect
def OnRowSelect(event):r,c =event.GetRow(),event.GetCol()Obj = event.GetEventObject()if r < 0 and c < 0:if Obj.IsSelection():Obj.ClearSelection()else:for row in range(Obj.GetNumberRows()):Obj.SelectRow(row,True)elif c < 0: #only row clicksif event.ControlDown():if r in Obj.GetSelectedRows():Obj.DeselectRow(r)else:Obj.S...
11
26
1
174
0
906
931
906
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.OnRowSelect) defined within the public class called public.The function start at line 906 and ends at 931. It contains 26 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
UpdateRestraints.UpdateRestraints.UpdateBondRestr.OnCellChange
def OnCellChange(event):r,c =event.GetRow(),event.GetCol()try:new = float(bondTable.GetValue(r,c))if new <= 0.:raise ValueErrorbondRestData['Bonds'][r][c] = newexcept ValueError:passwx.CallAfter(UpdateBondRestr,bondRestData)
3
10
1
67
0
936
945
936
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.UpdateRestraints.UpdateBondRestr.OnCellChange) defined within the public class called public.The function start at line 936 and ends at 945. 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
UpdateRestraints.UpdateRestraints.UpdateBondRestr.OnChangeValue
def OnChangeValue(event):rows = GetSelectedRows(Bonds)if not rows:returnBonds.ClearSelection()val = bondList[rows[0]][2]dlg = G2G.SingleFloatDialog(G2frame,'New value','Enter new value for bond',val,[0.,5.],'%.4f')if dlg.ShowModal() == wx.ID_OK:parm = dlg.GetValue()for r in rows:bondRestData['Bonds'][r][2] = parmdlg.De...
4
13
1
101
0
947
959
947
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.UpdateRestraints.UpdateBondRestr.OnChangeValue) defined within the public class called public.The function start at line 947 and ends at 959. 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
UpdateRestraints.UpdateRestraints.UpdateBondRestr.OnChangeEsd
def OnChangeEsd(event):rows = GetSelectedRows(Bonds)if not rows:returnBonds.ClearSelection()val = bondList[rows[0]][3]dlg = G2G.SingleFloatDialog(G2frame,'New value','Enter new esd for bond',val,[0.,1.],'%.4f')if dlg.ShowModal() == wx.ID_OK:parm = dlg.GetValue()for r in rows:bondRestData['Bonds'][r][3] = parmdlg.Destro...
4
13
1
101
0
961
973
961
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.UpdateRestraints.UpdateBondRestr.OnChangeEsd) defined within the public class called public.The function start at line 961 and ends at 973. 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
UpdateRestraints.UpdateRestraints.UpdateBondRestr.OnDeleteRestraint
def OnDeleteRestraint(event):rows = GetSelectedRows(Bonds,'delete',G2frame)G2frame.GetStatusBar().SetStatusText('',1)if not rows:G2frame.GetStatusBar().SetStatusText('First select restraints to be deleted',1)returnBonds.ClearSelection()rows.sort()rows.reverse()for row in rows:bondList.remove(bondList[row])UpdateBondRes...
3
12
1
77
0
975
986
975
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.UpdateRestraints.UpdateBondRestr.OnDeleteRestraint) defined within the public class called public.The function start at line 975 and ends at 986. 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
UpdateRestraints.UpdateBondRestr
def UpdateBondRestr(bondRestData):def OnCellChange(event):r,c =event.GetRow(),event.GetCol()try:new = float(bondTable.GetValue(r,c))if new <= 0.:raise ValueErrorbondRestData['Bonds'][r][c] = newexcept ValueError:passwx.CallAfter(UpdateBondRestr,bondRestData)def OnChangeValue(event):rows = GetSelectedRows(Bonds)if not r...
20
92
1
910
0
934
1,076
934
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.UpdateBondRestr) defined within the public class called public.The function start at line 934 and ends at 1076. It contains 92 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
UpdateRestraints.UpdateRestraints.UpdateAngleRestr.OnCellChange
def OnCellChange(event):r,c =event.GetRow(),event.GetCol()try:new = float(angleTable.GetValue(r,c))if new <= 0. or new > 180.:raise ValueErrorangleRestData['Angles'][r][c] = newexcept ValueError:passwx.CallAfter(UpdateAngleRestr,angleRestData)
4
10
1
72
0
1,080
1,089
1,080
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.UpdateRestraints.UpdateAngleRestr.OnCellChange) defined within the public class called public.The function start at line 1080 and ends at 1089. It contains 10 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
UpdateRestraints.UpdateRestraints.UpdateAngleRestr.OnChangeValue
def OnChangeValue(event):rows = GetSelectedRows(Angles)if not rows:returnAngles.ClearSelection()val = angleList[rows[0]][2]dlg = G2G.SingleFloatDialog(G2frame,'New value','Enter new value for angle',val,[0.,360.],'%.2f')if dlg.ShowModal() == wx.ID_OK:parm = dlg.GetValue()for r in rows:angleRestData['Angles'][r][2] = pa...
4
13
1
101
0
1,091
1,103
1,091
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.UpdateRestraints.UpdateAngleRestr.OnChangeValue) defined within the public class called public.The function start at line 1091 and ends at 1103. 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
UpdateRestraints.UpdateRestraints.UpdateAngleRestr.OnChangeEsd
def OnChangeEsd(event):rows = GetSelectedRows(Angles)if not rows:returnAngles.ClearSelection()val = angleList[rows[0]][3]dlg = G2G.SingleFloatDialog(G2frame,'New value','Enter new esd for angle',val,[0.,5.],'%.2f')if dlg.ShowModal() == wx.ID_OK:parm = dlg.GetValue()for r in rows:angleRestData['Angles'][r][3] = parmdlg....
4
13
1
101
0
1,105
1,117
1,105
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.UpdateRestraints.UpdateAngleRestr.OnChangeEsd) defined within the public class called public.The function start at line 1105 and ends at 1117. 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
UpdateRestraints.UpdateRestraints.UpdateAngleRestr.OnDeleteRestraint
def OnDeleteRestraint(event):rows = GetSelectedRows(Angles,'delete',G2frame)G2frame.GetStatusBar().SetStatusText('',1)if not rows:G2frame.GetStatusBar().SetStatusText('First select restraints to be deleted',1)returnrows.sort()rows.reverse()for row in rows:angleList.remove(angleList[row])UpdateAngleRestr(angleRestData)
3
11
1
72
0
1,119
1,129
1,119
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.UpdateRestraints.UpdateAngleRestr.OnDeleteRestraint) defined within the public class called public.The function start at line 1119 and ends at 1129. 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 valu...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateRestraints.UpdateAngleRestr
def UpdateAngleRestr(angleRestData):def OnCellChange(event):r,c =event.GetRow(),event.GetCol()try:new = float(angleTable.GetValue(r,c))if new <= 0. or new > 180.:raise ValueErrorangleRestData['Angles'][r][c] = newexcept ValueError:passwx.CallAfter(UpdateAngleRestr,angleRestData)def OnChangeValue(event):rows = GetSelect...
18
93
1
903
0
1,078
1,219
1,078
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.UpdateAngleRestr) defined within the public class called public.The function start at line 1078 and ends at 1219. It contains 93 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
UpdateRestraints.UpdateRestraints.UpdatePlaneRestr.OnCellChange
def OnCellChange(event):r,c =event.GetRow(),event.GetCol()try:new = float(planeTable.GetValue(r,c))if new <= 0.:raise ValueErrorplaneRestData['Planes'][r][c] = newexcept ValueError:passwx.CallAfter(UpdatePlaneRestr,planeRestData)
3
10
1
67
0
1,228
1,237
1,228
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.UpdateRestraints.UpdatePlaneRestr.OnCellChange) defined within the public class called public.The function start at line 1228 and ends at 1237. 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
UpdateRestraints.UpdateRestraints.UpdatePlaneRestr.OnChangeEsd
def OnChangeEsd(event):rows = GetSelectedRows(Planes)if not rows:returnPlanes.ClearSelection()val = planeList[rows[0]][3]dlg = G2G.SingleFloatDialog(G2frame,'New value','Enter new esd for plane',val,[0.,5.],'%.2f')if dlg.ShowModal() == wx.ID_OK:parm = dlg.GetValue()for r in rows:planeRestData['Planes'][r][3] = parmdlg....
4
13
1
101
0
1,239
1,251
1,239
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.UpdateRestraints.UpdatePlaneRestr.OnChangeEsd) defined within the public class called public.The function start at line 1239 and ends at 1251. 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
UpdateRestraints.UpdateRestraints.UpdatePlaneRestr.OnDeleteRestraint
def OnDeleteRestraint(event):rows = GetSelectedRows(Planes,'delete',G2frame)G2frame.GetStatusBar().SetStatusText('',1)if not rows:G2frame.GetStatusBar().SetStatusText('First select restraints to be deleted',1)returnrows.sort()rows.reverse()for row in rows:planeList.remove(planeList[row])UpdatePlaneRestr(planeRestData)
3
11
1
72
0
1,253
1,263
1,253
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.UpdateRestraints.UpdatePlaneRestr.OnDeleteRestraint) defined within the public class called public.The function start at line 1253 and ends at 1263. 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 valu...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateRestraints.UpdatePlaneRestr
def UpdatePlaneRestr(planeRestData):items = G2frame.dataWindow.RestraintEdit.GetMenuItems()for item in items:if item.GetItemLabelText() in ['Change value']:item.Enable(False)def OnCellChange(event):r,c =event.GetRow(),event.GetCol()try:new = float(planeTable.GetValue(r,c))if new <= 0.:raise ValueErrorplaneRestData['Pla...
24
99
1
906
0
1,221
1,357
1,221
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.UpdatePlaneRestr) defined within the public class called public.The function start at line 1221 and ends at 1357. It contains 99 lines of code and it has a cyclomatic complexity of 24. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateRestraints.UpdateRestraints.UpdateChiralRestr.OnCellChange
def OnCellChange(event):r,c =event.GetRow(),event.GetCol()try:new = float(volumeTable.GetValue(r,c))if new <= 0.:raise ValueErrorchiralRestData['Volumes'][r][c] = newexcept ValueError:passwx.CallAfter(UpdateChiralRestr,chiralRestData)
3
10
1
67
0
1,361
1,370
1,361
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.UpdateRestraints.UpdateChiralRestr.OnCellChange) defined within the public class called public.The function start at line 1361 and ends at 1370. 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
UpdateRestraints.UpdateRestraints.UpdateChiralRestr.OnDeleteRestraint
def OnDeleteRestraint(event):rows = GetSelectedRows(Volumes,'delete',G2frame)G2frame.GetStatusBar().SetStatusText('',1)if not rows:G2frame.GetStatusBar().SetStatusText('First select restraints to be deleted',1)returnrows.sort()rows.reverse()for row in rows:volumeList.remove(volumeList[row])UpdateChiralRestr(chiralRestD...
3
11
1
72
0
1,372
1,382
1,372
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.UpdateRestraints.UpdateChiralRestr.OnDeleteRestraint) defined within the public class called public.The function start at line 1372 and ends at 1382. 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 val...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateRestraints.UpdateRestraints.UpdateChiralRestr.OnChangeValue
def OnChangeValue(event):rows = GetSelectedRows(Volumes)if not rows:returnVolumes.ClearSelection()val = volumeList[rows[0]][2]dlg = G2G.SingleFloatDialog(G2frame,'New value','Enter new value for chiral volume',val,[0.,360.],'%.2f')if dlg.ShowModal() == wx.ID_OK:parm = dlg.GetValue()for r in rows:chiralRestData['Volumes...
4
13
1
101
0
1,384
1,396
1,384
null
[]
None
null
0
0
0
null
0
null
The function (UpdateRestraints.UpdateRestraints.UpdateChiralRestr.OnChangeValue) defined within the public class called public.The function start at line 1384 and ends at 1396. 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..