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
UpdateMasks.OnNewPolyMask
def OnNewPolyMask(event):'Start a new polygon mask'G2frame.MaskKey = 'p'G2plt.OnStartMask(G2frame)
1
4
1
17
0
2,202
2,205
2,202
null
[]
None
null
0
0
0
null
0
null
The function (UpdateMasks.OnNewPolyMask) defined within the public class called public.The function start at line 2202 and ends at 2205. 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
UpdateMasks.OnNewFrameMask
def OnNewFrameMask(event):'Start a new Frame mask'G2frame.MaskKey = 'f'G2plt.OnStartMask(G2frame)
1
4
1
17
0
2,207
2,210
2,207
null
[]
None
null
0
0
0
null
0
null
The function (UpdateMasks.OnNewFrameMask) defined within the public class called public.The function start at line 2207 and ends at 2210. 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
UpdateMasks.UpdateMasks.MaxSizer.OnNewVal
def OnNewVal(invalid,value,tc):'''Called when a Imax or Imin value is typed into a Validated TextCrtl (which putsthe value into the data['range'] nested list).This adjusts the slider positions to match the current values'''scaleSel.SetSelection(len(scaleChoices)-1)r11 = min(max(Range[1][1],Range[1][0]+1),Range[0][1]) #...
4
23
3
411
0
2,216
2,242
2,216
null
[]
None
null
0
0
0
null
0
null
The function (UpdateMasks.UpdateMasks.MaxSizer.OnNewVal) defined within the public class called public.The function start at line 2216 and ends at 2242. It contains 23 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [2216.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateMasks.UpdateMasks.MaxSizer.OnMaxSlider
def OnMaxSlider(event):val = maxSel.GetValue()if G2frame.prevMaxValue == val: return # if this val has been processed, no need to repeatscaleSel.SetSelection(len(scaleChoices)-1)G2frame.prevMaxValue = valsqrtDeltZero = math.sqrt(max(1.0,Range[0][1]-max(0.0,Range[1][0])-1)) # sqrt(Imax0-Imin-1)Range[1][1] = int(0.5 + (v...
3
18
1
300
0
2,245
2,262
2,245
null
[]
None
null
0
0
0
null
0
null
The function (UpdateMasks.UpdateMasks.MaxSizer.OnMaxSlider) defined within the public class called public.The function start at line 2245 and ends at 2262. It contains 18 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
UpdateMasks.UpdateMasks.MaxSizer.OnMinSlider
def OnMinSlider(event):val = minSel.GetValue()scaleSel.SetSelection(len(scaleChoices)-1)if G2frame.prevMinValue == val: return # if this val has been processed, no need to repeatG2frame.prevMinValue = valDeltOne= max(1.0,Range[1][1]-max(0.0,Range[0][0])-1) # Imax-Imin0-1Range[1][0] = max(0,int(0.5 + val * DeltOne / 100...
3
18
1
291
0
2,265
2,282
2,265
null
[]
None
null
0
0
0
null
0
null
The function (UpdateMasks.UpdateMasks.MaxSizer.OnMinSlider) defined within the public class called public.The function start at line 2265 and ends at 2282. It contains 18 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
UpdateMasks.UpdateMasks.MaxSizer.OnAutoSet
def OnAutoSet(event):'''Responds to a button labeled 95%, etc; Sets the Imax and Imin valuesfor the image so that 95% (etc.) of pixels are inside the color map limits.An equal number of pixels are dropped at the minimum and maximum levels.'''try:val = int(event.GetEventObject().GetStringSelection()[:-1])margin = (100-v...
4
28
1
439
0
2,284
2,315
2,284
null
[]
None
null
0
0
0
null
0
null
The function (UpdateMasks.UpdateMasks.MaxSizer.OnAutoSet) defined within the public class called public.The function start at line 2284 and ends at 2315. It contains 28 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
UpdateMasks.MaxSizer
def MaxSizer():'''Defines a sizer with sliders and TextCtrl widgets for controlling the colormapfor the image, as well as callback routines.'''def OnNewVal(invalid,value,tc):'''Called when a Imax or Imin value is typed into a Validated TextCrtl (which putsthe value into the data['range'] nested list).This adjusts the s...
4
45
0
669
0
2,212
2,364
2,212
null
[]
None
null
0
0
0
null
0
null
The function (UpdateMasks.MaxSizer) defined within the public class called public.The function start at line 2212 and ends at 2364. It contains 45 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
UpdateMasks.OnDelPixMask
def OnDelPixMask(event):data['SpotMask'] = {'esdMul':3.,'spotMask':None}wx.CallAfter(UpdateMasks,G2frame,data)G2plt.PlotExposedImage(G2frame,event=event)
1
4
1
40
0
2,366
2,369
2,366
null
[]
None
null
0
0
0
null
0
null
The function (UpdateMasks.OnDelPixMask) defined within the public class called public.The function start at line 2366 and ends at 2369. 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
UpdateMasks.OnAzimuthPlot
def OnAzimuthPlot(event):GkTheta = chr(0x03f4)Obj = event.GetEventObject()ringId = int(Obj.locationcode.split('+')[1])-1Controls = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.Image,'Image Controls'))image = GetImageZ(G2frame,Controls)RingInt = G2img.AzimuthIntegrate(image,Controls,data,ringId)G2...
1
9
1
125
0
2,371
2,379
2,371
null
[]
None
null
0
0
0
null
0
null
The function (UpdateMasks.OnAzimuthPlot) defined within the public class called public.The function start at line 2371 and ends at 2379. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateMasks
def UpdateMasks(G2frame,data):'''Shows and handles the controls on the "Masks" data tree entry'''def OnTextMsg(event):Obj = event.GetEventObject()Obj.SetToolTip('Drag this mask on 2D Powder Image with mouse to change ')def Replot(*args,**kwargs):wx.CallAfter(G2plt.PlotExposedImage,G2frame)def newReplot(*args,**kwargs):...
37
301
2
3,389
116
1,868
2,671
1,868
null
['MId', 'r11', 'startScroll', 'CId', 'ylineDelete', 'maskImage', 'imgdim', 'maskdata', 'Text', 'margin', 'minVal', 'num', 'controlData', 'arcThick', 'Ylines', 'polyList', 'copyDict', 'formatName', 'maskID', 'Polygons', 'Rings', 'sqrtDeltZero', 'maxVal', 'keyList', 'Obj', 'arcText', 'Controls', 'File', 'Source', 'SpotTa...
None
null
0
0
0
null
0
null
The function (UpdateMasks) defined within the public class called public.The function start at line 1868 and ends at 2671. It contains 301 lines of code and it has a cyclomatic complexity of 37. It takes 2 parameters, represented as [1868.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateStressStrain.OnAppendDzero
def OnAppendDzero(event):data['d-zero'].append({'Dset':1.0,'Dcalc':0.0,'pixLimit':10,'cutoff':1.0,'ImxyObs':[[],[]],'ImtaObs':[[],[]],'ImtaCalc':[[],[]],'Emat':[1.0,1.0,1.0],'fixDset':False,'Ivar':0})UpdateStressStrain(G2frame,data)
1
4
1
96
0
2,682
2,685
2,682
null
[]
None
null
0
0
0
null
0
null
The function (UpdateStressStrain.OnAppendDzero) defined within the public class called public.The function start at line 2682 and ends at 2685. 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
UpdateStressStrain.OnUpdateDzero
def OnUpdateDzero(event):for item in data['d-zero']:if item['Dcalc']: #skip unrefined onesitem['Dset'] = item['Dcalc']UpdateStressStrain(G2frame,data)
3
5
1
34
0
2,687
2,691
2,687
null
[]
None
null
0
0
0
null
0
null
The function (UpdateStressStrain.OnUpdateDzero) defined within the public class called public.The function start at line 2687 and ends at 2691. It contains 5 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateStressStrain.OnCopyStrSta
def OnCopyStrSta(event):Names = G2gd.GetGPXtreeDataNames(G2frame,['IMG ',])if len(Names) == 1:G2frame.ErrorDialog('Nothing to copy controls to','There must be more than one "IMG" pattern')returnSource = G2frame.GPXtree.GetItemText(G2frame.Image)Names.pop(Names.index(Source))dlg = G2G.G2MultiChoiceDialog(G2frame,'Copy s...
5
23
1
205
0
2,693
2,715
2,693
null
[]
None
null
0
0
0
null
0
null
The function (UpdateStressStrain.OnCopyStrSta) defined within the public class called public.The function start at line 2693 and ends at 2715. It contains 23 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateStressStrain.OnLoadStrSta
def OnLoadStrSta(event):pth = G2G.GetImportPath(G2frame)if not pth: pth = '.'dlg = wx.FileDialog(G2frame, 'Choose stress/strain file', pth, '','image control files (*.strsta)|*.strsta',wx.FD_OPEN)try:if dlg.ShowModal() == wx.ID_OK:filename = dlg.GetPath()File = open(filename,'r')S = File.read()data = eval(S)Controls = ...
4
20
1
154
0
2,717
2,736
2,717
null
[]
None
null
0
0
0
null
0
null
The function (UpdateStressStrain.OnLoadStrSta) defined within the public class called public.The function start at line 2717 and ends at 2736. It contains 20 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
UpdateStressStrain.OnSaveStrSta
def OnSaveStrSta(event):pth = G2G.GetExportPath(G2frame)dlg = wx.FileDialog(G2frame, 'Choose stress/strain file', pth, '','image control files (*.strsta)|*.strsta',wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)try:if dlg.ShowModal() == wx.ID_OK:filename = dlg.GetPath()File = open(filename,'w')keys = ['Type','Sample phi','Sample z'...
7
26
1
217
0
2,738
2,763
2,738
null
[]
None
null
0
0
0
null
0
null
The function (UpdateStressStrain.OnSaveStrSta) defined within the public class called public.The function start at line 2738 and ends at 2763. It contains 26 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
UpdateStressStrain.OnStrStaSample
def OnStrStaSample(event):filename = ''pth = G2G.GetImportPath(G2frame)if not pth: pth = '.'dlg = wx.FileDialog(G2frame, 'Choose multihistogram metadata text file', pth, '','metadata file (*.*)|*.*',wx.FD_OPEN)try:if dlg.ShowModal() == wx.ID_OK:filename = dlg.GetPath()File = open(filename,'r')S = File.readline()newItem...
19
68
1
491
0
2,765
2,832
2,765
null
[]
None
null
0
0
0
null
0
null
The function (UpdateStressStrain.OnStrStaSample) defined within the public class called public.The function start at line 2765 and ends at 2832. It contains 68 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
UpdateStressStrain.OnPlotStrSta
def OnPlotStrSta(event):Controls = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.Image, 'Image Controls'))RingInt = G2img.IntStrSta(G2frame.ImageZ,data,Controls)Names = ['d=%.3f'%(ring['Dcalc']) for ring in data['d-zero']]G2plt.PlotExposedImage(G2frame,event=event)G2frame.G2plotNB.Delete('Ring Int...
2
10
1
109
0
2,834
2,843
2,834
null
[]
None
null
0
0
0
null
0
null
The function (UpdateStressStrain.OnPlotStrSta) defined within the public class called public.The function start at line 2834 and ends at 2843. It contains 10 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateStressStrain.OnSaveStrRing
def OnSaveStrRing(event):Controls = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.Image, 'Image Controls'))RingInt = G2img.IntStrSta(G2frame.ImageZ,data,Controls)Names = ['d=%.3f'%(ring['Dcalc']) for ring in data['d-zero']]pth = G2G.GetExportPath(G2frame)dlg = wx.FileDialog(G2frame, 'Choose strain...
6
21
1
199
0
2,845
2,865
2,845
null
[]
None
null
0
0
0
null
0
null
The function (UpdateStressStrain.OnSaveStrRing) defined within the public class called public.The function start at line 2845 and ends at 2865. 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
UpdateStressStrain.OnFitStrSta
def OnFitStrSta(event):Controls = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.Image, 'Image Controls'))G2img.FitStrSta(G2frame.ImageZ,data,Controls)print ('Strain fitting finished')UpdateStressStrain(G2frame,data)G2plt.PlotExposedImage(G2frame,event=event)G2plt.PlotStrain(G2frame,data,newPlot=Tr...
1
8
1
70
0
2,868
2,875
2,868
null
[]
None
null
0
0
0
null
0
null
The function (UpdateStressStrain.OnFitStrSta) defined within the public class called public.The function start at line 2868 and ends at 2875. 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
UpdateStressStrain.OnFitAllStrSta
def OnFitAllStrSta(event):choices = G2gd.GetGPXtreeDataNames(G2frame,['IMG ',])od = {'label_1':'Copy to next','value_1':False,'label_2':'Reverse order','value_2':False}dlg = G2G.G2MultiChoiceDialog(G2frame,'Stress/Strain fitting','Select images to fit:',choices,extraOpts=od)names = []if dlg.ShowModal() == wx.ID_OK:for ...
15
85
1
761
0
2,877
2,962
2,877
null
[]
None
null
0
0
0
null
0
null
The function (UpdateStressStrain.OnFitAllStrSta) defined within the public class called public.The function start at line 2877 and ends at 2962. It contains 85 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
UpdateStressStrain.UpdateStressStrain.SamSizer.OnStrainType
def OnStrainType(event):data['Type'] = strType.GetValue()
1
2
1
15
0
2,966
2,967
2,966
null
[]
None
null
0
0
0
null
0
null
The function (UpdateStressStrain.UpdateStressStrain.SamSizer.OnStrainType) defined within the public class called public.The function start at line 2966 and ends at 2967. 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
UpdateStressStrain.SamSizer
def SamSizer():def OnStrainType(event):data['Type'] = strType.GetValue()samSizer = wx.FlexGridSizer(0,4,0,5)samSizer.Add(wx.StaticText(G2frame.dataWindow,-1,label=' Strain type: '),0,WACV)strType = wx.ComboBox(G2frame.dataWindow,value=data['Type'],choices=['True','Conventional'],style=wx.CB_READONLY|wx.CB_DROPDOWN)strT...
1
20
0
302
0
2,964
2,987
2,964
null
[]
None
null
0
0
0
null
0
null
The function (UpdateStressStrain.SamSizer) defined within the public class called public.The function start at line 2964 and ends at 2987. It contains 20 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
UpdateStressStrain.UpdateStressStrain.DzeroSizer.OnStrainChange
def OnStrainChange(event):#print (event)r,c = event.GetRow(),event.GetCol()if c == 0:data['d-zero'][r]['Dset'] = min(max(float(StrainGrid.GetCellValue(r,c)),0.25),20.)elif c == 1:data['d-zero'][r]['fixDset'] = bool(StrainGrid.GetCellValue(r,c))elif c == 3:data['d-zero'][r]['cutoff'] = min(max(float(StrainGrid.GetCellVa...
6
16
1
205
0
2,991
3,007
2,991
null
[]
None
null
0
0
0
null
0
null
The function (UpdateStressStrain.UpdateStressStrain.DzeroSizer.OnStrainChange) defined within the public class called public.The function start at line 2991 and ends at 3007. 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
UpdateStressStrain.UpdateStressStrain.DzeroSizer.OnSetCol
def OnSetCol(event):c = event.GetCol()if c == 1:StrainGrid.ClearSelection()StrainGrid.SelectCol(c,True)choice = ['Y - set all','N - set none',]dlg = wx.SingleChoiceDialog(G2frame,'Select option for '+StrainGrid.GetColLabelValue(c-1),'Strain controls',choice)dlg.CenterOnParent()if dlg.ShowModal() == wx.ID_OK:sel = dlg.G...
6
16
1
149
0
3,009
3,024
3,009
null
[]
None
null
0
0
0
null
0
null
The function (UpdateStressStrain.UpdateStressStrain.DzeroSizer.OnSetCol) defined within the public class called public.The function start at line 3009 and ends at 3024. 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
UpdateStressStrain.DzeroSizer
def DzeroSizer():def OnStrainChange(event):#print (event)r,c = event.GetRow(),event.GetCol()if c == 0:data['d-zero'][r]['Dset'] = min(max(float(StrainGrid.GetCellValue(r,c)),0.25),20.)elif c == 1:data['d-zero'][r]['fixDset'] = bool(StrainGrid.GetCellValue(r,c))elif c == 3:data['d-zero'][r]['cutoff'] = min(max(float(Str...
5
26
0
379
0
2,989
3,048
2,989
null
[]
None
null
0
0
0
null
0
null
The function (UpdateStressStrain.DzeroSizer) defined within the public class called public.The function start at line 2989 and ends at 3048. It contains 26 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
UpdateStressStrain
def UpdateStressStrain(G2frame,data):'''Shows and handles the controls on the "Stress/Strain"data tree entry'''def OnAppendDzero(event):data['d-zero'].append({'Dset':1.0,'Dcalc':0.0,'pixLimit':10,'cutoff':1.0,'ImxyObs':[[],[]],'ImtaObs':[[],[]],'ImtaCalc':[[],[]],'Emat':[1.0,1.0,1.0],'fixDset':False,'Ivar':0})UpdateStr...
3
46
2
412
63
2,677
3,086
2,677
null
['Names', 'Comments', 'File', 'Controls', 'topSizer', 'samZ', 'CId', 'Source', 'items', 'load', 'histList', 'names', 'j4', 'samSizer', 'rowIds', 'strType', 'dataDict', 'varyNames', 'StaCtrls', 'parent', 'ifany', 'RingInt', 'samLoad', 'Nvar', 'StrainGrid', 'SeqResult', 'Stuff', 'oldData', 'filename', 'newItems', 'dlg', ...
None
null
0
0
0
null
0
null
The function (UpdateStressStrain) defined within the public class called public.The function start at line 2677 and ends at 3086. It contains 46 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [2677.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ReadMask
def ReadMask(filename):'Read a mask (.immask) file'File = open(filename,'r')save = {}S = File.readline()while S:if S[0] == '#':S = File.readline()continue[key,val] = S.strip().split(':',1)if key in ['Points','Rings','Arcs','Polygons','Frames','Thresholds']:save[key] = eval(val)S = File.readline()File.close()CleanupMask...
4
16
1
106
3
3,091
3,106
3,091
null
['save', 'S', 'File']
None
null
0
0
0
null
0
null
The function (ReadMask) defined within the public class called public.The function start at line 3091 and ends at 3106. It contains 16 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ReadControls
def ReadControls(filename):'read an image controls (.imctrl) file'cntlList = ['wavelength','distance','tilt','invert_x','invert_y','type','fullIntegrate','outChannels','outAzimuths','LRazimuth','IOtth','azmthOff','DetDepth','calibskip','pixLimit','cutoff','calibdmin','Flat Bkg','PolaVal','SampleAbs','dark image','backg...
8
29
1
231
5
3,108
3,136
3,108
null
['vals', 'File', 'cntlList', 'save', 'S']
None
null
0
0
0
null
0
null
The function (ReadControls) defined within the public class called public.The function start at line 3108 and ends at 3136. It contains 29 lines of code and it has a cyclomatic complexity of 8. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Read_imctrl
def Read_imctrl(imctrl_file):'''Read an image control file and record control parms into a dict, with some simpletype conversions'''save = {'filename':imctrl_file}immask_file = os.path.splitext(imctrl_file)[0]+'.immask'if os.path.exists(immask_file):save['maskfile'] = immask_fileelse:save['maskfile'] = '(none)'cntlList...
15
49
1
394
7
3,138
3,190
3,138
null
['fullIntegrate', 'File', 'vals', 'cntlList', 'immask_file', 'save', 'S']
None
null
0
0
0
null
0
null
The function (Read_imctrl) defined within the public class called public.The function start at line 3138 and ends at 3190. It contains 49 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
__init__.OnStart
def OnStart(event):'''Called when the start button is pressed. Changes button labelto Pause. When Pause is pressed the label changes to Resume.When either Start or Resume is pressed, the processing loopis started. When Pause is pressed, the loop is stopped.'''# check inputs for errors before starting#err = ''#if not an...
5
15
1
110
0
3,205
3,234
3,205
null
[]
None
null
0
0
0
null
0
null
The function (__init__.OnStart) defined within the public class called public.The function start at line 3205 and ends at 3234. 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
__init__.OnReset
def OnReset(event):'''Called when Reset button is pressed. This stops theprocessing loop and resets the list of integrated files soall images can be reintegrated.'''self.btnstart.SetLabel('Restart')self.Status.SetStatusText('Press Restart to reload and re-integrate images matching filter')if self.timer.IsRunning(): sel...
2
6
1
48
0
3,236
3,245
3,236
null
[]
None
null
0
0
0
null
0
null
The function (__init__.OnReset) defined within the public class called public.The function start at line 3236 and ends at 3245. 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
__init__.OnQuit
def OnQuit(event):'''Stop the processing loop and close the Frame'''if self.timer.IsRunning(): self.timer.Stop() # make sure we stop firstwx.CallAfter(self.Destroy)
2
3
1
30
0
3,247
3,251
3,247
null
[]
None
null
0
0
0
null
0
null
The function (__init__.OnQuit) defined within the public class called public.The function start at line 3247 and ends at 3251. It contains 3 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
__init__.OnBrowse
def OnBrowse(event):'''Responds when the Browse button is pressed to load a file.The routine determines which button was pressed and gets theappropriate file type and loads it into the appropriate placein the dict.'''if btn3 == event.GetEventObject():dlg = wx.DirDialog(self, 'Select directory for output files',self.par...
8
38
1
236
0
3,253
3,295
3,253
null
[]
None
null
0
0
0
null
0
null
The function (__init__.OnBrowse) defined within the public class called public.The function start at line 3253 and ends at 3295. It contains 38 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
__init__.OnRadioSelect
def OnRadioSelect(event):'''Respond to a radiobutton selection and when in tablemode, get distance-dependent parameters from user.'''self.Evaluator = Noneif self.useTable.GetValue():dlg = Nonetry:dlg = IntegParmTable(self) # create the dialogdlg.CenterOnParent()if dlg.ShowModal() == wx.ID_OK:self.ImgTblParms = dlg.parm...
6
25
1
162
0
3,297
3,324
3,297
null
[]
None
null
0
0
0
null
0
null
The function (__init__.OnRadioSelect) defined within the public class called public.The function start at line 3297 and ends at 3324. 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
__init__.OnEditTable
def OnEditTable(event):'''Called to edit the distance-dependent parameter look-up table.Should be called only when table is defined and active.'''dlg = Nonetry:dlg = IntegParmTable(self,self.ImgTblParms,self.IMfileList)dlg.CenterOnParent()if dlg.ShowModal() == wx.ID_OK:self.ImgTblParms = dlg.parmsself.IMfileList = dlg....
4
20
1
141
0
3,326
3,348
3,326
null
[]
None
null
0
0
0
null
0
null
The function (__init__.OnEditTable) defined within the public class called public.The function start at line 3326 and ends at 3348. It contains 20 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
__init__.showPDFctrls
def showPDFctrls(event):'''Called to show or hide AutoPDF widgets. Note that fInp4 must be included in thesizer layout with .Show(True) before .Show(False) will work properly.'''fInp4.Enable(self.params['ComputePDF'])fInp4.Show(self.params['ComputePDF'])fInp4a.Enable(self.params['ComputePDF'])btn4.Enable(self.params['C...
2
12
1
95
0
3,350
3,364
3,350
null
[]
None
null
0
0
0
null
0
null
The function (__init__.showPDFctrls) defined within the public class called public.The function start at line 3350 and ends at 3364. 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
__init__.scanPDFprm
def scanPDFprm(**kw):fInp4.invalid = not os.path.exists(fInp4.GetValue())fInp4._IndicateValidity()
1
3
1
28
0
3,366
3,368
3,366
null
[]
None
null
0
0
0
null
0
null
The function (__init__.scanPDFprm) defined within the public class called public.The function start at line 3366 and ends at 3368. 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
__init__.OnAutoScale
def OnAutoScale(event):self.AutoScale = autoscale.GetValue()
1
2
1
14
0
3,370
3,371
3,370
null
[]
None
null
0
0
0
null
0
null
The function (__init__.OnAutoScale) defined within the public class called public.The function start at line 3370 and ends at 3371. 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
__init__.OnAutoScaleName
def OnAutoScaleName(event):self.AutoScaleName = scalename.GetValue()self.Scale[0] = self.AutoScales[self.AutoScaleName]scaleval.SetValue(self.Scale[0])
1
4
1
40
0
3,373
3,376
3,373
null
[]
None
null
0
0
0
null
0
null
The function (__init__.OnAutoScaleName) defined within the public class called public.The function start at line 3373 and ends at 3376. 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
__init__
def __init__(self,G2frame,PollTime=30.0):def OnStart(event):'''Called when the start button is pressed. Changes button labelto Pause. When Pause is pressed the label changes to Resume.When either Start or Resume is pressed, the processing loopis started. When Pause is pressed, the loop is stopped.'''# check inputs for ...
14
203
3
2,115
0
3,204
3,587
3,204
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 3204 and ends at 3587. It contains 203 lines of code and it has a cyclomatic complexity of 14. It takes 3 parameters, represented as [3204.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
TestInput
def TestInput(self,event):for fmt in self.multipleFmtChoices:if not self.params[fmt]: continueif self.multipleFmtChoices[fmt]: continuechoices = []for f,l in zip(self.fmtlist[0],self.fmtlist[1]):if f[1:] == fmt: choices.append(l)if len(choices) < 2:print('Error: why no choices in TestInput?')return# select the format h...
9
21
2
163
0
3,589
3,610
3,589
null
[]
None
null
0
0
0
null
0
null
The function (TestInput) defined within the public class called public.The function start at line 3589 and ends at 3610. It contains 21 lines of code and it has a cyclomatic complexity of 9. It takes 2 parameters, represented as [3589.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
checkPDFprm
def checkPDFprm(self,ShowContents=False):'''Read in the PDF (.pdfprm) parameter file and check for problems.If ShowContents is True, a formatted text version of some of the filecontents is returned. If errors are found, the return string will containthe string "Error:" at least once.'''self.pdfControls = {}msg = ''File...
20
48
2
348
0
3,612
3,664
3,612
null
[]
None
null
0
0
0
null
0
null
The function (checkPDFprm) defined within the public class called public.The function start at line 3612 and ends at 3664. It contains 48 lines of code and it has a cyclomatic complexity of 20. It takes 2 parameters, represented as [3612.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SetSourceDir
def SetSourceDir(self,event):'''Use a dialog to get a directory for image files'''dlg = wx.DirDialog(self, 'Select directory for image files',self.params['readdir'],wx.DD_DEFAULT_STYLE)dlg.CenterOnParent()try:if dlg.ShowModal() == wx.ID_OK:self.params['readdir'] = dlg.GetPath()self.readDir.SetValue(self.params['readdir...
3
12
2
86
0
3,666
3,679
3,666
null
[]
None
null
0
0
0
null
0
null
The function (SetSourceDir) defined within the public class called public.The function start at line 3666 and ends at 3679. It contains 12 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [3666.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ShowMatchingFiles
def ShowMatchingFiles(self,value,invalid=False,**kwargs):'''Find and show images in the tree and the image files matching the imagefile directory (self.params['readdir']) and the image file filter(self.params['filter']) and add this information to the GUI list box'''G2frame = self.G2frameif invalid: returnmsg = ''if se...
14
37
4
327
0
3,681
3,721
3,681
null
[]
None
null
0
0
0
null
0
null
The function (ShowMatchingFiles) defined within the public class called public.The function start at line 3681 and ends at 3721. It contains 37 lines of code and it has a cyclomatic complexity of 14. It takes 4 parameters, represented as [3681.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
OnPause
def OnPause(self):'''Respond to Pause, changes text on button/Status line, if neededStops timerself.Pause should already be True'''if self.timer.IsRunning(): self.timer.Stop()if self.btnstart.GetLabel() == 'Restart':returnif self.btnstart.GetLabel() != 'Resume':print('\nPausing autointegration\n')self.btnstart.SetLabel...
4
10
1
70
0
3,723
3,736
3,723
null
[]
None
null
0
0
0
null
0
null
The function (OnPause) defined within the public class called public.The function start at line 3723 and ends at 3736. 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
IntegrateImage
def IntegrateImage(self,img,useTA=None,useMask=None):'''Integrates a single image. Ids for created PWDR entries (more than one is possible)are placed in G2frame.IntgOutList'''G2frame = self.G2frameimgId = G2gd.GetGPXtreeItemId(G2frame,G2frame.root,img)G2frame.Image = imgIdG2frame.PickId = G2gd.GetGPXtreeItemId(G2frame,...
25
78
4
641
0
3,738
3,827
3,738
null
[]
None
null
0
0
0
null
0
null
The function (IntegrateImage) defined within the public class called public.The function start at line 3738 and ends at 3827. It contains 78 lines of code and it has a cyclomatic complexity of 25. It takes 4 parameters, represented as [3738.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
EnableButtons
def EnableButtons(self,flag):'''Relabels and enable/disables the buttons at window bottom when auto-integration is running'''# for unclear reasons disabling these buttons causes OnRadioSelect to be invoked# on windowsif sys.platform != "win32":for item in (self.btnstart,self.btnreset,self.btnclose): item.Enable(flag)se...
3
5
2
51
0
3,829
3,837
3,829
null
[]
None
null
0
0
0
null
0
null
The function (EnableButtons) defined within the public class called public.The function start at line 3829 and ends at 3837. It contains 5 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [3829.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ResetFromTable
def ResetFromTable(self,dist):'''Sets integration parameters based on values fromthe lookup table'''#dist = self.controlsDict['distance']interpDict,imgctrl,immask = self.Evaluator(dist) # interpolated calibration valuesif GSASIIpath.GetConfigValue('debug'):print ('DBG_interpolated values: ',interpDict)self.ImageControl...
6
21
2
204
0
3,839
3,864
3,839
null
[]
None
null
0
0
0
null
0
null
The function (ResetFromTable) defined within the public class called public.The function start at line 3839 and ends at 3864. It contains 21 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [3839.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
StartLoop
def StartLoop(self):'''Prepare to start autointegration timer loop.Save current Image params for use in future integrationsalso label the window so users understand what is being used'''print('\nStarting new autointegration\n')G2frame = self.G2frame# show current IMG baseif self.params['Mode'] != 'table':self.useActive...
23
80
1
685
0
3,866
3,960
3,866
null
[]
None
null
0
0
0
null
0
null
The function (StartLoop) defined within the public class called public.The function start at line 3866 and ends at 3960. It contains 80 lines of code and it has a cyclomatic complexity of 23. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
OnTimerLoop.AutoIntegrateImage
def AutoIntegrateImage(imgId,useTA=None,useMask=None):'''Integrates an image that has been read into the data tree and updates theAutoInt window.'''img = G2frame.GPXtree.GetItemText(imgId)controlsDict = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,imgId, 'Image Controls'))ImageMasks = G2frame.GPXtree.Get...
3
20
3
158
0
3,968
3,992
3,968
null
[]
None
null
0
0
0
null
0
null
The function (OnTimerLoop.AutoIntegrateImage) defined within the public class called public.The function start at line 3968 and ends at 3992. It contains 20 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [3968.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
OnTimerLoop.AutoComputePDF
def AutoComputePDF(imgId):'''Computes a PDF for a PWDR data tree tree item'''for pwdr in G2frame.AutointPWDRnames[:]:if not pwdr.startswith('PWDR '): continueif pwdr in G2frame.AutointPDFnames: continuePWid = G2gd.GetGPXtreeItemId(G2frame,G2frame.root,pwdr)controlsDict = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeIte...
13
57
1
550
0
3,994
4,056
3,994
null
[]
None
null
0
0
0
null
0
null
The function (OnTimerLoop.AutoComputePDF) defined within the public class called public.The function start at line 3994 and ends at 4056. It contains 57 lines of code and it has a cyclomatic complexity of 13. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
OnTimerLoop
def OnTimerLoop(self,event):'''A method that is called every :meth:`PollTime` seconds that isused to check for new files and process them. Integrates new images.Also optionally sets up and computes PDF.This is called only after the "Start" button is pressed (then its label reads "Pause").'''def AutoIntegrateImage(imgId...
22
71
2
566
0
3,962
4,132
3,962
null
[]
None
null
0
0
0
null
0
null
The function (OnTimerLoop) defined within the public class called public.The function start at line 3962 and ends at 4132. It contains 71 lines of code and it has a cyclomatic complexity of 22. It takes 2 parameters, represented as [3962.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
DefineEvaluator.Evaluator
def Evaluator(dist):'''Interpolate image parameters for a supplied distance value:param float dist: distance to use for interpolation:returns: a list with 3 items:* a dict with interpolated parameter values,* the closest imctrl and* the closest maskfile (or None)'''x = np.array([float(i) for i in parms[0]])closest = ab...
9
28
1
297
0
4,137
4,175
4,137
null
[]
None
null
0
0
0
null
0
null
The function (DefineEvaluator.Evaluator) defined within the public class called public.The function start at line 4137 and ends at 4175. It contains 28 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
DefineEvaluator
def DefineEvaluator(dlg):'''Creates a function that provides interpolated values for a given distance value'''def Evaluator(dist):'''Interpolate image parameters for a supplied distance value:param float dist: distance to use for interpolation:returns: a list with 3 items:* a dict with interpolated parameter values,* t...
1
8
1
41
13
4,134
4,182
4,134
null
['closest', 'cols', 'r', 'parms', 'IMfileList', 'maskfile', 'x', 'lbl', 'y', 'imctfile', 'ParmList', 'D', 'nonInterpVars']
None
null
0
0
0
null
0
null
The function (DefineEvaluator) defined within the public class called public.The function start at line 4134 and ends at 4182. 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
__init__
def __init__(self,parent,parms=None,IMfileList=None,readFileList=None):self.G2frame = parent.G2framedlg = Nonepth = ''wx.Dialog.__init__(self,parent,style=wx.RESIZE_BORDER|wx.DEFAULT_DIALOG_STYLE)if readFileList:self.parms,self.IMfileList = self.ReadFiles(readFileList)elif parms:self.parms = parms # list of values by c...
8
44
5
383
0
4,200
4,243
4,200
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 4200 and ends at 4243. It contains 44 lines of code and it has a cyclomatic complexity of 8. It takes 5 parameters, represented as [4200.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ReadFiles
def ReadFiles(self,files):'''Reads a list of .imctrl files or a single .imtbl file'''tmpDict = {}if not files: return# option 1, a dump from a previous saveif os.path.splitext(files[0])[1] == '.imtbl':fp = open(files[0],'r')S = fp.readline()while S:if S[0] != '#':[key,val] = S[:-1].split(':',1)tmpDict[key] = eval(val)S...
32
64
2
583
0
4,245
4,313
4,245
null
[]
None
null
0
0
0
null
0
null
The function (ReadFiles) defined within the public class called public.The function start at line 4245 and ends at 4313. It contains 64 lines of code and it has a cyclomatic complexity of 32. It takes 2 parameters, represented as [4245.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ReadImageParmTable
def ReadImageParmTable(self):'''Reads possibly edited values from the ListCtrl table and returns a listof values for each column.'''rows = self.list.GetItemCount()cols = self.list.GetColumnCount()parms = []for c in range(cols):parms.append([])for r in range(rows):parms[c].append(self.list.GetItem(r,c).GetText())return ...
3
9
1
75
0
4,315
4,326
4,315
null
[]
None
null
0
0
0
null
0
null
The function (ReadImageParmTable) defined within the public class called public.The function start at line 4315 and ends at 4326. 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
_onClose
def _onClose(self,event):'Called when Cancel button is pressed'self.EndModal(wx.ID_CANCEL)
1
3
2
16
0
4,328
4,330
4,328
null
[]
None
null
0
0
0
null
0
null
The function (_onClose) defined within the public class called public.The function start at line 4328 and ends at 4330. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [4328.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
_onSave
def _onSave(self,event):'Called when save button is pressed; creates a .imtbl file'fil = ''if self.G2frame.GSASprojectfile:fil = os.path.splitext(self.G2frame.GSASprojectfile)[0]+'.imtbl'dir,f = os.path.split(fil)pth = G2G.GetExportPath(self.G2frame)try:dlg = wx.FileDialog(self, 'Save table data as',defaultDir=pth, def...
6
28
2
259
0
4,332
4,359
4,332
null
[]
None
null
0
0
0
null
0
null
The function (_onSave) defined within the public class called public.The function start at line 4332 and ends at 4359. It contains 28 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [4332.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
__init__
def __init__(self, parent, ID, pos=wx.DefaultPosition,size=(1000,200),style=0):self.parent=parentwx.ListCtrl.__init__(self, parent, ID, pos, size, style)listmix.ListCtrlAutoWidthMixin.__init__(self)listmix.TextEditMixin.__init__(self)self.Bind(wx.EVT_LEFT_DCLICK, self.OnDouble)
1
6
6
78
0
4,364
4,369
4,364
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 4364 and ends at 4369. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [4364.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FillList
def FillList(self,parms):'Places the current parms into the table'# the use of InsertStringItem and SetStringItem are depricated in 4.0 but# I am not quite sure how to replace them with InsertItem and SetItem yet.# Perhaps switch toULC.UltimateListCtrl?#maxint = 2**31-1self.ClearAll()self.rowlen = len(self.parent.ParmL...
8
16
2
151
0
4,372
4,391
4,372
null
[]
None
null
0
0
0
null
0
null
The function (FillList) defined within the public class called public.The function start at line 4372 and ends at 4391. It contains 16 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [4372.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
OnDouble
def OnDouble(self,evt):'respond to a double-click'self.CloseEditor()fil = '(none)'pth = G2G.GetImportPath(self.parent.G2frame)if not pth: pth = '.'try:dlg = wx.FileDialog(self, 'Select mask or control file to add (Press cancel if none)', pth,style=wx.FD_OPEN,wildcard='Add GSAS-II mask file (.immask)|*.immask|add image ...
13
45
2
367
0
4,393
4,439
4,393
null
[]
None
null
0
0
0
null
0
null
The function (OnDouble) defined within the public class called public.The function start at line 4393 and ends at 4439. It contains 45 lines of code and it has a cyclomatic complexity of 13. It takes 2 parameters, represented as [4393.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
testColumnMetadata
def testColumnMetadata(G2frame):'''Test the column-oriented metadata parsing, as implemented at 1-ID, by showing resultswhen using a .par and .lbls pair. * Select a .par file, if more than one in selected dir. * Select the .*lbls file, if more than one matching .par file. * Parse the .lbls file, showing errors if encou...
43
149
1
1,072
21
4,443
4,606
4,443
null
['lblList', 'l', 'parList', 'items', 'title', 'fp', 'n', 'errors', 'parRoot', 'dlg', 'imageName', 'name', 'nameList', 'linenum', 'fileorline', 'lblFile', 't', 'parFiles', 'parFile', 'metadata', 'usedCols']
None
null
0
0
0
null
0
null
The function (testColumnMetadata) defined within the public class called public.The function start at line 4443 and ends at 4606. It contains 149 lines of code and it has a cyclomatic complexity of 43. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
selectPhase
def selectPhase(G2frame,calList,RefreshPlot):'''Display a dialog with a list of avaliable phases:param G2frame: main GSAS-II window:param list calList: a list of phases and calibrants that can be selected:param function RefreshPlot: a callable routine that will redisplaythe image'''# assemble a list of validated colors...
7
51
3
404
10
4,613
4,672
4,613
null
['OKbtn', 'txt', 'panel', 'headers', 'mainSizer', 'gsizer', 'dlg', 'btnsizer', 'valid_colors', 'invalid_colors']
None
null
0
0
0
null
0
null
The function (selectPhase) defined within the public class called public.The function start at line 4613 and ends at 4672. It contains 51 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [4613.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
initPhaseOpts
def initPhaseOpts(phases):'''Make sure that the options for display of partials are all defined'''for p in phases:phaseOpts[p] = phaseOpts.get(p,{})phaseOpts[p]['Show'] = phaseOpts[p].get('Show',False)# colors are assigned as initially usedphaseOpts[p]['color'] = phaseOpts[p].get('color',None)phaseOpts[p]['width'] = ph...
2
8
1
120
0
4,674
4,684
4,674
null
[]
None
null
0
0
0
null
0
null
The function (initPhaseOpts) defined within the public class called public.The function start at line 4674 and ends at 4684. 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
displayPhase.Refresh
def Refresh(*args):'''update the panel to show colors etc for shown phases andthen update the image plot'''displayPhase(G2frame,phList,panel,gsizer,headers,RefreshPlot)RefreshPlot()
1
3
1
24
0
4,690
4,695
4,690
null
[]
None
null
0
0
0
null
0
null
The function (displayPhase.Refresh) defined within the public class called public.The function start at line 4690 and ends at 4695. 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
displayPhase.OnSelectColor
def OnSelectColor(event):'''Respond to a change in color'''p = event.GetEventObject().phasec = event.GetValue()# convert wx.Colour to MPL color stringphaseOpts[p]['color'] = mpl.colors.to_hex(np.array(c.Get())/255)Refresh()
1
5
1
52
0
4,697
4,704
4,697
null
[]
None
null
0
0
0
null
0
null
The function (displayPhase.OnSelectColor) defined within the public class called public.The function start at line 4697 and ends at 4704. 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
displayPhase.StyleChange
def StyleChange(*args):'define MPL line style from line style index'for p in phaseOpts['selList']:try:phaseOpts[p]['MPLstyle'] = ltypeMPLname[phaseOpts[p]['style']]except:phaseOpts[p]['MPLstyle'] = '--'Refresh()
3
8
1
49
0
4,706
4,713
4,706
null
[]
None
null
0
0
0
null
0
null
The function (displayPhase.StyleChange) defined within the public class called public.The function start at line 4706 and ends at 4713. 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
displayPhase
def displayPhase(G2frame,phList,panel,gsizer,headers,RefreshPlot):'''Fills the scrolled panel with the potential phases to displayand their plot options'''def Refresh(*args):'''update the panel to show colors etc for shown phases andthen update the image plot'''displayPhase(G2frame,phList,panel,gsizer,headers,RefreshPl...
5
42
6
492
9
4,686
4,758
4,686
null
['ltypeChoices', 'ltypeMPLname', 'txt', 'lwidChoices', 'c', 'b', 'ind', 'ch', 'p']
None
null
0
0
0
null
0
null
The function (displayPhase) defined within the public class called public.The function start at line 4686 and ends at 4758. It contains 42 lines of code and it has a cyclomatic complexity of 5. It takes 6 parameters, represented as [4686.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
scaleAbyV
def scaleAbyV(A,V):'needs a doc string'v = G2lat.calc_V(A)scale = math.exp(math.log(v/V)/3.)**2for i in range(6):A[i] *= scale
2
6
2
51
2
39
44
39
null
['scale', 'v']
None
null
0
0
0
null
0
null
The function (scaleAbyV) defined within the public class called public.The function start at line 39 and ends at 44. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [39.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ranaxis
def ranaxis(dmin,dmax):'needs a doc string'import random as randreturn rand.random()*(dmax-dmin)+dmin
1
4
2
26
0
46
49
46
null
[]
None
null
0
0
0
null
0
null
The function (ranaxis) defined within the public class called public.The function start at line 46 and ends at 49. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [46.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ran2axis
def ran2axis(k,N):'needs a doc string'import random as randT = 1.5+0.49*k/N#B = 0.99-0.49*k/N#B = 0.99-0.049*k/NB = 0.99-0.149*k/NR = (T-B)*rand.random()+Breturn R
1
7
2
55
3
51
59
51
null
['B', 'T', 'R']
None
null
0
0
0
null
0
null
The function (ran2axis) defined within the public class called public.The function start at line 51 and ends at 59. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [51.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ranAbyV
def ranAbyV(Bravais,dmin,dmax,V):'needs a doc string'cell = [0,0,0,0,0,0]bad = Truewhile bad:bad = Falsecell = rancell(Bravais,dmin,dmax)G,g = G2lat.cell2Gmat(cell)A = G2lat.Gmat2A(G)if G2lat.calc_rVsq(A) < 1:scaleAbyV(A,V)cell = G2lat.A2cell(A)for i in range(3):bad |= cell[i] < dminreturn A
4
15
4
106
3
68
82
68
null
['cell', 'A', 'bad']
None
null
0
0
0
null
0
null
The function (ranAbyV) defined within the public class called public.The function start at line 68 and ends at 82. It contains 15 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [68.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ranAbyR
def ranAbyR(Bravais,A,k,N,ranFunc):'needs a doc string'R = ranFunc(k,N)if Bravais in [0,1,2]:#cubic - not usedA[0] = A[1] = A[2] = A[0]*RA[3] = A[4] = A[5] = 0.elif Bravais in [3,4]:#hexagonal/trigonalA[0] = A[1] = A[3] = A[0]*RA[2] *= RA[4] = A[5] = 0.elif Bravais in [5,6]:#tetragonalA[0] = A[1] = A[0]*RA[2] *= RA[3] ...
6
33
5
323
1
84
116
84
null
['R']
None
null
0
0
0
null
0
null
The function (ranAbyR) defined within the public class called public.The function start at line 84 and ends at 116. It contains 33 lines of code and it has a cyclomatic complexity of 6. It takes 5 parameters, represented as [84.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
rancell
def rancell(Bravais,dmin,dmax):'needs a doc string'if Bravais in [0,1,2]:#cubica = b = c = ranaxis(dmin,dmax)alp = bet = gam = 90elif Bravais in [3,4]:#hexagonal/trigonala = b = ranaxis(dmin,dmax)c = ranaxis(dmin,dmax)alp = bet =90gam = 120elif Bravais in [5,6]:#tetragonala = b = ranaxis(dmin,dmax)c = ranaxis(dmin,dmax...
8
44
3
405
9
118
161
118
null
['r', 'bet', 'a', 'c', 'b', 'gam', 'abc', 'ac', 'alp']
None
null
0
0
0
null
0
null
The function (rancell) defined within the public class called public.The function start at line 118 and ends at 161. It contains 44 lines of code and it has a cyclomatic complexity of 8. It takes 3 parameters, represented as [118.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
calc_M20
def calc_M20(peaks,HKL,ifX20=True):'needs a doc string'diff = 0X20 = 0for Nobs20,peak in enumerate(peaks):if peak[3]:Qobs = 1.0/peak[7]**2Qcalc = 1.0/peak[8]**2diff += abs(Qobs-Qcalc)elif peak[2]:X20 += 1if Nobs20 == 19: d20 = peak[7]breakelse:d20 = peak[7]Nobs20 = len(peaks)for N20,hkl in enumerate(HKL):if hkl[3] < d2...
9
28
3
164
8
163
190
163
null
['M20', 'Q20', 'Qcalc', 'd20', 'X20', 'Qobs', 'Nobs20', 'diff']
None
null
0
0
0
null
0
null
The function (calc_M20) defined within the public class called public.The function start at line 163 and ends at 190. It contains 28 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [163.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
calc_M20SS
def calc_M20SS(peaks,HKL):'needs a doc string'diff = 0X20 = 0for Nobs20,peak in enumerate(peaks):if peak[3]:Qobs = 1.0/peak[8]**2Qcalc = 1.0/peak[9]**2diff += abs(Qobs-Qcalc)elif peak[2]:X20 += 1if Nobs20 == 19: d20 = peak[8]breakelse:d20 = peak[8]Nobs20 = len(peaks)for N20,hkl in enumerate(HKL):if hkl[4] < d20:breakQ2...
8
27
2
157
8
192
218
192
null
['M20', 'Q20', 'Qcalc', 'd20', 'X20', 'Qobs', 'Nobs20', 'diff']
None
null
0
0
0
null
0
null
The function (calc_M20SS) defined within the public class called public.The function start at line 192 and ends at 218. It contains 27 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [192.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
sortM20
def sortM20(cells):'needs a doc string'#cells is M20,X20,Bravais,a,b,c,alp,bet,gam#sort highest M20 1stT = []for i,M in enumerate(cells):T.append((M[0],i))D = dict(zip(T,cells))T.sort()T.reverse()X = []for key in T:X.append(D[key])return X
3
12
1
74
3
220
233
220
null
['T', 'D', 'X']
None
null
0
0
0
null
0
null
The function (sortM20) defined within the public class called public.The function start at line 220 and ends at 233. 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
sortCells
def sortCells(cells,col):#cells is M20,X20,Bravais,a,b,c,alp,bet,gam,volume#sort smallest a,b,c,alpha,beta,gamma or volume 1stT = []for i,M in enumerate(cells):T.append((M[col],i))D = dict(zip(T,cells))T.sort()X = []for key in T:X.append(D[key])return X
3
10
2
70
3
235
246
235
null
['T', 'D', 'X']
None
null
0
0
0
null
0
null
The function (sortCells) defined within the public class called public.The function start at line 235 and ends at 246. It contains 10 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [235.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
findMV.Val2Vec
def Val2Vec(vec,Vref,values):Vec = []i = 0for j,r in enumerate(Vref):if r:if values.size > 1:Vec.append(max(-1.,min(1.0,values[i])))else:Vec.append(max(0.0,min(1.0,values[0])))i += 1else:Vec.append(vec[j])return np.array(Vec,dtype=float)
4
13
3
109
0
250
262
250
null
[]
None
null
0
0
0
null
0
null
The function (findMV.Val2Vec) defined within the public class called public.The function start at line 250 and ends at 262. It contains 13 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [250.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
findMV.ZSSfunc
def ZSSfunc(values,peaks,dmin,Inst,SGData,SSGData,vec,Vref,maxH,A,wave,Z,dlg=None):Vec = Val2Vec(vec,Vref,values)HKL =G2pwd.getHKLMpeak(dmin,Inst,SGData,SSGData,Vec,maxH,A)Peaks = np.array(IndexSSPeaks(peaks,HKL)[1]).TQo = 1./Peaks[-2]**2Qc = G2lat.calc_rDsqZSS(Peaks[4:8],A,Vec,Z,Peaks[0],wave)chi = np.sum((Qo-Qc)**2)i...
2
10
13
141
0
264
273
264
null
[]
None
null
0
0
0
null
0
null
The function (findMV.ZSSfunc) defined within the public class called public.The function start at line 264 and ends at 273. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 13 parameters, represented as [264.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
findMV.TSSfunc
def TSSfunc(values,peaks,dmin,Inst,SGData,SSGData,vec,Vref,maxH,A,difC,Z,dlg=None):Vec = Val2Vec(vec,Vref,values)HKL =G2pwd.getHKLMpeak(dmin,Inst,SGData,SSGData,Vec,maxH,A)Peaks = np.array(IndexSSPeaks(peaks,HKL)[1]).TQo = 1./Peaks[-2]**2Qc = G2lat.calc_rDsqTSS(Peaks[4:8],A,Vec,Z,Peaks[0],difC)chi = np.sum((Qo-Qc)**2)i...
2
10
13
141
0
275
284
275
null
[]
None
null
0
0
0
null
0
null
The function (findMV.TSSfunc) defined within the public class called public.The function start at line 275 and ends at 284. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 13 parameters, represented as [275.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
findMV
def findMV(peaks,controls,ssopt,Inst,deltM,dlg):def Val2Vec(vec,Vref,values):Vec = []i = 0for j,r in enumerate(Vref):if r:if values.size > 1:Vec.append(max(-1.,min(1.0,values[i])))else:Vec.append(max(0.0,min(1.0,values[0])))i += 1else:Vec.append(vec[j])return np.array(Vec,dtype=float) def ZSSfunc(values,peaks,dmin,Inst...
7
28
6
317
19
248
309
248
null
['values', 'i', 'HKL', 'wave', 'Qc', 'Vref', 'chi', 'Qo', 'dT', 'SGData', 'Z', 'difC', 'dmin', 'Peaks', 'Vec', 'ranges', 'result', 'SSGData', 'A']
None
null
0
0
0
null
0
null
The function (findMV) defined within the public class called public.The function start at line 248 and ends at 309. It contains 28 lines of code and it has a cyclomatic complexity of 7. It takes 6 parameters, represented as [248.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
IndexPeaks
def IndexPeaks(peaks,HKL):'needs a doc string'import bisectN = len(HKL)if N == 0: return False,peakshklds = list(np.array(HKL).T[3])+[1000.0,0.0,]hklds.sort()# ascending sort - upper bound at endfor ipk,peak in enumerate(peaks):peak[4:7] = [0,0,0] #clear old indexingpeak[8] = 0.if peak[2]:i = bisect.bisect_right(hklds,...
13
42
2
346
10
311
352
311
null
['hkl', 'pos', 'opeak', 'dnew', 'hklds', 'dold', 'i', 'dp', 'dm', 'N']
None
null
0
0
0
null
0
null
The function (IndexPeaks) defined within the public class called public.The function start at line 311 and ends at 352. It contains 42 lines of code and it has a cyclomatic complexity of 13. It takes 2 parameters, represented as [311.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
IndexSSPeaks
def IndexSSPeaks(peaks,HKL):'needs a doc string'import bisectN = len(HKL)Peaks = np.copy(peaks)if N == 0: return False,Peaksif len(peaks[0]) == 9:#add m column if missingPeaks = np.insert(Peaks,7,np.zeros_like(Peaks.T[0]),axis=1)#for peak in Peaks:#peak.insert(7,0)hklds = list(np.array(HKL).T[4])+[1000.0,0.0,]hklds.sor...
15
46
2
422
12
354
402
354
null
['hkl', 'pos', 'opeak', 'dnew', 'hklds', 'hklmax', 'dold', 'i', 'Peaks', 'dm', 'N', 'dp']
None
null
0
0
0
null
0
null
The function (IndexSSPeaks) defined within the public class called public.The function start at line 354 and ends at 402. It contains 46 lines of code and it has a cyclomatic complexity of 15. It takes 2 parameters, represented as [354.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Values2A
def Values2A(ibrav,values):'needs a doc string'if ibrav in [0,1,2]:return [values[0],values[0],values[0],0,0,0]elif ibrav in [3,4]:return [values[0],values[0],values[1],values[0],0,0]elif ibrav in [5,6]:return [values[0],values[0],values[1],0,0,0]elif ibrav in [7,8,9,10,11,12]:return [values[0],values[1],values[2],0,0,...
6
14
2
199
0
404
417
404
null
[]
None
null
0
0
0
null
0
null
The function (Values2A) defined within the public class called public.The function start at line 404 and ends at 417. It contains 14 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [404.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
A2values
def A2values(ibrav,A):'needs a doc string'if ibrav in [0,1,2]:return [A[0],]elif ibrav in [3,4,5,6]:return [A[0],A[2]]elif ibrav in [7,8,9,10,11,12]:return [A[0],A[1],A[2]]elif ibrav in [13,14,15,16]:return [A[0],A[1],A[2],A[4]]else:return A
5
12
2
125
0
419
430
419
null
[]
None
null
0
0
0
null
0
null
The function (A2values) defined within the public class called public.The function start at line 419 and ends at 430. It contains 12 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [419.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Values2Vec
def Values2Vec(ibrav,vec,Vref,val):if ibrav in [3,4,5,6]:Nskip = 2elif ibrav in [7,8,9,10,11,12]:Nskip = 3elif ibrav in [13,14,15,16]:Nskip = 4else:Nskip = 6Vec = []i = 0for j,r in enumerate(Vref):if r:Vec.append(val[i+Nskip])i += 1else:Vec.append(vec[j])return np.array(Vec)
6
18
4
120
3
432
449
432
null
['Vec', 'Nskip', 'i']
None
null
0
0
0
null
0
null
The function (Values2Vec) defined within the public class called public.The function start at line 432 and ends at 449. It contains 18 lines of code and it has a cyclomatic complexity of 6. It takes 4 parameters, represented as [432.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FitHKL.errFit
def errFit(values,ibrav,d,H,Pwr):A = Values2A(ibrav,values)Qo = 1./d**2Qc = G2lat.calc_rDsqA(H,A)return (Qo-Qc)*d**Pwr
1
5
5
49
0
454
458
454
null
[]
None
null
0
0
0
null
0
null
The function (FitHKL.errFit) defined within the public class called public.The function start at line 454 and ends at 458. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [454.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FitHKL.dervFit
def dervFit(values,ibrav,d,H,Pwr):h,k,l = Hif ibrav in [0,1,2]:derv = [H[0]*H[0]+H[1]*H[1]+H[2]*H[2],]elif ibrav in [3,4,]:derv = [H[0]*H[0]+H[1]*H[1]+H[0]*H[1],H[2]*H[2]]elif ibrav in [5,6]:derv = [H[0]*H[0]+H[1]*H[1],H[2]*H[2]]elif ibrav in [7,8,9,10,11,12]: derv = [h*h,k*k,l*l]elif ibrav in [13,14,15,16]:derv = [h*h...
6
16
5
272
0
460
475
460
null
[]
None
null
0
0
0
null
0
null
The function (FitHKL.dervFit) defined within the public class called public.The function start at line 460 and ends at 475. It contains 16 lines of code and it has a cyclomatic complexity of 6. It takes 5 parameters, represented as [460.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FitHKL
def FitHKL(ibrav,peaks,A,Pwr):'needs a doc string'def errFit(values,ibrav,d,H,Pwr):A = Values2A(ibrav,values)Qo = 1./d**2Qc = G2lat.calc_rDsqA(H,A)return (Qo-Qc)*d**Pwrdef dervFit(values,ibrav,d,H,Pwr):h,k,l = Hif ibrav in [0,1,2]:derv = [H[0]*H[0]+H[1]*H[1]+H[2]*H[2],]elif ibrav in [3,4,]:derv = [H[0]*H[0]+H[1]*H[1]+H...
1
10
4
124
7
451
482
451
null
['Qc', 'result', 'values', 'Peaks', 'Qo', 'A', 'derv']
None
null
0
0
0
null
0
null
The function (FitHKL) defined within the public class called public.The function start at line 451 and ends at 482. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [451.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FitHKLZ.errFitZ
def errFitZ(values,ibrav,d,H,tth,wave,Z,Zref):Zero = Zif Zref:Zero = values[-1]A = Values2A(ibrav,values)Qo = 1./d**2Qc = G2lat.calc_rDsqZ(H,A,Zero,tth,wave)return (Qo-Qc)
2
8
8
70
0
487
494
487
null
[]
None
null
0
0
0
null
0
null
The function (FitHKLZ.errFitZ) defined within the public class called public.The function start at line 487 and ends at 494. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 8 parameters, represented as [487.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FitHKLZ.dervFitZ
def dervFitZ(values,ibrav,d,H,tth,wave,Z,Zref):if ibrav in [0,1,2]:derv = [H[0]*H[0]+H[1]*H[1]+H[2]*H[2],]elif ibrav in [3,4,]:derv = [H[0]*H[0]+H[1]*H[1]+H[0]*H[1],H[2]*H[2]]elif ibrav in [5,6]:derv = [H[0]*H[0]+H[1]*H[1],H[2]*H[2]]elif ibrav in [7,8,9,10,11,12]:derv = [H[0]*H[0],H[1]*H[1],H[2]*H[2]]elif ibrav in [13,...
7
17
8
365
0
496
512
496
null
[]
None
null
0
0
0
null
0
null
The function (FitHKLZ.dervFitZ) defined within the public class called public.The function start at line 496 and ends at 512. It contains 17 lines of code and it has a cyclomatic complexity of 7. It takes 8 parameters, represented as [496.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FitHKLZ
def FitHKLZ(wave,ibrav,peaks,A,Z,Zref):'needs a doc string'def errFitZ(values,ibrav,d,H,tth,wave,Z,Zref):Zero = Zif Zref:Zero = values[-1]A = Values2A(ibrav,values)Qo = 1./d**2Qc = G2lat.calc_rDsqZ(H,A,Zero,tth,wave)return (Qo-Qc)def dervFitZ(values,ibrav,d,H,tth,wave,Z,Zref):if ibrav in [0,1,2]:derv = [H[0]*H[0]+H[1]*...
3
15
6
179
10
484
524
484
null
['chisq', 'Z', 'Qc', 'result', 'values', 'Zero', 'Peaks', 'Qo', 'A', 'derv']
None
null
0
0
0
null
0
null
The function (FitHKLZ) defined within the public class called public.The function start at line 484 and ends at 524. It contains 15 lines of code and it has a cyclomatic complexity of 3. It takes 6 parameters, represented as [484.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FitHKLZSS.errFitZSS
def errFitZSS(values,ibrav,d,H,tth,wave,vec,Vref,Z,Zref):Zero = Zif Zref:Zero = values[-1]A = Values2A(ibrav,values)Vec = Values2Vec(ibrav,vec,Vref,values)Qo = 1./d**2Qc = G2lat.calc_rDsqZSS(H,A,Vec,Zero,tth,wave)return (Qo-Qc)
2
9
10
88
0
529
537
529
null
[]
None
null
0
0
0
null
0
null
The function (FitHKLZSS.errFitZSS) defined within the public class called public.The function start at line 529 and ends at 537. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 10 parameters, represented as [529.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FitHKLZSS.dervFitZSS
def dervFitZSS(values,ibrav,d,H,tth,wave,vec,Vref,Z,Zref):A = Values2A(ibrav,values)Vec = Values2Vec(ibrav,vec,Vref,values)HM = H[:3]+(H[3][:,np.newaxis]*Vec).Tif ibrav in [3,4,]:derv = [HM[0]*HM[0]+HM[1]*HM[1]+HM[0]*HM[1],HM[2]*HM[2]]elif ibrav in [5,6]:derv = [HM[0]*HM[0]+HM[1]*HM[1],HM[2]*HM[2]]elif ibrav in [7,8,9,...
9
24
10
543
0
539
562
539
null
[]
None
null
0
0
0
null
0
null
The function (FitHKLZSS.dervFitZSS) defined within the public class called public.The function start at line 539 and ends at 562. It contains 24 lines of code and it has a cyclomatic complexity of 9. It takes 10 parameters, represented as [539.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FitHKLZSS
def FitHKLZSS(wave,ibrav,peaks,A,V,Vref,Z,Zref):'needs a doc string'def errFitZSS(values,ibrav,d,H,tth,wave,vec,Vref,Z,Zref):Zero = Zif Zref:Zero = values[-1]A = Values2A(ibrav,values)Vec = Values2Vec(ibrav,vec,Vref,values)Qo = 1./d**2Qc = G2lat.calc_rDsqZSS(H,A,Vec,Zero,tth,wave)return (Qo-Qc)def dervFitZSS(values,ibr...
5
19
8
227
12
526
578
526
null
['chisq', 'Z', 'Qc', 'result', 'values', 'Zero', 'Peaks', 'HM', 'Vec', 'Qo', 'A', 'derv']
None
null
0
0
0
null
0
null
The function (FitHKLZSS) defined within the public class called public.The function start at line 526 and ends at 578. It contains 19 lines of code and it has a cyclomatic complexity of 5. It takes 8 parameters, represented as [526.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FitHKLT.errFitT
def errFitT(values,ibrav,d,H,tof,difC,Z,Zref):Zero = Zif Zref:Zero = values[-1]A = Values2A(ibrav,values)Qo = 1./d**2Qc = G2lat.calc_rDsqT(H,A,Zero,tof,difC)return (Qo-Qc)
2
8
8
70
0
583
590
583
null
[]
None
null
0
0
0
null
0
null
The function (FitHKLT.errFitT) defined within the public class called public.The function start at line 583 and ends at 590. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 8 parameters, represented as [583.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FitHKLT.dervFitT
def dervFitT(values,ibrav,d,H,tof,difC,Z,Zref):if ibrav in [0,1,2]:derv = [H[0]*H[0]+H[1]*H[1]+H[2]*H[2],]elif ibrav in [3,4,]:derv = [H[0]*H[0]+H[1]*H[1]+H[0]*H[1],H[2]*H[2]]elif ibrav in [5,6]:derv = [H[0]*H[0]+H[1]*H[1],H[2]*H[2]]elif ibrav in [7,8,9,10,11,12]:derv = [H[0]*H[0],H[1]*H[1],H[2]*H[2]]elif ibrav in [13,...
7
17
8
358
0
592
608
592
null
[]
None
null
0
0
0
null
0
null
The function (FitHKLT.dervFitT) defined within the public class called public.The function start at line 592 and ends at 608. It contains 17 lines of code and it has a cyclomatic complexity of 7. It takes 8 parameters, represented as [592.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FitHKLT
def FitHKLT(difC,ibrav,peaks,A,Z,Zref):'needs a doc string'def errFitT(values,ibrav,d,H,tof,difC,Z,Zref):Zero = Zif Zref:Zero = values[-1]A = Values2A(ibrav,values)Qo = 1./d**2Qc = G2lat.calc_rDsqT(H,A,Zero,tof,difC)return (Qo-Qc)def dervFitT(values,ibrav,d,H,tof,difC,Z,Zref):if ibrav in [0,1,2]:derv = [H[0]*H[0]+H[1]*...
3
15
6
175
10
580
620
580
null
['chisq', 'Z', 'Qc', 'result', 'values', 'Zero', 'Peaks', 'Qo', 'A', 'derv']
None
null
0
0
0
null
0
null
The function (FitHKLT) defined within the public class called public.The function start at line 580 and ends at 620. It contains 15 lines of code and it has a cyclomatic complexity of 3. It takes 6 parameters, represented as [580.0] and does not return any value..