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
UpdateModelsGrid.UpdateModelsGrid.PairSizer.OnError
def OnError(event):data['Pair']['Errors'] = error.GetValue()wx.CallAfter(UpdateModelsGrid,G2frame,data)
1
3
1
28
0
8,355
8,357
8,355
null
[]
None
null
0
0
0
null
0
null
The function (UpdateModelsGrid.UpdateModelsGrid.PairSizer.OnError) defined within the public class called public.The function start at line 8355 and ends at 8357. 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
UpdateModelsGrid.UpdateModelsGrid.PairSizer.OnMaxRadEst
def OnMaxRadEst(event):Results = G2sasd.RgFit(Profile,ProfDict,Limits,Sample,data)if not Results[0]:G2frame.ErrorDialog('Failed refinement',' Msg: '+Results[-1]+'\nYou need to rethink your selection of parameters\n'+\' Model restored to previous version')RefreshPlots(True)wx.CallAfter(UpdateModelsGrid,G2frame,data)
2
8
1
61
0
8,359
8,366
8,359
null
[]
None
null
0
0
0
null
0
null
The function (UpdateModelsGrid.UpdateModelsGrid.PairSizer.OnMaxRadEst) defined within the public class called public.The function start at line 8359 and ends at 8366. 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
UpdateModelsGrid.UpdateModelsGrid.PairSizer.OnMooreTerms
def OnMooreTerms(event):data['Pair']['Moore'] = int(round(Limits[1][1]*data['Pair']['MaxRadius']/np.pi))-1wx.CallAfter(UpdateModelsGrid,G2frame,data)
1
3
1
50
0
8,368
8,370
8,368
null
[]
None
null
0
0
0
null
0
null
The function (UpdateModelsGrid.UpdateModelsGrid.PairSizer.OnMooreTerms) defined within the public class called public.The function start at line 8368 and ends at 8370. 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
UpdateModelsGrid.UpdateModelsGrid.PairSizer.OnNewVal
def OnNewVal(invalid,value,tc):if invalid: returnparmDict = {'Rg':data['Pair']['MaxRadius']/2.5,'G':data['Pair']['Dist G'],'B':data['Pair'].get('Dist B',Profile[1][-1]*Profile[0][-1]**4),'Back':data['Back'][0]}Profile[2] = G2sasd.getSASDRg(Profile[0],parmDict)RefreshPlots(True)
2
7
3
102
0
8,372
8,378
8,372
null
[]
None
null
0
0
0
null
0
null
The function (UpdateModelsGrid.UpdateModelsGrid.PairSizer.OnNewVal) defined within the public class called public.The function start at line 8372 and ends at 8378. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [8372.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateModelsGrid.PairSizer
def PairSizer():def OnMethod(event):data['Pair']['Method'] = method.GetValue()wx.CallAfter(UpdateModelsGrid,G2frame,data)def OnError(event):data['Pair']['Errors'] = error.GetValue()wx.CallAfter(UpdateModelsGrid,G2frame,data)def OnMaxRadEst(event):Results = G2sasd.RgFit(Profile,ProfDict,Limits,Sample,data)if not Results...
4
57
0
713
0
8,349
8,430
8,349
null
[]
None
null
0
0
0
null
0
null
The function (UpdateModelsGrid.PairSizer) defined within the public class called public.The function start at line 8349 and ends at 8430. It contains 57 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
UpdateModelsGrid.UpdateModelsGrid.ShapesSizer.OnShapeSelect
def OnShapeSelect(event):r,c =event.GetRow(),event.GetCol()for i in [1,2]:for j in range(len(Patterns)):shapeTable.SetValue(j,i,False)shapeTable.SetValue(r,c,True)ShapesResult.ForceRefresh()Limits = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Limits'))[1]ProfDict,Profile = G2frame.GP...
3
26
1
353
0
8,437
8,463
8,437
null
[]
None
null
0
0
0
null
0
null
The function (UpdateModelsGrid.UpdateModelsGrid.ShapesSizer.OnShapeSelect) defined within the public class called public.The function start at line 8437 and ends at 8463. It contains 26 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
UpdateModelsGrid.ShapesSizer
def ShapesSizer():#def OnPDBout(event):#data['Shapes']['pdbOut'] = not data['Shapes']['pdbOut']def OnShapeSelect(event):r,c =event.GetRow(),event.GetCol()for i in [1,2]:for j in range(len(Patterns)):shapeTable.SetValue(j,i,False)shapeTable.SetValue(r,c,True)ShapesResult.ForceRefresh()Limits = G2frame.GPXtree.GetItemPyD...
7
56
0
926
0
8,432
8,530
8,432
null
[]
None
null
0
0
0
null
0
null
The function (UpdateModelsGrid.ShapesSizer) defined within the public class called public.The function start at line 8432 and ends at 8530. It contains 56 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
UpdateModelsGrid.UpdateModelsGrid.PartSizer.OnValue
def OnValue(event):event.Skip()Obj = event.GetEventObject()item,key,sldrObj = Indx[Obj.GetId()]try:value = float(Obj.GetValue())if value <= 0.:raise ValueErrorexcept ValueError:value = item[key][0]item[key][0] = valueObj.SetValue('%.3g'%(value))if key in ['P','epis','Sticky','Depth','Width','VolFr','Dist']:sldrObj.SetV...
4
21
1
174
0
8,557
8,577
8,557
null
[]
None
null
0
0
0
null
0
null
The function (UpdateModelsGrid.UpdateModelsGrid.PartSizer.OnValue) defined within the public class called public.The function start at line 8557 and ends at 8577. It contains 21 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
UpdateModelsGrid.UpdateModelsGrid.PartSizer.OnSelect
def OnSelect(event):Obj = event.GetEventObject()item,key = Indx[Obj.GetId()]if key in ['NumPoints',]:item[key] = int(Obj.GetValue())else:item[key] = Obj.GetValue()if 'Refine' not in Obj.GetLabel():if 'FormFact' in key :item['FFargs'] = FormFactors[Obj.GetValue()]elif 'StrFact' in key:item['SFargs'] = StructureFactors[O...
5
15
1
131
0
8,579
8,593
8,579
null
[]
None
null
0
0
0
null
0
null
The function (UpdateModelsGrid.UpdateModelsGrid.PartSizer.OnSelect) defined within the public class called public.The function start at line 8579 and ends at 8593. 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
UpdateModelsGrid.UpdateModelsGrid.PartSizer.OnDelLevel
def OnDelLevel(event):Obj = event.GetEventObject()item = Indx[Obj.GetId()]del data['Particle']['Levels'][item]wx.CallAfter(UpdateModelsGrid,G2frame,data)G2sasd.ModelFxn(Profile,ProfDict,Limits,Sample,data)RefreshPlots(True)
1
7
1
61
0
8,595
8,601
8,595
null
[]
None
null
0
0
0
null
0
null
The function (UpdateModelsGrid.UpdateModelsGrid.PartSizer.OnDelLevel) defined within the public class called public.The function start at line 8595 and ends at 8601. It contains 7 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
UpdateModelsGrid.UpdateModelsGrid.PartSizer.OnParmSlider
def OnParmSlider(event):Obj = event.GetEventObject()item,key,pvObj = Indx[Obj.GetId()]slide = Obj.GetValue()if key in ['P','epis','Sticky','Depth','Width','VolFr','Dist']:value = float(slide/slMult)else:value = 10.**float(slide/slMult)item[key][0] = valuepvObj.SetValue('%.3g'%(item[key][0]))G2sasd.ModelFxn(Profile,Prof...
2
12
1
116
0
8,603
8,614
8,603
null
[]
None
null
0
0
0
null
0
null
The function (UpdateModelsGrid.UpdateModelsGrid.PartSizer.OnParmSlider) defined within the public class called public.The function start at line 8603 and ends at 8614. 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
UpdateModelsGrid.UpdateModelsGrid.PartSizer.SizeSizer
def SizeSizer():sizeSizer = wx.FlexGridSizer(0,4,5,5)sizeSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Distribution: '),0,WACV)Distchoice = ['LogNormal','Gaussian','LSW','Schulz-Zimm','Bragg','Unified','Porod','Monodisperse',]distChoice = wx.ComboBox(G2frame.dataWindow,value=level['Controls']['DistType'],choices=D...
5
47
0
742
0
8,616
8,663
8,616
null
[]
None
null
0
0
0
null
0
null
The function (UpdateModelsGrid.UpdateModelsGrid.PartSizer.SizeSizer) defined within the public class called public.The function start at line 8616 and ends at 8663. It contains 47 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
UpdateModelsGrid.UpdateModelsGrid.PartSizer.ParmSizer
def ParmSizer():parmSizer = wx.FlexGridSizer(0,3,5,5)parmSizer.AddGrowableCol(2,1)parmSizer.SetFlexibleDirection(wx.HORIZONTAL)Parms = level[level['Controls']['DistType']]FFargs = level['Controls']['FFargs']SFargs = level['Controls'].get('SFargs',{})parmOrder = ['Volume','Radius','Mean','StdDev','MinSize','G','Rg','B',...
14
74
0
829
0
8,665
8,740
8,665
null
[]
None
null
0
0
0
null
0
null
The function (UpdateModelsGrid.UpdateModelsGrid.PartSizer.ParmSizer) defined within the public class called public.The function start at line 8665 and ends at 8740. It contains 74 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
UpdateModelsGrid.PartSizer
def PartSizer():FormFactors = {'Sphere':{},'Spheroid':{'Aspect ratio':[1.0,False]},'Cylinder':{'Length':[100.,False]},'Cylinder diam':{'Diameter':[100.,False]},'Cylinder AR':{'Aspect ratio':[1.0,False]},'Unified sphere':{},'Unified rod':{'Length':[100.,False]},'Unified rod AR':{'Aspect ratio':[1.0,False]},'Unified disk...
3
63
0
926
0
8,532
8,780
8,532
null
[]
None
null
0
0
0
null
0
null
The function (UpdateModelsGrid.PartSizer) defined within the public class called public.The function start at line 8532 and ends at 8780. It contains 63 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
UpdateModelsGrid.OnEsdScale
def OnEsdScale(event):event.Skip()try:value = float(esdScale.GetValue())if value <= 0.:raise ValueErrorexcept ValueError:value = 1./np.sqrt(ProfDict['wtFactor'])ProfDict['wtFactor'] = 1./value**2esdScale.SetValue('%.3f'%(value))RefreshPlots(True)
3
11
1
72
0
8,782
8,792
8,782
null
[]
None
null
0
0
0
null
0
null
The function (UpdateModelsGrid.OnEsdScale) defined within the public class called public.The function start at line 8782 and ends at 8792. 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
UpdateModelsGrid.OnBackChange
def OnBackChange(invalid,value,tc):Profile[4][:] = valueRefreshPlots()
1
3
3
21
0
8,794
8,796
8,794
null
[]
None
null
0
0
0
null
0
null
The function (UpdateModelsGrid.OnBackChange) defined within the public class called public.The function start at line 8794 and ends at 8796. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [8794.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateModelsGrid.OnBackFile
def OnBackFile(event):#multiple backgrounds?data['BackFile'] = backFile.GetValue()if data['BackFile']:BackId = G2gd.GetGPXtreeItemId(G2frame,G2frame.root,data['BackFile'])BackSample = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,BackId, 'Sample Parameters'))Profile[5] = BackSample['Scale'][0]*G2frame.GPX...
2
9
1
107
0
8,798
8,806
8,798
null
[]
None
null
0
0
0
null
0
null
The function (UpdateModelsGrid.OnBackFile) defined within the public class called public.The function start at line 8798 and ends at 8806. 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
UpdateModelsGrid
def UpdateModelsGrid(G2frame,data):'''respond to selection of SASD Models data tree item.'''#patchesif 'Current' not in data:data['Current'] = 'Size dist.'if 'logBins' not in data['Size']:data['Size']['logBins'] = Trueif 'MinMaxDiam' in data['Size']:data['Size']['MinDiam'] = 50.data['Size']['MaxDiam'] = 10000.del data[...
20
119
2
1,376
142
7,961
8,884
7,961
null
['floor', 'maxest', 'distChoice', 'Distchoice', 'parmOrder', 'partSizer', 'ffDistChoices', 'backSizer', 'parmSldr', 'pattern', 'matSel', 'binSizer', 'StructureFactors', 'ffMonoChoices', 'parmVar', 'IModel', 'percent', 'contrast', 'Choices', 'mooreterms', 'maxdiam', 'value', 'iter', 'parmSizer', 'saveDict', 'shapeTable'...
None
null
0
0
0
null
0
null
The function (UpdateModelsGrid) defined within the public class called public.The function start at line 7961 and ends at 8884. It contains 119 lines of code and it has a cyclomatic complexity of 20. It takes 2 parameters, represented as [7961.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateREFDModelsGrid.OnCopyModel
def OnCopyModel(event):hst = G2frame.GPXtree.GetItemText(G2frame.PatternId)histList = GetHistsLikeSelected(G2frame)if not histList:G2frame.ErrorDialog('No match','No histograms match '+hst,G2frame)returncopyList = []dlg = G2G.G2MultiChoiceDialog(G2frame,'Copy reflectivity models from\n'+str(hst[5:])+' to...','Copy para...
6
19
1
150
0
8,893
8,911
8,893
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.OnCopyModel) defined within the public class called public.The function start at line 8893 and ends at 8911. It contains 19 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateREFDModelsGrid.OnFitModel
def OnFitModel(event):SaveState()G2pwd.REFDRefine(Profile,ProfDict,Inst,Limits,Substances,data)x,xr,y = G2pwd.makeSLDprofile(data,Substances)ModelPlot(data,x,xr,y)G2pwpl.PlotPatterns(G2frame,plotType='REFD')wx.CallAfter(UpdateREFDModelsGrid,G2frame,data)
1
7
1
68
0
8,913
8,920
8,913
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.OnFitModel) defined within the public class called public.The function start at line 8913 and ends at 8920. It contains 7 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
UpdateREFDModelsGrid.OnModelPlot
def OnModelPlot(event):hst = G2frame.GPXtree.GetItemText(G2frame.PatternId)histList = GetFileList(G2frame,'REFD')#histList = [hst,]#histList += GetHistsLikeSelected(G2frame)if not histList:G2frame.ErrorDialog('No match','No histograms match '+hst,G2frame)returnplotList = []od = {'label_1':'Zero at substrate','value_1':...
11
45
1
406
0
8,922
8,968
8,922
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.OnModelPlot) defined within the public class called public.The function start at line 8922 and ends at 8968. It contains 45 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
UpdateREFDModelsGrid.OnFitModelAll
def OnFitModelAll(event):choices = G2gd.GetGPXtreeDataNames(G2frame,['REFD',])od = {'label_1':'Copy to next','value_1':False,'label_2':'Reverse order','value_2':False}dlg = G2G.G2MultiChoiceDialog(G2frame, 'Sequential REFD refinement', 'Select dataset to include',choices,extraOpts=od)names = []if dlg.ShowModal() == wx....
11
60
1
563
0
8,970
9,030
8,970
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.OnFitModelAll) defined within the public class called public.The function start at line 8970 and ends at 9030. It contains 60 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
UpdateREFDModelsGrid.ModelPlot
def ModelPlot(data,x,xr,y):laySeq = data['Layer Seq'].split()nLines = len(laySeq)+1linePos = np.zeros(nLines)for ilay,lay in enumerate(np.fromstring(data['Layer Seq'],dtype=int,sep=' ')):linePos[ilay+1:] += data['Layers'][lay].get('Thick',[0.,False])[0]if data['Zero'] == 'Top':XY = [[x,y],]disLabel = r'$Distance\ from\...
3
15
4
181
0
9,032
9,046
9,032
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.ModelPlot) defined within the public class called public.The function start at line 9032 and ends at 9046. It contains 15 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [9032.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateREFDModelsGrid.OnUnDo
def OnUnDo(event):DoUnDo()data = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId,'Models'))G2frame.dataWindow.REFDUndo.Enable(False)G2pwd.REFDModelFxn(Profile,Inst,Limits,Substances,data)x,xr,y = G2pwd.makeSLDprofile(data,Substances)ModelPlot(data,x,xr,y)G2pwpl.PlotPatterns(G2frame,plotTyp...
1
10
1
99
0
9,048
9,057
9,048
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.OnUnDo) defined within the public class called public.The function start at line 9048 and ends at 9057. It contains 10 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
UpdateREFDModelsGrid.DoUnDo
def DoUnDo():print ('Undo last refinement')file = open(G2frame.undorefd,'rb')PatternId = G2frame.PatternIdG2frame.GPXtree.SetItemPyData(G2gd.GetGPXtreeItemId(G2frame,PatternId, 'Models'),pickle.load(file))print (' Model recovered')file.close()
1
7
0
56
0
9,059
9,065
9,059
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.DoUnDo) defined within the public class called public.The function start at line 9059 and ends at 9065. It contains 7 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
UpdateREFDModelsGrid.SaveState
def SaveState():G2frame.undorefd = os.path.join(G2frame.dirname,'GSASIIrefd.save')file = open(G2frame.undorefd,'wb')PatternId = G2frame.PatternIdpickle.dump(G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,PatternId,'Models')),file,1)file.close()G2frame.dataWindow.REFDUndo.Enable(True)
1
7
0
76
0
9,067
9,073
9,067
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.SaveState) defined within the public class called public.The function start at line 9067 and ends at 9073. It contains 7 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
UpdateREFDModelsGrid.UpdateREFDModelsGrid.ControlSizer.OnRefPos
def OnRefPos(event):data['Zero'] = refpos.GetValue()x,xr,y = G2pwd.makeSLDprofile(data,Substances)ModelPlot(data,x,xr,y)
1
4
1
39
0
9,077
9,080
9,077
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.UpdateREFDModelsGrid.ControlSizer.OnRefPos) defined within the public class called public.The function start at line 9077 and ends at 9080. 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
UpdateREFDModelsGrid.UpdateREFDModelsGrid.ControlSizer.OnMinSel
def OnMinSel(event):data['Minimizer'] = minSel.GetValue()
1
2
1
15
0
9,082
9,083
9,082
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.UpdateREFDModelsGrid.ControlSizer.OnMinSel) defined within the public class called public.The function start at line 9082 and ends at 9083. 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
UpdateREFDModelsGrid.UpdateREFDModelsGrid.ControlSizer.OnWeight
def OnWeight(event):data['2% weight'] = weight.GetValue()
1
2
1
15
0
9,085
9,086
9,085
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.UpdateREFDModelsGrid.ControlSizer.OnWeight) defined within the public class called public.The function start at line 9085 and ends at 9086. 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
UpdateREFDModelsGrid.UpdateREFDModelsGrid.ControlSizer.OnSLDplot
def OnSLDplot(event):x,xr,y = G2pwd.makeSLDprofile(data,Substances)ModelPlot(data,x,xr,y)
1
3
1
29
0
9,088
9,090
9,088
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.UpdateREFDModelsGrid.ControlSizer.OnSLDplot) defined within the public class called public.The function start at line 9088 and ends at 9090. 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
UpdateREFDModelsGrid.UpdateREFDModelsGrid.ControlSizer.OndQSel
def OndQSel(event):data['dQ type'] = dQSel.GetStringSelection()Recalculate()
1
3
1
18
0
9,099
9,101
9,099
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.UpdateREFDModelsGrid.ControlSizer.OndQSel) defined within the public class called public.The function start at line 9099 and ends at 9101. 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
UpdateREFDModelsGrid.UpdateREFDModelsGrid.ControlSizer.NewRes
def NewRes(invalid,value,tc):Recalculate()
1
2
3
12
0
9,103
9,104
9,103
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.UpdateREFDModelsGrid.ControlSizer.NewRes) defined within the public class called public.The function start at line 9103 and ends at 9104. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [9103.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateREFDModelsGrid.UpdateREFDModelsGrid.ControlSizer.Recalculate
def Recalculate():G2pwd.REFDModelFxn(Profile,Inst,Limits,Substances,data)x,xr,y = G2pwd.makeSLDprofile(data,Substances)ModelPlot(data,x,xr,y)G2pwpl.PlotPatterns(G2frame,plotType='REFD')
1
5
0
52
0
9,106
9,110
9,106
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.UpdateREFDModelsGrid.ControlSizer.Recalculate) defined within the public class called public.The function start at line 9106 and ends at 9110. 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
UpdateREFDModelsGrid.ControlSizer
def ControlSizer():def OnRefPos(event):data['Zero'] = refpos.GetValue()x,xr,y = G2pwd.makeSLDprofile(data,Substances)ModelPlot(data,x,xr,y)def OnMinSel(event):data['Minimizer'] = minSel.GetValue()def OnWeight(event):data['2% weight'] = weight.GetValue()def OnSLDplot(event):x,xr,y = G2pwd.makeSLDprofile(data,Substances)...
2
48
0
562
0
9,075
9,154
9,075
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.ControlSizer) defined within the public class called public.The function start at line 9075 and ends at 9154. It contains 48 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
UpdateREFDModelsGrid.UpdateREFDModelsGrid.OverallSizer.OnScaleRef
def OnScaleRef(event):data['Scale'][1] = scaleref.GetValue()
1
2
1
18
0
9,159
9,160
9,159
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.UpdateREFDModelsGrid.OverallSizer.OnScaleRef) defined within the public class called public.The function start at line 9159 and ends at 9160. 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
UpdateREFDModelsGrid.UpdateREFDModelsGrid.OverallSizer.OnBackRef
def OnBackRef(event):data['FltBack'][1] = backref.GetValue()
1
2
1
18
0
9,162
9,163
9,162
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.UpdateREFDModelsGrid.OverallSizer.OnBackRef) defined within the public class called public.The function start at line 9162 and ends at 9163. 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
UpdateREFDModelsGrid.UpdateREFDModelsGrid.OverallSizer.OnSliderMax
def OnSliderMax(event):data['slider max'] = float(slidermax.GetValue())wx.CallAfter(UpdateREFDModelsGrid,G2frame,data)
1
3
1
28
0
9,165
9,167
9,165
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.UpdateREFDModelsGrid.OverallSizer.OnSliderMax) defined within the public class called public.The function start at line 9165 and ends at 9167. 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
UpdateREFDModelsGrid.UpdateREFDModelsGrid.OverallSizer.Recalculate
def Recalculate(invalid,value,tc):if invalid:returnG2pwd.REFDModelFxn(Profile,Inst,Limits,Substances,data)x,xr,y = G2pwd.makeSLDprofile(data,Substances)ModelPlot(data,x,xr,y)G2pwpl.PlotPatterns(G2frame,plotType='REFD')
2
7
3
61
0
9,169
9,176
9,169
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.UpdateREFDModelsGrid.OverallSizer.Recalculate) defined within the public class called public.The function start at line 9169 and ends at 9176. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [9169.0] and does not return any va...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateREFDModelsGrid.OverallSizer
def OverallSizer():#'DualFitFile':'', 'DualFltBack':[0.0,False],'DualScale':[1.0,False] future for neutrons - more than one?def OnScaleRef(event):data['Scale'][1] = scaleref.GetValue()def OnBackRef(event):data['FltBack'][1] = backref.GetValue()def OnSliderMax(event):data['slider max'] = float(slidermax.GetValue())wx.Ca...
1
27
0
325
0
9,156
9,199
9,156
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.OverallSizer) defined within the public class called public.The function start at line 9156 and ends at 9199. It contains 27 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
UpdateREFDModelsGrid.UpdateREFDModelsGrid.LayerSizer.OnSelect
def OnSelect(event):Obj = event.GetEventObject()item = Indx[Obj.GetId()]Name = Obj.GetValue()data['Layers'][item]['Name'] = Nameif 'Rough' not in data['Layers'][item]:data['Layers'][item]['Rough'] = [0.,False]if 'Thick' not in data['Layers'][item]:data['Layers'][item]['Thick'] = [10.,False]if 'N' in Inst['Type'][0]:dat...
5
16
1
183
0
9,204
9,219
9,204
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.UpdateREFDModelsGrid.LayerSizer.OnSelect) defined within the public class called public.The function start at line 9204 and ends at 9219. 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
UpdateREFDModelsGrid.UpdateREFDModelsGrid.LayerSizer.OnCheckBox
def OnCheckBox(event):Obj = event.GetEventObject()item,parm = Indx[Obj.GetId()]data['Layers'][item][parm][1] = Obj.GetValue()
1
4
1
43
0
9,221
9,224
9,221
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.UpdateREFDModelsGrid.LayerSizer.OnCheckBox) defined within the public class called public.The function start at line 9221 and ends at 9224. 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
UpdateREFDModelsGrid.UpdateREFDModelsGrid.LayerSizer.OnInsertLayer
def OnInsertLayer(event):Obj = event.GetEventObject()ind = Indx[Obj.GetId()]data['Layers'].insert(ind+1,{'Name':'vacuum','DenMul':[1.0,False],})data['Layer Seq'] = ' '.join([str(i+1) for i in range(len(data['Layers'])-2)])G2pwd.REFDModelFxn(Profile,Inst,Limits,Substances,data)G2pwpl.PlotPatterns(G2frame,plotType='REFD'...
2
8
1
117
0
9,226
9,233
9,226
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.UpdateREFDModelsGrid.LayerSizer.OnInsertLayer) defined within the public class called public.The function start at line 9226 and ends at 9233. 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
UpdateREFDModelsGrid.UpdateREFDModelsGrid.LayerSizer.OnDeleteLayer
def OnDeleteLayer(event):Obj = event.GetEventObject()ind = Indx[Obj.GetId()]del data['Layers'][ind]data['Layer Seq'] = ' '.join([str(i+1) for i in range(len(data['Layers'])-2)])G2pwd.REFDModelFxn(Profile,Inst,Limits,Substances,data)G2pwpl.PlotPatterns(G2frame,plotType='REFD')wx.CallAfter(UpdateREFDModelsGrid,G2frame,da...
2
8
1
97
0
9,235
9,242
9,235
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.UpdateREFDModelsGrid.LayerSizer.OnDeleteLayer) defined within the public class called public.The function start at line 9235 and ends at 9242. 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
UpdateREFDModelsGrid.UpdateREFDModelsGrid.LayerSizer.Recalculate
def Recalculate(invalid,value,tc):if invalid:returnif tc and tc.GetId() in Indx:#sets sliderIndx[tc.GetId()].SetValue(value)G2pwd.REFDModelFxn(Profile,Inst,Limits,Substances,data)x,xr,y = G2pwd.makeSLDprofile(data,Substances)ModelPlot(data,x,xr,y)G2pwpl.PlotPatterns(G2frame,plotType='REFD')
4
9
3
85
0
9,244
9,252
9,244
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.UpdateREFDModelsGrid.LayerSizer.Recalculate) defined within the public class called public.The function start at line 9244 and ends at 9252. It contains 9 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [9244.0] and does not return any valu...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateREFDModelsGrid.UpdateREFDModelsGrid.LayerSizer.OnMoveParm
def OnMoveParm(event):Obj = event.GetEventObject()ilay,parm,parmObj = Indx[Obj.GetId()]move = Obj.GetValue()# +1 or -1Obj.SetValue(0)data['Layers'][ilay][parm][0] += moveparmObj.SetValue(data['Layers'][ilay][parm][0])Recalculate(False,1.0,None)
1
8
1
82
0
9,254
9,261
9,254
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.UpdateREFDModelsGrid.LayerSizer.OnMoveParm) defined within the public class called public.The function start at line 9254 and ends at 9261. It contains 8 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
UpdateREFDModelsGrid.UpdateREFDModelsGrid.LayerSizer.OnParmSlider
def OnParmSlider(event):Obj = event.GetEventObject()ilay,parmObj = Indx[Obj.GetId()]value = Obj.GetValue()data['Layers'][ilay]['Thick'][0] = valueparmObj.SetValue(data['Layers'][ilay]['Thick'][0])Recalculate(False,1.0,None)
1
7
1
74
0
9,263
9,269
9,263
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.UpdateREFDModelsGrid.LayerSizer.OnParmSlider) defined within the public class called public.The function start at line 9263 and ends at 9269. It contains 7 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
UpdateREFDModelsGrid.LayerSizer
def LayerSizer():#'Penetration':[0.,False]?def OnSelect(event):Obj = event.GetEventObject()item = Indx[Obj.GetId()]Name = Obj.GetValue()data['Layers'][item]['Name'] = Nameif 'Rough' not in data['Layers'][item]:data['Layers'][item]['Rough'] = [0.,False]if 'Thick' not in data['Layers'][item]:data['Layers'][item]['Thick']...
17
130
0
1,617
0
9,201
9,394
9,201
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.LayerSizer) defined within the public class called public.The function start at line 9201 and ends at 9394. It contains 130 lines of code and it has a cyclomatic complexity of 17. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateREFDModelsGrid.OnRepSeq
def OnRepSeq(event):event.Skip()stack = repseq.GetValue()nstar = stack.count('*')if nstar:try:newstack = ''Istar = 0for star in range(nstar):Istar = stack.index('*',Istar+1)iB = stack[:Istar].rfind(' ')if iB == -1:mult = int(stack[:Istar])else:mult = int(stack[iB:Istar])pattern = stack[Istar+2:stack.index(')',Istar)]+'...
11
48
1
358
0
9,396
9,443
9,396
null
[]
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid.OnRepSeq) defined within the public class called public.The function start at line 9396 and ends at 9443. It contains 48 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
UpdateREFDModelsGrid
def UpdateREFDModelsGrid(G2frame,data):'''respond to selection of REFD Models data tree item.'''def OnCopyModel(event):hst = G2frame.GPXtree.GetItemText(G2frame.PatternId)histList = GetHistsLikeSelected(G2frame)if not histList:G2frame.ErrorDialog('No match','No histograms match '+hst,G2frame)returncopyList = []dlg = G2...
7
63
2
695
87
8,890
9,496
8,890
null
['delet', 'minlist', 'Nlayers', 'parmSldr', 'pattern', 'Stest', 'plotList', 'backref', 'Inst', 'IModel', 'parms', 'insert', 'LinePos', 'linePos', 'midlayer', 'realScatt', 'value', 'mId', 'Name', 'mult', 'refpos', 'Obj', 'Substances', 'copyList', 'parent', 'dlg', 'GoOn', 'minimiz', 'minSel', 'repseq', 'Indx', 'file', 'i...
None
null
0
0
0
null
0
null
The function (UpdateREFDModelsGrid) defined within the public class called public.The function start at line 8890 and ends at 9496. It contains 63 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [8890.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
computePDF
def computePDF(G2frame,data):'''Calls :func:`GSASIIpwd.CalcPDF` to compute the PDF and put into the data tree array.Called from OnComputePDF and OnComputeAllPDF and OnComputeAllPDF inGSASIIimgGUI.py'''xydata = {}problem = Falsefor key in ['Sample','Sample Bkg.','Container','Container Bkg.']:name = data[key]['Name']if n...
6
29
2
243
9
9,502
9,535
9,502
null
['xydata', 'limits', 'pId', 'auxPlot', 'problem', 'Xlimits', 'name', 'inst', 'powId']
None
null
0
0
0
null
0
null
The function (computePDF) defined within the public class called public.The function start at line 9502 and ends at 9535. It contains 29 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [9502.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
OptimizePDF
def OptimizePDF(G2frame,data,showFit=True,maxCycles=5):'''Optimize the PDF to minimize the difference between G(r) and the expected value forlow r (-4 pi r #density).'''xydata = {}for key in ['Sample','Sample Bkg.','Container','Container Bkg.']:name = data[key]['Name']if name:xydata[key] = G2frame.GPXtree.GetItemPyData...
3
13
4
175
8
9,537
9,552
9,537
null
['xydata', 'limits', 'res', 'powName', 'Xlimits', 'name', 'inst', 'powId']
None
null
0
0
0
null
0
null
The function (OptimizePDF) defined within the public class called public.The function start at line 9537 and ends at 9552. It contains 13 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [9537.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.FillFileSizer.OnSelectFile
def OnSelectFile(event):Obj = event.GetEventObject()fileKey,itemKey,fmt = itemDict[Obj.GetId()]if itemKey == 'Name':value = Obj.GetValue()Obj.SetValue(fmt%(value))data[fileKey][itemKey] = valuedata[fileKey]['Mult'] = GetExposure(value)mult.SetValue(data[fileKey]['Mult'])ResetFlatBkg()wx.CallAfter(OnComputePDF,None)
2
11
1
92
0
9,563
9,573
9,563
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.FillFileSizer.OnSelectFile) defined within the public class called public.The function start at line 9563 and ends at 9573. It contains 11 lines of code and it has a cyclomatic complexity of 2. The function does not take any...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.FillFileSizer.OnMoveMult
def OnMoveMult(event):data[key]['Mult'] += multSpin.GetValue()*0.01mult.SetValue(data[key]['Mult'])multSpin.SetValue(0)wx.CallAfter(OnComputePDF,None)
1
5
1
48
0
9,575
9,579
9,575
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.FillFileSizer.OnMoveMult) defined within the public class called public.The function start at line 9575 and ends at 9579. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any pa...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.FillFileSizer.OnMult
def OnMult(invalid,value,tc):if invalid: returnResetFlatBkg()wx.CallAfter(OnComputePDF,None)
2
4
3
24
0
9,581
9,584
9,581
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.FillFileSizer.OnMult) defined within the public class called public.The function start at line 9581 and ends at 9584. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.FillFileSizer.OnRefMult
def OnRefMult(event):item['Refine'] = refMult.GetValue()if item['Refine']:G2frame.GetStatusBar().SetStatusText('Be sure Mult is close to anticipated value. '+ \'Suggest setting Flat Bkg. to 0 before Optimize Mult',1)
2
5
1
36
0
9,586
9,590
9,586
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.FillFileSizer.OnRefMult) defined within the public class called public.The function start at line 9586 and ends at 9590. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any par...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.FillFileSizer.GetExposure
def GetExposure(backFile):dataId = G2gd.GetGPXtreeItemId(G2frame,G2frame.root,'PWDR'+dataFile[4:])dataComments = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,dataId,'Comments'))if not backFile:return -1.backId = G2gd.GetGPXtreeItemId(G2frame,G2frame.root,backFile)backComments = G2frame.GPXtree.GetItemPyD...
8
24
1
202
0
9,592
9,615
9,592
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.FillFileSizer.GetExposure) defined within the public class called public.The function start at line 9592 and ends at 9615. It contains 24 lines of code and it has a cyclomatic complexity of 8. The function does not take any ...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.FillFileSizer
def FillFileSizer(fileSizer,key):#fileSizer is a FlexGridSizer(3,4)def OnSelectFile(event):Obj = event.GetEventObject()fileKey,itemKey,fmt = itemDict[Obj.GetId()]if itemKey == 'Name':value = Obj.GetValue()Obj.SetValue(fmt%(value))data[fileKey][itemKey] = valuedata[fileKey]['Mult'] = GetExposure(value)mult.SetValue(data...
4
32
2
345
0
9,560
9,642
9,560
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.FillFileSizer) defined within the public class called public.The function start at line 9560 and ends at 9642. It contains 32 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [9560.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.ResetFlatBkg
def ResetFlatBkg():Smin = np.min(G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.root,'PWDR'+dataFile[4:]))[1][1])Bmin = 0; Cmin = 0.; Cmul = 0.; CBmin = 0.if data['Sample Bkg.']['Name']:Bmin = np.min(G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.root,data['Sample Bkg.']['Name'...
4
19
0
259
0
9,644
9,662
9,644
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.PDFFileSizer.ResetFlatBkg) defined within the public class called public.The function start at line 9644 and ends at 9662. It contains 19 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePDFGrid.PDFFileSizer
def PDFFileSizer():def FillFileSizer(fileSizer,key):#fileSizer is a FlexGridSizer(3,4)def OnSelectFile(event):Obj = event.GetEventObject()fileKey,itemKey,fmt = itemDict[Obj.GetId()]if itemKey == 'Name':value = Obj.GetValue()Obj.SetValue(fmt%(value))data[fileKey][itemKey] = valuedata[fileKey]['Mult'] = GetExposure(value...
4
18
0
169
0
9,558
9,678
9,558
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.PDFFileSizer) defined within the public class called public.The function start at line 9558 and ends at 9678. 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
UpdatePDFGrid.UpdatePDFGrid.SampleSizer.UpdatePDFGrid.UpdatePDFGrid.SampleSizer.FillElemSizer.OnElemNum
def OnElemNum(invalid,value,tc):if invalid: returndata['Form Vol'] = max(10.0,SumElementVolumes())wx.CallAfter(UpdatePDFGrid,G2frame,data)wx.CallAfter(OnComputePDF,tc.event)
2
5
3
48
0
9,684
9,688
9,684
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.SampleSizer.UpdatePDFGrid.UpdatePDFGrid.SampleSizer.FillElemSizer.OnElemNum) defined within the public class called public.The function start at line 9684 and ends at 9688. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented a...
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePDFGrid.UpdatePDFGrid.SampleSizer.FillElemSizer
def FillElemSizer(elemSizer,ElData):def OnElemNum(invalid,value,tc):if invalid: returndata['Form Vol'] = max(10.0,SumElementVolumes())wx.CallAfter(UpdatePDFGrid,G2frame,data)wx.CallAfter(OnComputePDF,tc.event)elemSizer.Add(wx.StaticText(parent=G2frame.dataWindow,label=' Element: '+'%2s'%(ElData['Symbol'])+' * '),0,WACV...
1
10
2
137
0
9,682
9,697
9,682
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.SampleSizer.FillElemSizer) defined within the public class called public.The function start at line 9682 and ends at 9697. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [9682.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePDFGrid.UpdatePDFGrid.SampleSizer.AfterChange
def AfterChange(invalid,value,tc):if invalid: returnwx.CallAfter(UpdatePDFGrid,G2frame,data)wx.CallAfter(OnComputePDF,tc.event)
2
4
3
33
0
9,699
9,702
9,699
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.SampleSizer.AfterChange) defined within the public class called public.The function start at line 9699 and ends at 9702. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [9699.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePDFGrid.UpdatePDFGrid.SampleSizer.OnGeometry
def OnGeometry(event):data['Geometry'] = geometry.GetValue()wx.CallAfter(UpdatePDFGrid,G2frame,data)#UpdatePDFGrid(G2frame,data)wx.CallAfter(OnComputePDF,event)
1
4
1
33
0
9,704
9,708
9,704
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.SampleSizer.OnGeometry) defined within the public class called public.The function start at line 9704 and ends at 9708. 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
UpdatePDFGrid.SampleSizer
def SampleSizer():def FillElemSizer(elemSizer,ElData):def OnElemNum(invalid,value,tc):if invalid: returndata['Form Vol'] = max(10.0,SumElementVolumes())wx.CallAfter(UpdatePDFGrid,G2frame,data)wx.CallAfter(OnComputePDF,tc.event)elemSizer.Add(wx.StaticText(parent=G2frame.dataWindow,label=' Element: '+'%2s'%(ElData['Symbo...
4
51
0
595
0
9,680
9,756
9,680
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.SampleSizer) defined within the public class called public.The function start at line 9680 and ends at 9756. It contains 51 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
UpdatePDFGrid.UpdatePDFGrid.SFGctrlSizer.OnOptimizePDF
def OnOptimizePDF(event):'''Optimize Flat Bkg, BackRatio & Ruland corrections to remove spurious"intensity" from portion of G(r) with r<Rmin.Invoked by Optimize PDF button and from menu command.'''if not data['ElList']:G2frame.ErrorDialog('PDF error','Chemical formula not defined')returnG2frame.GetStatusBar().SetStatus...
3
13
1
76
0
9,760
9,776
9,760
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.SFGctrlSizer.OnOptimizePDF) defined within the public class called public.The function start at line 9760 and ends at 9776. It contains 13 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePDFGrid.UpdatePDFGrid.SFGctrlSizer.AfterChangeNoRefresh
def AfterChangeNoRefresh(invalid,value,tc):if invalid: returnif tc.GetId() in Indx:Indx[tc.GetId()][0].SetValue(int(value*Indx[tc.GetId()][1]))wx.CallAfter(OnComputePDF,None)
3
5
3
61
0
9,778
9,782
9,778
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.SFGctrlSizer.AfterChangeNoRefresh) defined within the public class called public.The function start at line 9778 and ends at 9782. It contains 5 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [9778.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePDFGrid.UpdatePDFGrid.SFGctrlSizer.OnDetType
def OnDetType(event):#TODO: to be removeddata['DetType'] = detType.GetValue()wx.CallAfter(UpdatePDFGrid,G2frame,data)wx.CallAfter(OnComputePDF,None)
1
4
1
33
0
9,784
9,788
9,784
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.SFGctrlSizer.OnDetType) defined within the public class called public.The function start at line 9784 and ends at 9788. 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
UpdatePDFGrid.UpdatePDFGrid.SFGctrlSizer.OnFlatSpin
def OnFlatSpin(event):data['Flat Bkg'] += flatSpin.GetValue()*0.01*data['IofQmin']G2frame.flatBkg.ChangeValue(data['Flat Bkg'])flatSpin.SetValue(0)wx.CallAfter(OnComputePDF,None)
1
5
1
49
0
9,790
9,794
9,790
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.SFGctrlSizer.OnFlatSpin) defined within the public class called public.The function start at line 9790 and ends at 9794. 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
UpdatePDFGrid.UpdatePDFGrid.SFGctrlSizer.OnBackSlider
def OnBackSlider(event):value = int(backSldr.GetValue())/100.data['BackRatio'] = valuebackVal.ChangeValue(data['BackRatio'])wx.CallAfter(OnComputePDF,None)
1
5
1
41
0
9,796
9,800
9,796
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.SFGctrlSizer.OnBackSlider) defined within the public class called public.The function start at line 9796 and ends at 9800. 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
UpdatePDFGrid.UpdatePDFGrid.SFGctrlSizer.OnRulSlider
def OnRulSlider(event):value = int(rulandSldr.GetValue())/100.data['Ruland'] = max(0.001,value)rulandWdt.ChangeValue(data['Ruland'])wx.CallAfter(OnComputePDF,None)
1
5
1
48
0
9,802
9,806
9,802
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.SFGctrlSizer.OnRulSlider) defined within the public class called public.The function start at line 9802 and ends at 9806. 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
UpdatePDFGrid.UpdatePDFGrid.SFGctrlSizer.OnGRscaleSlider
def OnGRscaleSlider(event):value = int(gscaleSldr.GetValue())/50.data['GR Scale'] = max(0.1,min(2.,value))gscale.ChangeValue(data['GR Scale'])wx.CallAfter(OnComputePDF,None)
1
5
1
54
0
9,808
9,812
9,808
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.SFGctrlSizer.OnGRscaleSlider) defined within the public class called public.The function start at line 9808 and ends at 9812. 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
UpdatePDFGrid.UpdatePDFGrid.SFGctrlSizer.NewQmax
def NewQmax(invalid,value,tc):if invalid: returndata['QScaleLim'][0] = 0.9*valueSQmin.ChangeValue(data['QScaleLim'][0])wx.CallAfter(OnComputePDF,None)
2
5
3
46
0
9,814
9,818
9,814
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.SFGctrlSizer.NewQmax) defined within the public class called public.The function start at line 9814 and ends at 9818. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [9814.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePDFGrid.UpdatePDFGrid.SFGctrlSizer.OnResetQ
def OnResetQ(event):data['QScaleLim'][1] = qLimits[1]SQmax.ChangeValue(data['QScaleLim'][1])data['QScaleLim'][0] = 0.9*qLimits[1]SQmin.ChangeValue(data['QScaleLim'][0])wx.CallAfter(OnComputePDF,None)
1
6
1
65
0
9,820
9,825
9,820
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.SFGctrlSizer.OnResetQ) defined within the public class called public.The function start at line 9820 and ends at 9825. 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
UpdatePDFGrid.UpdatePDFGrid.SFGctrlSizer.OnLorch
def OnLorch(event):data['Lorch'] = lorch.GetValue()wx.CallAfter(OnComputePDF,None)
1
3
1
23
0
9,827
9,829
9,827
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.SFGctrlSizer.OnLorch) defined within the public class called public.The function start at line 9827 and ends at 9829. 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
UpdatePDFGrid.UpdatePDFGrid.SFGctrlSizer.OnNoRing
def OnNoRing(event):data['noRing'] = not data['noRing']wx.CallAfter(OnComputePDF,None)
1
3
1
23
0
9,831
9,833
9,831
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.SFGctrlSizer.OnNoRing) defined within the public class called public.The function start at line 9831 and ends at 9833. 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
UpdatePDFGrid.SFGctrlSizer
def SFGctrlSizer():def OnOptimizePDF(event):'''Optimize Flat Bkg, BackRatio & Ruland corrections to remove spurious"intensity" from portion of G(r) with r<Rmin.Invoked by Optimize PDF button and from menu command.'''if not data['ElList']:G2frame.ErrorDialog('PDF error','Chemical formula not defined')returnG2frame.GetSt...
5
112
0
1,468
0
9,758
9,941
9,758
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.SFGctrlSizer) defined within the public class called public.The function start at line 9758 and ends at 9941. It contains 112 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
UpdatePDFGrid.UpdatePDFGrid.DiffSizer.OnSelectGR
def OnSelectGR(event):newName = grName.GetValue()if newName:data['delt-G(R)'] = copy.deepcopy(data['G(R)'])Id = G2gd.GetGPXtreeItemId(G2frame,G2frame.root,newName)pId = G2gd.GetGPXtreeItemId(G2frame,Id,'PDF Controls')subData = G2frame.GPXtree.GetItemPyData(pId)['G(R)']if subData[1][0][-1] != data['G(R)'][1][0][-1]:G2fr...
3
16
1
207
0
9,945
9,960
9,945
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.DiffSizer.OnSelectGR) defined within the public class called public.The function start at line 9945 and ends at 9960. It contains 16 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePDFGrid.UpdatePDFGrid.DiffSizer.OnMult
def OnMult(invalid,value,tc):if invalid: returnId = G2gd.GetGPXtreeItemId(G2frame,G2frame.root,data['diffGRname'])if Id == 0: returnpId = G2gd.GetGPXtreeItemId(G2frame,Id,'PDF Controls')if pId == 0: returnsubData = G2frame.GPXtree.GetItemPyData(pId)['G(R)']data['delt-G(R)'][1] = np.array([subData[1][0],data['G(R)'][1][...
4
9
3
129
0
9,962
9,970
9,962
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.UpdatePDFGrid.DiffSizer.OnMult) defined within the public class called public.The function start at line 9962 and ends at 9970. It contains 9 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [9962.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePDFGrid.DiffSizer
def DiffSizer():def OnSelectGR(event):newName = grName.GetValue()if newName:data['delt-G(R)'] = copy.deepcopy(data['G(R)'])Id = G2gd.GetGPXtreeItemId(G2frame,G2frame.root,newName)pId = G2gd.GetGPXtreeItemId(G2frame,Id,'PDF Controls')subData = G2frame.GPXtree.GetItemPyData(pId)['G(R)']if subData[1][0][-1] != data['G(R)'...
2
17
0
179
0
9,943
9,985
9,943
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.DiffSizer) defined within the public class called public.The function start at line 9943 and ends at 9985. It contains 17 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
UpdatePDFGrid.SumElementVolumes
def SumElementVolumes():sumVol = 0.ElList = data['ElList']for El in ElList:Avol = (4.*math.pi/3.)*ElList[El]['Drad']**3sumVol += Avol*ElList[El]['FormulaNo']return sumVolwx.CallAfter(OnComputePDF,None)
2
8
0
63
0
9,987
9,994
9,987
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.SumElementVolumes) defined within the public class called public.The function start at line 9987 and ends at 9994. 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
UpdatePDFGrid.OnCopyPDFControls
def OnCopyPDFControls(event):TextList = GetFileList(G2frame,'PDF')Source = G2frame.GPXtree.GetItemText(G2frame.PatternId)if len(TextList) == 1:G2frame.ErrorDialog('Nothing to copy controls to','There must be more than one "PDF" pattern')returnod = {'label_1':'Only refine flag','value_1':False,'label_2':'Only Lorch flag...
8
26
1
249
0
9,996
10,021
9,996
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.OnCopyPDFControls) defined within the public class called public.The function start at line 9996 and ends at 10021. It contains 26 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
UpdatePDFGrid.OnSavePDFControls
def OnSavePDFControls(event):pth = G2G.GetExportPath(G2frame)dlg = wx.FileDialog(G2frame, 'Choose GSAS-II PDF controls file', pth, '','PDF controls files (*.pdfprm)|*.pdfprm',wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)try:if dlg.ShowModal() == wx.ID_OK:filename = dlg.GetPath()# make sure extension is .pdfprmfilename = os.path.s...
5
17
1
143
0
10,023
10,040
10,023
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.OnSavePDFControls) defined within the public class called public.The function start at line 10023 and ends at 10040. It contains 17 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
UpdatePDFGrid.OnLoadPDFControls
def OnLoadPDFControls(event):pth = G2G.GetExportPath(G2frame)dlg = wx.FileDialog(G2frame, 'Choose GSAS-II PDF controls file', pth, '','PDF controls files (*.pdfprm)|*.pdfprm',wx.FD_OPEN)try:if dlg.ShowModal() == wx.ID_OK:filename = dlg.GetPath()File = open(filename,'r')newdata = {}S = File.readline()while S:if '#' in S...
6
26
1
162
0
10,042
10,068
10,042
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.OnLoadPDFControls) defined within the public class called public.The function start at line 10042 and ends at 10068. It contains 26 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
UpdatePDFGrid.OnAddElement
def OnAddElement(event):ElList = data['ElList']choice = list(ElList.keys())PE = G2elemGUI.PickElements(G2frame,choice)if PE.ShowModal() == wx.ID_OK:for El in PE.Elem:if El not in ElList:try:data['ElList'][El] = copy.deepcopy(G2elem.GetElInfo(El,inst))data['ElList'][El]['FormulaNo'] = 1.0except IndexError: # happens wit...
5
15
1
126
0
10,070
10,084
10,070
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.OnAddElement) defined within the public class called public.The function start at line 10070 and ends at 10084. 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
UpdatePDFGrid.OnDeleteElement
def OnDeleteElement(event):ElList = data['ElList']choice = list(ElList.keys())dlg = G2elemGUI.DeleteElement(G2frame,choice=choice)if dlg.ShowModal() == wx.ID_OK:del ElList[dlg.GetDeleteElement()]dlg.Destroy()wx.CallAfter(UpdatePDFGrid,G2frame,data)
2
8
1
68
0
10,086
10,093
10,086
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.OnDeleteElement) defined within the public class called public.The function start at line 10086 and ends at 10093. 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
UpdatePDFGrid.OnComputePDF
def OnComputePDF(event):'''Compute and plot PDF, in response to a menu command or a change to acomputation parameter.'''if not data['ElList']:G2frame.ErrorDialog('PDF error','Chemical formula not defined')OnAddElement(event)auxPlot = computePDF(G2frame,data)if auxPlot is None: returnG2frame.GetStatusBar().SetStatusText...
5
18
1
186
0
10,095
10,115
10,095
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.OnComputePDF) defined within the public class called public.The function start at line 10095 and ends at 10115. It contains 18 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
UpdatePDFGrid.OnComputeAllPDF
def OnComputeAllPDF(event):print('Calculating PDFs...')choices = []if G2frame.GPXtree.GetCount():Id, cookie = G2frame.GPXtree.GetFirstChild(G2frame.root)while Id:Name = G2frame.GPXtree.GetItemText(Id)if Name.startswith('PDF '):Data = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,Id,'PDF Controls'))if not ...
16
67
1
541
0
10,117
10,184
10,117
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid.OnComputeAllPDF) defined within the public class called public.The function start at line 10117 and ends at 10184. It contains 67 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
UpdatePDFGrid
def UpdatePDFGrid(G2frame,data):'''respond to selection of PWDR PDF data tree item.'''def PDFFileSizer():def FillFileSizer(fileSizer,key):#fileSizer is a FlexGridSizer(3,4)def OnSelectFile(event):Obj = event.GetEventObject()fileKey,itemKey,fmt = itemDict[Obj.GetId()]if itemKey == 'Name':value = Obj.GetValue()Obj.SetVal...
17
86
2
783
105
9,554
10,262
9,554
null
['formVol', 'pId', 'resetQ', 'notConverged', 'expTime', 'msg', 'backId', 'num', 'dataComments', 'dataExp', 'optB', 'olddata', 'S', 'pack', 'rulandSldr', 'auxPlot', 'value', 'CBmin', 'PDFlist', 'SQmax', 'Name', 'mult', 'gscaleBox', 'Abs', 'Obj', 'sfgSizer', 'detType', 'File', 'itemDict', 'Source', 'midSizer', 'backVal',...
None
null
0
0
0
null
0
null
The function (UpdatePDFGrid) defined within the public class called public.The function start at line 9554 and ends at 10262. It contains 86 lines of code and it has a cyclomatic complexity of 17. It takes 2 parameters, represented as [9554.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePDFPeaks.UpdatePDFPeaks.limitSizer.NewLim
def NewLim(invalid,value,tc):if invalid:returnG2plt.PlotISFG(G2frame,data,newPlot=False,plotType='G(R)',peaks=peaks)
2
4
3
33
0
10,271
10,274
10,271
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFPeaks.UpdatePDFPeaks.limitSizer.NewLim) defined within the public class called public.The function start at line 10271 and ends at 10274. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [10271.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePDFPeaks.limitSizer
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(G2frame.dataWindow,peaks['Limits'],0,nDig=(1...
1
11
0
150
0
10,269
10,284
10,269
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFPeaks.limitSizer) defined within the public class called public.The function start at line 10269 and ends at 10284. It contains 11 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
UpdatePDFPeaks.UpdatePDFPeaks.backSizer.NewBack
def NewBack(invalid,value,tc):if invalid:returnG2plt.PlotISFG(G2frame,data,newPlot=False,plotType='G(R)',peaks=peaks)
2
4
3
33
0
10,288
10,291
10,288
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFPeaks.UpdatePDFPeaks.backSizer.NewBack) defined within the public class called public.The function start at line 10288 and ends at 10291. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [10288.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePDFPeaks.UpdatePDFPeaks.backSizer.OnRefBack
def OnRefBack(event):peaks['Background'][2] = refbk.GetValue()
1
2
1
18
0
10,293
10,294
10,293
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFPeaks.UpdatePDFPeaks.backSizer.OnRefBack) defined within the public class called public.The function start at line 10293 and ends at 10294. 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
UpdatePDFPeaks.backSizer
def backSizer():def NewBack(invalid,value,tc):if invalid:returnG2plt.PlotISFG(G2frame,data,newPlot=False,plotType='G(R)',peaks=peaks)def OnRefBack(event):peaks['Background'][2] = refbk.GetValue()backBox = wx.BoxSizer(wx.HORIZONTAL)backBox.Add(wx.StaticText(G2frame.dataWindow,label=' Background slope: '),0,WACV)slope = ...
1
13
0
150
0
10,286
10,305
10,286
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFPeaks.backSizer) defined within the public class called public.The function start at line 10286 and ends at 10305. It contains 13 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
UpdatePDFPeaks.UpdatePDFPeaks.peakSizer.PeaksRefine
def PeaksRefine(event):c =event.GetCol()if PDFPeaks.GetColLabelValue(c) == 'refine':choice = ['P - position','M - magnitude','S - standrd deviation']dlg = wx.MultiChoiceDialog(G2frame,'Select','Refinement controls',choice)if dlg.ShowModal() == wx.ID_OK:sel = dlg.GetSelections()parms = ''for x in sel:parms += choice[x][...
5
14
1
111
0
10,309
10,322
10,309
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFPeaks.UpdatePDFPeaks.peakSizer.PeaksRefine) defined within the public class called public.The function start at line 10309 and ends at 10322. 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
UpdatePDFPeaks.UpdatePDFPeaks.peakSizer.ElTypeSelect
def ElTypeSelect(event):r,c =event.GetRow(),event.GetCol()if 'Atom' in PDFPeaks.GetColLabelValue(c):PE = G2elemGUI.PickElement(G2frame)if PE.ShowModal() == wx.ID_OK:el = PE.Elem.strip()peaks['Peaks'][r][c] = elPDFPeaks.SetCellValue(r,c,el)PE.Destroy()
3
9
1
85
0
10,324
10,332
10,324
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFPeaks.UpdatePDFPeaks.peakSizer.ElTypeSelect) defined within the public class called public.The function start at line 10324 and ends at 10332. 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
UpdatePDFPeaks.peakSizer
def peakSizer():def PeaksRefine(event):c =event.GetCol()if PDFPeaks.GetColLabelValue(c) == 'refine':choice = ['P - position','M - magnitude','S - standrd deviation']dlg = wx.MultiChoiceDialog(G2frame,'Select','Refinement controls',choice)if dlg.ShowModal() == wx.ID_OK:sel = dlg.GetSelections()parms = ''for x in sel:par...
2
18
0
198
0
10,307
10,350
10,307
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFPeaks.peakSizer) defined within the public class called public.The function start at line 10307 and ends at 10350. It contains 18 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePDFPeaks.OnCopyPDFPeaks
def OnCopyPDFPeaks(event):TextList = GetFileList(G2frame,'PDF')Source = G2frame.GPXtree.GetItemText(G2frame.PatternId)if len(TextList) == 1:G2frame.ErrorDialog('Nothing to copy PDF peaks to','There must be more than one "PDF" pattern')returnod = {'label_1':'Only refine flags','value_1':False}dlg = G2G.G2MultiChoiceDial...
8
24
1
242
0
10,352
10,375
10,352
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFPeaks.OnCopyPDFPeaks) defined within the public class called public.The function start at line 10352 and ends at 10375. It contains 24 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
UpdatePDFPeaks.OnFitPDFpeaks
def OnFitPDFpeaks(event):PatternId = G2frame.PatternIddata = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,PatternId, 'PDF Controls'))peaks = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,PatternId, 'PDF Peaks'))if not peaks:G2frame.ErrorDialog('No peaks!','Nothing to fit!')returnnewpeaks = ...
2
12
1
128
0
10,377
10,388
10,377
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFPeaks.OnFitPDFpeaks) defined within the public class called public.The function start at line 10377 and ends at 10388. 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
UpdatePDFPeaks.OnFitAllPDFpeaks
def OnFitAllPDFpeaks(event):Names = G2gd.GetGPXtreeDataNames(G2frame,['PDF ',])od = {'label_1':'Copy to next','value_1':False,'label_2':'Reverse order','value_2':False}dlg = G2G.G2MultiChoiceDialog(G2frame,'PDF peak fitting','Select PDFs to fit:',Names,extraOpts=od)try:if dlg.ShowModal() == wx.ID_OK:Id =G2gd.GetGPXtree...
9
44
1
406
0
10,390
10,433
10,390
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFPeaks.OnFitAllPDFpeaks) defined within the public class called public.The function start at line 10390 and ends at 10433. It contains 44 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
UpdatePDFPeaks.OnClearPDFpeaks
def OnClearPDFpeaks(event):peaks['Peaks'] = []G2plt.PlotISFG(G2frame,data,peaks=peaks,newPlot=False)wx.CallAfter(UpdatePDFPeaks,G2frame,peaks,data)
1
4
1
40
0
10,435
10,438
10,435
null
[]
None
null
0
0
0
null
0
null
The function (UpdatePDFPeaks.OnClearPDFpeaks) defined within the public class called public.The function start at line 10435 and ends at 10438. 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..