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
PDFfitSizer.PDFfitSizer.PDFParmSizer.OnRefine
def OnRefine(event):Obj = event.GetEventObject()name = Indx[Obj.GetId()]RMCPdict[name][1] = not RMCPdict[name][1]
1
4
1
38
0
1,468
1,471
1,468
null
[]
None
null
0
0
0
null
0
null
The function (PDFfitSizer.PDFfitSizer.PDFParmSizer.OnRefine) defined within the public class called public.The function start at line 1468 and ends at 1471. 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
PDFfitSizer.PDFParmSizer
def PDFParmSizer():def OnShape(event):RMCPdict['shape'] = shape.GetValue()wx.CallAfter(UpdateRMC,G2frame,data)parmSizer = wx.FlexGridSizer(3,6,5,5)Names = ['delta1','delta2','sratio','rcut','spdiameter']Names2 = ['stepcut',]for name in Names:def OnRefine(event):Obj = event.GetEventObject()name = Indx[Obj.GetId()]RMCPdi...
7
31
0
385
0
1,457
1,497
1,457
null
[]
None
null
0
0
0
null
0
null
The function (PDFfitSizer.PDFParmSizer) defined within the public class called public.The function start at line 1457 and ends at 1497. It contains 31 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
PDFfitSizer.OnSpaceGroup
def OnSpaceGroup(event):# try a lookup on the user-supplied nameSpcGp = G2phsG.GetSpGrpfromUser(G2frame.FRMC,SpGrp)SGErr,SGData = G2spc.SpcGroup(SpcGp)if SGErr:text = [G2spc.SGErrors(SGErr)+'\nSpace Group set to previous']SGTxt.SetLabel(RMCPdict.get('Target SpGrp','P 1'))msg = 'Space Group Error'Text = '\n'.join(text)w...
2
16
1
139
0
1,499
1,515
1,499
null
[]
None
null
0
0
0
null
0
null
The function (PDFfitSizer.OnSpaceGroup) defined within the public class called public.The function start at line 1499 and ends at 1515. It contains 16 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
PDFfitSizer.OnCellRef
def OnCellRef(event):RMCPdict['cellref'] = not RMCPdict['cellref']
1
2
1
15
0
1,517
1,518
1,517
null
[]
None
null
0
0
0
null
0
null
The function (PDFfitSizer.OnCellRef) defined within the public class called public.The function start at line 1517 and ends at 1518. 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
PDFfitSizer.PDFfitSizer.AtomSizer.OnSetVal
def OnSetVal(event):r,c = event.GetRow(),event.GetCol()if c > 0:strval = atmGrid.GetCellValue(r,c).strip()try:#if strval == '' or ('@' in strval and int(strval.split('@')[-1]) >= 20):if strval == '' or '@' in strval:RMCPdict['AtomConstr'][r][c+1] = strvalelse:raise ValueErrorexcept ValueError:atmGrid.SetCellValue(r,c,R...
5
14
1
114
0
1,522
1,536
1,522
null
[]
None
null
0
0
0
null
0
null
The function (PDFfitSizer.PDFfitSizer.AtomSizer.OnSetVal) defined within the public class called public.The function start at line 1522 and ends at 1536. 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
PDFfitSizer.PDFfitSizer.AtomSizer.OnUisoRefine
def OnUisoRefine(event):RMCPdict['UisoRefine'] = uiso.GetValue()nextP = 80oType = ''oName = ''for atom in RMCPdict['AtomConstr']:if RMCPdict['UisoRefine'] == 'No':atom[6] = ''elif 'same' in RMCPdict['UisoRefine']:atom[6] = '@81'RMCPdict['AtomVar']['@81'] = 0.005elif 'type' in RMCPdict['UisoRefine']:if atom[1] != oType:...
8
24
1
173
0
1,538
1,561
1,538
null
[]
None
null
0
0
0
null
0
null
The function (PDFfitSizer.PDFfitSizer.AtomSizer.OnUisoRefine) defined within the public class called public.The function start at line 1538 and ends at 1561. 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
PDFfitSizer.AtomSizer
def AtomSizer():def OnSetVal(event):r,c = event.GetRow(),event.GetCol()if c > 0:strval = atmGrid.GetCellValue(r,c).strip()try:#if strval == '' or ('@' in strval and int(strval.split('@')[-1]) >= 20):if strval == '' or '@' in strval:RMCPdict['AtomConstr'][r][c+1] = strvalelse:raise ValueErrorexcept ValueError:atmGrid.Se...
5
29
0
294
0
1,520
1,589
1,520
null
[]
None
null
0
0
0
null
0
null
The function (PDFfitSizer.AtomSizer) defined within the public class called public.The function start at line 1520 and ends at 1589. It contains 29 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
PDFfitSizer.AtomVarSizer
def AtomVarSizer():atomVarSizer = wx.FlexGridSizer(0,8,5,5)for item in RMCPdict['AtomVar']:atomVarSizer.Add(wx.StaticText(G2frame.FRMC,label=item),0,WACV)atomVarSizer.Add(G2G.ValidatedTxtCtrl(G2frame.FRMC,RMCPdict['AtomVar'],item,xmin=-3.,xmax=3.,size=(70,25)),0,WACV)return atomVarSizer
2
7
0
92
0
1,591
1,597
1,591
null
[]
None
null
0
0
0
null
0
null
The function (PDFfitSizer.AtomVarSizer) defined within the public class called public.The function start at line 1591 and ends at 1597. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PDFfitSizer
def PDFfitSizer(data):mainSizer = wx.BoxSizer(wx.VERTICAL)Indx = {}def PDFParmSizer():def OnShape(event):RMCPdict['shape'] = shape.GetValue()wx.CallAfter(UpdateRMC,G2frame,data)parmSizer = wx.FlexGridSizer(3,6,5,5)Names = ['delta1','delta2','sratio','rcut','spdiameter']Names2 = ['stepcut',]for name in Names:def OnRefin...
17
81
1
973
0
1,453
1,683
1,453
null
[]
None
null
0
0
0
null
0
null
The function (PDFfitSizer) defined within the public class called public.The function start at line 1453 and ends at 1683. It contains 81 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
SphereFF
def SphereFF(Q,R,args=()):''' Compute hard sphere form factor - can use numpy arrays:param float Q: Q value array (usually in A-1):param float R: sphere radius (Usually in A - must match Q-1 units):param array args: ignored:returns: form factors as array as needed (float)'''QR = Q[:,np.newaxis]*Rreturn (3./(QR**3))*(np...
1
3
3
56
1
40
48
40
null
['QR']
None
null
0
0
0
null
0
null
The function (SphereFF) defined within the public class called public.The function start at line 40 and ends at 48. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [40.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SphericalShellFF
def SphericalShellFF(Q,R,args=()):''' Compute spherical shell form factor - can use numpy arrays:param float Q: Q value array (usually in A-1):param float R: sphere radius (Usually in A - must match Q-1 units):param array args: [float r]: controls the shell thickness: R_inner = min(r*R,R), R_outer = max(r*R,R):returns ...
3
8
3
66
1
50
65
50
null
['r']
None
null
0
0
0
null
0
null
The function (SphericalShellFF) defined within the public class called public.The function start at line 50 and ends at 65. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [50.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SpheroidFF
def SpheroidFF(Q,R,args):''' Compute form factor of cylindrically symmetric ellipsoid (spheroid) - can use numpy arrays for R & AR; will return corresponding numpy arrayparam float Q : Q value array (usually in A-1)param float R: radius along 2 axes of spheroidparam array args: [float AR]: aspect ratio so 3rd axis = R*...
3
12
3
147
4
67
85
67
null
['Rct', 'cth', 'NP', 'AR']
None
null
0
0
0
null
0
null
The function (SpheroidFF) defined within the public class called public.The function start at line 67 and ends at 85. It contains 12 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [67.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CylinderFF
def CylinderFF(Q,R,args):''' Compute form factor for cylinders - can use numpy arraysparam float Q: Q value array (A-1)param float R: cylinder radius (A)param array args: [float L]: cylinder length (A)returns float: form factor'''L = args[0]NP = 200alp = np.linspace(0,np.pi/2.,NP)QL = Q[:,np.newaxis]*LLBessArg = 0.5*QL...
1
12
3
196
10
87
104
87
null
['L', 'LBessArg', 'SBessArg', 'SBess', 'LSBess', 'LBess', 'QR', 'alp', 'NP', 'QL']
None
null
0
0
0
null
0
null
The function (CylinderFF) defined within the public class called public.The function start at line 87 and ends at 104. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [87.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CylinderDFF
def CylinderDFF(Q,L,args):''' Compute form factor for cylinders - can use numpy arraysparam float Q: Q value array (A-1)param float L: cylinder half length (A)param array args: [float R]: cylinder radius (A)returns float: form factor'''R = args[0]return CylinderFF(Q,R,args=[2.*L])
1
3
3
32
1
106
114
106
null
['R']
None
null
0
0
0
null
0
null
The function (CylinderDFF) defined within the public class called public.The function start at line 106 and ends at 114. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [106.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CylinderARFF
def CylinderARFF(Q,R,args): ''' Compute form factor for cylinders - can use numpy arraysparam float Q: Q value array (A-1)param float R: cylinder radius (A)param array args: [float AR]: cylinder aspect ratio = L/D = L/2Rreturns float: form factor'''AR = args[0]return CylinderFF(Q,R,args=[2.*R*AR])
1
3
3
34
1
116
124
116
null
['AR']
None
null
0
0
0
null
0
null
The function (CylinderARFF) defined within the public class called public.The function start at line 116 and ends at 124. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [116.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UniSphereFF
def UniSphereFF(Q,R,args=0):''' Compute form factor for unified sphere - can use numpy arraysparam float Q: Q value array (A-1)param float R: cylinder radius (A)param array args: ignoredreturns float: form factor'''Rg = np.sqrt(3./5.)*RB = np.pi*1.62/(Rg**4)#are we missing *np.pi? 1.62 = 6*(3/5)**2/(4/3) sense?QstV = Q...
1
5
3
117
3
126
136
126
null
['B', 'QstV', 'Rg']
None
null
0
0
0
null
0
null
The function (UniSphereFF) defined within the public class called public.The function start at line 126 and ends at 136. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [126.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UniRodFF
def UniRodFF(Q,R,args):''' Compute form factor for unified rod - can use numpy arraysparam float Q: Q value array (A-1)param float R: cylinder radius (A)param array args: [float R]: cylinder radius (A)returns float: form factor'''L = args[0]Rg2 = np.sqrt(R**2/2+L**2/12)B2 = np.pi/LRg1 = np.sqrt(3.)*R/2.G1 = (2./3.)*R/L...
1
12
3
259
8
138
155
138
null
['B2', 'Rg1', 'QstV', 'FF', 'L', 'Rg2', 'G1', 'B1']
None
null
0
0
0
null
0
null
The function (UniRodFF) defined within the public class called public.The function start at line 138 and ends at 155. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [138.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UniRodARFF
def UniRodARFF(Q,R,args):''' Compute form factor for unified rod of fixed aspect ratio - can use numpy arraysparam float Q: Q value array (A-1)param float R: cylinder radius (A)param array args: [float AR]: cylinder aspect ratio = L/D = L/2Rreturns float: form factor'''AR = args[0]return UniRodFF(Q,R,args=[2.*AR*R,])
1
3
3
35
1
157
165
157
null
['AR']
None
null
0
0
0
null
0
null
The function (UniRodARFF) defined within the public class called public.The function start at line 157 and ends at 165. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [157.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UniDiskFF
def UniDiskFF(Q,R,args):''' Compute form factor for unified disk - can use numpy arraysparam float Q: Q value array (A-1)param float R: cylinder radius (A)param array args: [float T]: disk thickness (A)returns float: form factor'''T = args[0]Rg2 = np.sqrt(R**2/2.+T**2/12.)B2 = 2./R**2Rg1 = np.sqrt(3.)*T/2.RgC2 = 1.1*Rg...
1
13
3
275
9
167
185
167
null
['B2', 'Rg1', 'QstV', 'FF', 'RgC2', 'T', 'Rg2', 'G1', 'B1']
None
null
0
0
0
null
0
null
The function (UniDiskFF) defined within the public class called public.The function start at line 167 and ends at 185. It contains 13 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [167.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UniTubeFF
def UniTubeFF(Q,R,args):''' Compute form factor for unified tube - can use numpy arraysassumes that core of tube is same as the matrix/solvent so contrastis from tube wall vs matrixparam float Q: Q value array (A-1)param float R: cylinder radius (A)param array args: [float L,T]: tube length & wall thickness(A)returns f...
1
16
3
317
9
187
210
187
null
['DR2', 'Rg3', 'B2', 'QstV', 'FF', 'Vt', 'B3', 'Ri', 'B1']
None
null
0
0
0
null
0
null
The function (UniTubeFF) defined within the public class called public.The function start at line 187 and ends at 210. It contains 16 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [187.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SphereVol
def SphereVol(R,args=()):''' Compute volume of sphere- numpy array friendlyparam float R: sphere radiusparam array args: ignoredreturns float: volume'''return (4./3.)*np.pi*R**3
1
2
2
27
0
216
223
216
null
[]
None
null
0
0
0
null
0
null
The function (SphereVol) defined within the public class called public.The function start at line 216 and ends at 223. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [216.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SphericalShellVol
def SphericalShellVol(R,args):''' Compute volume of spherical shell- numpy array friendlyparam float R: sphere radiusparam array args: [float r]: controls shell thickness, see SphericalShellFF descriptionreturns float: volume'''r = args[0]if r < 0:r = 0if r < 1:return SphereVol(R) - SphereVol(R*r)else:return SphereVol(...
3
8
2
53
1
225
238
225
null
['r']
None
null
0
0
0
null
0
null
The function (SphericalShellVol) defined within the public class called public.The function start at line 225 and ends at 238. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [225.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SpheroidVol
def SpheroidVol(R,args):''' Compute volume of cylindrically symmetric ellipsoid (spheroid) - numpy array friendlyparam float R: radius along 2 axes of spheroidparam array args: [float AR]: aspect ratio so radius of 3rd axis = R*ARreturns float: volume'''AR = args[0]return AR*SphereVol(R)
1
3
2
21
1
240
248
240
null
['AR']
None
null
0
0
0
null
0
null
The function (SpheroidVol) defined within the public class called public.The function start at line 240 and ends at 248. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [240.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CylinderVol
def CylinderVol(R,args):''' Compute cylinder volume for radius & length- numpy array friendlyparam float R: diameter (A)param array args: [float L]: length (A)returns float:volume (A^3)'''L = args[0]return np.pi*L*R**2
1
3
2
24
1
250
258
250
null
['L']
None
null
0
0
0
null
0
null
The function (CylinderVol) defined within the public class called public.The function start at line 250 and ends at 258. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [250.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CylinderDVol
def CylinderDVol(L,args):''' Compute cylinder volume for length & diameter- numpy array friendlyparam float: L half length (A)param array args: [float D]: diameter (A)returns float:volume (A^3)'''D = args[0]return CylinderVol(D/2.,[2.*L,])
1
3
2
30
1
260
268
260
null
['D']
None
null
0
0
0
null
0
null
The function (CylinderDVol) defined within the public class called public.The function start at line 260 and ends at 268. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [260.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CylinderARVol
def CylinderARVol(R,args):''' Compute cylinder volume for radius & aspect ratio = L/D- numpy array friendlyparam float: R radius (A)param array args: [float AR]: =L/D=L/2R aspect ratioreturns float:volume'''AR = args[0]return CylinderVol(R,[2.*R*AR,])
1
3
2
29
1
270
278
270
null
['AR']
None
null
0
0
0
null
0
null
The function (CylinderARVol) defined within the public class called public.The function start at line 270 and ends at 278. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [270.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UniSphereVol
def UniSphereVol(R,args=()):''' Compute volume of sphere- numpy array friendlyparam float R: sphere radiusparam array args: ignoredreturns float: volume'''return SphereVol(R)
1
2
2
16
0
280
287
280
null
[]
None
null
0
0
0
null
0
null
The function (UniSphereVol) defined within the public class called public.The function start at line 280 and ends at 287. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [280.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UniRodVol
def UniRodVol(R,args):''' Compute cylinder volume for radius & length- numpy array friendlyparam float R: diameter (A)param array args: [float L]: length (A)returns float:volume (A^3)'''L = args[0]return CylinderVol(R,[L,])
1
3
2
24
1
289
297
289
null
['L']
None
null
0
0
0
null
0
null
The function (UniRodVol) defined within the public class called public.The function start at line 289 and ends at 297. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [289.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UniRodARVol
def UniRodARVol(R,args):''' Compute rod volume for radius & aspect ratio- numpy array friendlyparam float R: diameter (A)param array args: [float AR]: =L/D=L/2R aspect ratioreturns float:volume (A^3)'''AR = args[0]return CylinderARVol(R,[AR,])
1
3
2
24
1
299
307
299
null
['AR']
None
null
0
0
0
null
0
null
The function (UniRodARVol) defined within the public class called public.The function start at line 299 and ends at 307. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [299.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UniDiskVol
def UniDiskVol(R,args):''' Compute disk volume for radius & thickness- numpy array friendlyparam float R: diameter (A)param array args: [float T]: thicknessreturns float:volume (A^3)'''T = args[0]return CylinderVol(R,[T,])
1
3
2
24
1
309
317
309
null
['T']
None
null
0
0
0
null
0
null
The function (UniDiskVol) defined within the public class called public.The function start at line 309 and ends at 317. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [309.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UniTubeVol
def UniTubeVol(R,args):''' Compute tube volume for radius, length & wall thickness- numpy array friendlyparam float R: diameter (A)param array args: [float L,T]: tube length & wall thickness(A)returns float: volume (A^3) of tube wall'''L,T = args[:2]return CylinderVol(R,[L,])-CylinderVol(R-T,[L,])
1
3
2
39
0
319
327
319
null
[]
None
null
0
0
0
null
0
null
The function (UniTubeVol) defined within the public class called public.The function start at line 319 and ends at 327. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [319.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
LogNormalDist
def LogNormalDist(x,pos,args):''' Standard LogNormal distribution - numpy friendly on x axisref: http://www.itl.nist.gov/div898/handbook/index.htm 1.3.6.6.9param float x: independent axis (can be numpy array)param float pos: location of distributionparam float scale: width of distribution (m)param float shape: shape - ...
1
3
3
67
0
333
343
333
null
[]
None
null
0
0
0
null
0
null
The function (LogNormalDist) defined within the public class called public.The function start at line 333 and ends at 343. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [333.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GaussDist
def GaussDist(x,pos,args):''' Standard Normal distribution - numpy friendly on x axisparam float x: independent axis (can be numpy array)param float pos: location of distributionparam float scale: width of distribution (sigma)param float shape: not usedreturns float: Normal distribution'''scale = args[0]return (1./(sca...
1
3
3
60
1
345
354
345
null
['scale']
None
null
0
0
0
null
0
null
The function (GaussDist) defined within the public class called public.The function start at line 345 and ends at 354. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [345.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
LSWDist
def LSWDist(x,pos,args=[]):''' Lifshitz-Slyozov-Wagner Ostwald ripening distribution - numpy friendly on x axisref: param float x: independent axis (can be numpy array)param float pos: location of distributionparam float scale: not usedparam float shape: not usedreturns float: LSW distribution'''redX = x/posresult = (8...
1
4
3
96
2
356
368
356
null
['result', 'redX']
None
null
0
0
0
null
0
null
The function (LSWDist) defined within the public class called public.The function start at line 356 and ends at 368. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [356.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SchulzZimmDist
def SchulzZimmDist(x,pos,args):''' Schulz-Zimm macromolecule distribution - numpy friendly on x axisref: http://goldbook.iupac.org/S05502.htmlparam float x: independent axis (can be numpy array)param float pos: location of distributionparam float scale: width of distribution (sigma)param float shape: not usedreturns fl...
2
8
3
119
3
370
385
370
null
['scale', 'b', 'a']
None
null
0
0
0
null
0
null
The function (SchulzZimmDist) defined within the public class called public.The function start at line 370 and ends at 385. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [370.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
LogNormalCume
def LogNormalCume(x,pos,args):''' Standard LogNormal cumulative distribution - numpy friendly on x axisref: http://www.itl.nist.gov/div898/handbook/index.htm 1.3.6.6.9param float x: independent axis (can be numpy array)param float pos: location of distributionparam float scale: width of distribution (sigma)param float ...
1
4
3
56
1
387
398
387
null
['lredX']
None
null
0
0
0
null
0
null
The function (LogNormalCume) defined within the public class called public.The function start at line 387 and ends at 398. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [387.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GaussCume
def GaussCume(x,pos,args):''' Standard Normal cumulative distribution - numpy friendly on x axisparam float x: independent axis (can be numpy array)param float pos: location of distributionparam float scale: width of distribution (sigma)param float shape: not usedreturns float: Normal cumulative distribution'''scale = ...
1
4
3
48
2
400
410
400
null
['scale', 'redX']
None
null
0
0
0
null
0
null
The function (GaussCume) defined within the public class called public.The function start at line 400 and ends at 410. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [400.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
LSWCume
def LSWCume(x,pos,args=[]):''' Lifshitz-Slyozov-Wagner Ostwald ripening cumulative distribution - numpy friendly on x axisparam float x: independent axis (can be numpy array)param float pos: location of distributionparam float scale: not usedparam float shape: not usedreturns float: LSW cumulative distribution'''nP = 5...
1
8
3
105
5
412
426
412
null
['fxn', 'mat', 'nP', 'cume', 'X']
None
null
0
0
0
null
0
null
The function (LSWCume) defined within the public class called public.The function start at line 412 and ends at 426. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [412.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SchulzZimmCume
def SchulzZimmCume(x,pos,args):''' Schulz-Zimm cumulative distribution - numpy friendly on x axisparam float x: independent axis (can be numpy array)param float pos: location of distributionparam float scale: width of distribution (sigma)param float shape: not usedreturns float: Normal distribution'''scale = args[0]nP ...
1
11
3
131
8
428
446
428
null
['fxn', 'mat', 'scale', 'xMax', 'nP', 'xMin', 'cume', 'X']
None
null
0
0
0
null
0
null
The function (SchulzZimmCume) defined within the public class called public.The function start at line 428 and ends at 446. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [428.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
DiluteSF
def DiluteSF(Q,args=[]):''' Default: no structure factor correction for dilute system'''return np.ones_like(Q)#or return 1.0
1
2
2
18
0
452
455
452
null
[]
None
null
0
0
0
null
0
null
The function (DiluteSF) defined within the public class called public.The function start at line 452 and ends at 455. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [452.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
HardSpheresSF
def HardSpheresSF(Q,args):''' Computes structure factor for not dilute monodisperse hard spheresRefs.: PERCUS,YEVICK PHYS. REV. 110 1 (1958),THIELE J. CHEM PHYS. 39 474 (1968),WERTHEIMPHYS. REV. LETT. 47 1462 (1981)param float Q: Q value array (A-1)param array args: [float R, float VolFrac]: interparticle distance & vo...
1
19
2
232
16
457
484
457
null
['A2', 'cgam', 'num', 'Rca', 'A3', 'bet', 'A4', 'denom', 'Rsa', 'calp', 'cbet', 'C', 'pfac', 'A', 'gamm', 'alp']
None
null
0
0
0
null
0
null
The function (HardSpheresSF) defined within the public class called public.The function start at line 457 and ends at 484. It contains 19 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [457.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SquareWellSF
def SquareWellSF(Q,args):'''Computes structure factor for not dilute monodisperse hard sphere with asquare well potential interaction. Refs.: SHARMA,SHARMA, PHYSICA 89A,(1977),213-:param float Q: Q value array (A-1):param array args: [float R, float VolFrac, float depth, float width]: interparticle distance, volume fra...
1
23
2
351
18
486
521
486
null
['CK', 'eta3', 'etam1', 'eta4', 'bet', 'SK2', 'SK3', 'T4', 'T1', 'eta2', 'eta', 'etam14', 'gam', 'SK4', 'SK', 'T3', 'T2', 'alp']
None
null
0
0
0
null
0
null
The function (SquareWellSF) defined within the public class called public.The function start at line 486 and ends at 521. It contains 23 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [486.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
StickyHardSpheresSF
def StickyHardSpheresSF(Q,args):''' Computes structure factor for not dilute monodisperse hard spheresRefs.: PERCUS,YEVICK PHYS. REV. 110 1 (1958),THIELE J. CHEM PHYS. 39 474 (1968),WERTHEIMPHYS. REV. LETT. 47 1462 (1981)param float Q: Q value array (A-1)param array args: [float R, float VolFrac]: sphere radius & volum...
1
31
2
419
28
523
566
523
null
['qb', 'dc', 'qc', 'aq2', 'etam1', 'ds', 'bet', 'lam2', 'kk', 'bq', 'mu', 'aq3', 'sq', 'aa', 'aq1', 'aq', 'k2', 'qa', 'bq1', 'bq2', 'radic', 'eta', 'sig', 'k3', 'lam1', 'lam', 'bq3', 'alp']
None
null
0
0
0
null
0
null
The function (StickyHardSpheresSF) defined within the public class called public.The function start at line 523 and ends at 566. It contains 31 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [523.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
InterPrecipitateSF
def InterPrecipitateSF(Q,args):''' Computes structure factor for precipitates in a matrixRefs.: E-Wen Huang, Peter K. Liaw, Lionel Porcar, Yun Liu, Yee-Lang Liu, Ji-Jung Kai, and Wei-Ren Chen,APPLIED PHYSICS LETTERS 93, 161904 (2008)R. Giordano, A. Grasso, and J. Teixeira, Phys. Rev. A 43, 68941991param float Q: Q valu...
1
6
2
94
3
571
584
571
null
['top', 'QV2', 'bot']
None
null
0
0
0
null
0
null
The function (InterPrecipitateSF) defined within the public class called public.The function start at line 571 and ends at 584. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [571.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
G_matrix
def G_matrix(q,r,contrast,FFfxn,Volfxn,args=()):'''Calculates the response matrix :math:`G(Q,r)` :param float q: :math:`Q`:param float r: :math:`r`:param float contrast: :math:`|\\Delta\\rho|^2`, the scattering contrast:param function FFfxn: form factor function FF(q,r,args):param function Volfxn: volume function Vol(r...
1
4
6
55
2
590
602
590
null
['Vol', 'FF']
None
null
0
0
0
null
0
null
The function (G_matrix) defined within the public class called public.The function start at line 590 and ends at 602. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [590.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
MaxEnt_SB.tropus
def tropus (data, G):'''tropus: transform data-space -> solution-space:[G] * datadefault definition, caller can use this definition or provide an alternative:param float[M] data: observations, ndarray of shape (M):param float[M][N] G: transformation matrix, ndarray of shape (M,N):returns float[N]: calculated image, nda...
1
2
2
15
0
659
669
659
null
[]
None
null
0
0
0
null
0
null
The function (MaxEnt_SB.tropus) defined within the public class called public.The function start at line 659 and ends at 669. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [659.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
MaxEnt_SB.opus
def opus (image, G):'''opus: transform solution-space -> data-space:[G]^tr * imagedefault definition, caller can use this definition or provide an alternative:param float[N] image: solution, ndarray of shape (N):param float[M][N] G: transformation matrix, ndarray of shape (M,N):returns float[M]: calculated data, ndarra...
1
2
2
19
0
671
681
671
null
[]
None
null
0
0
0
null
0
null
The function (MaxEnt_SB.opus) defined within the public class called public.The function start at line 671 and ends at 681. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [671.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
MaxEnt_SB.Dist
def Dist(s2, beta):'''measure the distance of this possible solution'''w = 0n = beta.shape[0]for k in range(n):z = -sum(s2[k] * beta)w += beta[k] * zreturn w
2
7
2
49
0
683
690
683
null
[]
None
null
0
0
0
null
0
null
The function (MaxEnt_SB.Dist) defined within the public class called public.The function start at line 683 and ends at 690. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [683.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
MaxEnt_SB.ChiNow
def ChiNow(ax, c1, c2, s1, s2):'''ChiNow:returns tuple: (ChiNow computation of ``w``, beta)'''bx = 1 - axa = bx * c2-ax * s2b = -(bx * c1-ax * s1)beta = ChoSol(a, b)w = 1.0for k in range(SEARCH_DIRECTIONS):w += beta[k] * (c1[k] + 0.5*sum(c2[k] * beta))return w, beta
2
9
5
92
0
692
707
692
null
[]
None
null
0
0
0
null
0
null
The function (MaxEnt_SB.ChiNow) defined within the public class called public.The function start at line 692 and ends at 707. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 5 parameters, represented as [692.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
MaxEnt_SB.ChoSol
def ChoSol(a, b):'''ChoSol: ? chop the solution vectors ?:returns: new vector beta'''n = b.shape[0]fl = np.zeros((n,n))bl = np.zeros_like(b)#print_arr("ChoSol: a", a)#print_vec("ChoSol: b", b)if (a[0][0] <= 0):msg = "ChoSol: a[0][0] = " msg += str(a[0][0])msg += 'Value must be positive'raise MaxEntException(msg)# first...
10
36
2
386
0
709
767
709
null
[]
None
null
0
0
0
null
0
null
The function (MaxEnt_SB.ChoSol) defined within the public class called public.The function start at line 709 and ends at 767. It contains 36 lines of code and it has a cyclomatic complexity of 10. It takes 2 parameters, represented as [709.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
MaxEnt_SB.MaxEntMove
def MaxEntMove(fSum, blank, chisq, chizer, c1, c2, s1, s2):'''move beta one step closer towards the solution'''a_lower, a_upper = 0., 1.# bracket"a"cmin, beta = ChiNow (a_lower, c1, c2, s1, s2)#print "MaxEntMove: cmin = %g" % cminif cmin*chisq > chizer:ctarg = (1.0 + cmin)/2else:ctarg = chizer/chisqf_lower = cmin - cta...
10
33
8
274
0
769
809
769
null
[]
None
null
0
0
0
null
0
null
The function (MaxEnt_SB.MaxEntMove) defined within the public class called public.The function start at line 769 and ends at 809. It contains 33 lines of code and it has a cyclomatic complexity of 10. It takes 8 parameters, represented as [769.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
MaxEnt_SB
def MaxEnt_SB(datum, sigma, G, base, IterMax, image_to_data=None, data_to_image=None, report=False):'''do the complete Maximum Entropy algorithm of Skilling and Bryan:param float datum[]::param float sigma[]::param float[][] G: transformation matrix:param float base[]::param int IterMax::param obj image_to_data: opus f...
14
89
8
919
50
635
928
635
null
['bx', 'test', 'fChange', 'c1', 'MAX_MOVE_LOOPS', 'cnorm', 'loop', 'f', 'fSum', 'z', 'msg', 'fx', 'xi', 'n', 'image_to_data', 'blank', 'tnorm', 'DISTANCE_LIMIT_FACTOR', 'ctarg', 'f_lower', 'snorm', 'w', 's1', 'TEST_LIMIT', 'chtarg', 'npt', 'm', 'f_old', 'SEARCH_DIRECTIONS', 'f_upper', 's2', 'a', 'b', 'CHI_SQR_LIMIT', '...
None
null
0
0
0
null
0
null
The function (MaxEnt_SB) defined within the public class called public.The function start at line 635 and ends at 928. It contains 89 lines of code and it has a cyclomatic complexity of 14. It takes 8 parameters, represented as [635.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
IPG
def IPG(datum,sigma,G,Bins,Dbins,IterMax,Qvec=[],approach=0.8,Power=-1,report=False):''' An implementation of the Interior-Point Gradient method of Michael Merritt & Yin Zhang, Technical Report TR04-08, Dept. of Comp. and Appl. Math., Rice Univ., Houston, Texas 77005, U.S.A. found on the web athttp://www.caam.rice.edu/...
6
34
10
355
19
935
986
935
null
['QvecP', 'Bvec', 'err', 'shift', 'IntE', 'GmatE', 'Amat', 'AkSt', 'calc', 'nIter', 'Xw', 'AAmat', 'alpSt', 'alpWv', 'Dk', 'Pk', 'chisq', 'Qk', 'pwr']
None
null
0
0
0
null
0
null
The function (IPG) defined within the public class called public.The function start at line 935 and ends at 986. It contains 34 lines of code and it has a cyclomatic complexity of 6. It takes 10 parameters, represented as [935.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SetScale
def SetScale(Data,refData):Profile,Limits,Sample = DatarefProfile,refLimits,refSample = refDatax,y = Profile[:2]rx,ry = refProfile[:2]Beg = np.fmax([rx[0],x[0],Limits[1][0],refLimits[1][0]])Fin = np.fmin([rx[-1],x[-1],Limits[1][1],refLimits[1][1]])iBeg = np.searchsorted(x,Beg)iFin = np.searchsorted(x,Fin)+1#include las...
1
12
2
189
6
992
1,003
992
null
['iBeg', 'iFin', 'refsum', 'Fin', 'Beg', 'sum']
None
null
0
0
0
null
0
null
The function (SetScale) defined within the public class called public.The function start at line 992 and ends at 1003. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [992.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Bestimate
def Bestimate(G,Rg,P):return (G*P/Rg**P)*np.exp(scsp.gammaln(P/2))
1
2
3
33
0
1,005
1,006
1,005
null
[]
None
null
0
0
0
null
0
null
The function (Bestimate) defined within the public class called public.The function start at line 1005 and ends at 1006. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [1005.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SmearData
def SmearData(Ic,Q,slitLen,Back):Np = Q.shape[0]Qtemp = np.concatenate([Q,Q[-1]+20*Q])Ictemp = np.concatenate([Ic,Ic[-1]*(1-(Qtemp[Np:]-Qtemp[Np])/(20*Qtemp[Np-1]))])Icsm = np.zeros_like(Q)Qsm = 2*slitLen*(np.interp(np.arange(2*Np)/2.,np.arange(Np),Q)-Q[0])/(Q[-1]-Q[0])Sp = np.searchsorted(Qsm,slitLen)DQsm = np.diff(Qs...
1
12
4
222
8
1,008
1,019
1,008
null
['Sp', 'Np', 'DQsm', 'Ictemp', 'Qtemp', 'Ism', 'Icsm', 'Qsm']
None
null
0
0
0
null
0
null
The function (SmearData) defined within the public class called public.The function start at line 1008 and ends at 1019. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [1008.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SizeDistribution
def SizeDistribution(Profile,ProfDict,Limits,Sample,data):shapes = {'Spheroid':[SpheroidFF,SpheroidVol],'Cylinder':[CylinderDFF,CylinderDVol],'Cylinder AR':[CylinderARFF,CylinderARVol],'Unified sphere':[UniSphereFF,UniSphereVol],'Unified rod':[UniRodFF,UniRodVol],'Unified rod AR':[UniRodARFF,UniRodARVol],'Unified disk'...
4
43
5
624
17
1,025
1,067
1,025
null
['Back', 'Ibeg', 'Dbins', 'shapes', 'Shape', 'Qmin', 'Ifin', 'Scale', 'Sky', 'BinMag', 'BinsBack', 'wtFactor', 'Qmax', 'Contrast', 'Gmat', 'Bins', 'Parms']
None
null
0
0
0
null
0
null
The function (SizeDistribution) defined within the public class called public.The function start at line 1025 and ends at 1067. It contains 43 lines of code and it has a cyclomatic complexity of 4. It takes 5 parameters, represented as [1025.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PairDistFxn.PairDistFxn.CalcMoore.MoorePOR
def MoorePOR(cw,r,dmax):#lines 1417-1428n = 0nmax = len(cw)POR = np.zeros(len(r))while n < nmax:POR += 4.*r*cw[n]*np.sin((n+1.)*np.pi*r/dmax)n += 1return POR
2
8
3
70
0
1,077
1,084
1,077
null
[]
None
null
0
0
0
null
0
null
The function (PairDistFxn.PairDistFxn.CalcMoore.MoorePOR) defined within the public class called public.The function start at line 1077 and ends at 1084. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [1077.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PairDistFxn.PairDistFxn.CalcMoore.MooreIOREFF
def MooreIOREFF(cw,q,dmax):#lines 1437-1448n = 0nmax = len(cw)POR = np.zeros(len(q))dq = dmax*qfpd = 8.*(np.pi**2)*dmax*np.sin(dq)/qwhile n < nmax:POR += cw[n]*(n+1.)*((-1)**n)*fpd/(((n+1.)*np.pi)**2-dq**2)n += 1return POR
2
10
3
112
0
1,086
1,095
1,086
null
[]
None
null
0
0
0
null
0
null
The function (PairDistFxn.PairDistFxn.CalcMoore.MooreIOREFF) defined within the public class called public.The function start at line 1086 and ends at 1095. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [1086.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PairDistFxn.PairDistFxn.CalcMoore.calcSASD
def calcSASD(values,Q,Io,wt,Ifb,dmax,ifBack):if ifBack:M = np.sqrt(wt)*(MooreIOREFF(values[:-1],Q,dmax)+Ifb+values[-1]-Io)else:M = np.sqrt(wt)*(MooreIOREFF(values,Q,dmax)+Ifb-Io)return M
2
6
7
81
0
1,097
1,102
1,097
null
[]
None
null
0
0
0
null
0
null
The function (PairDistFxn.PairDistFxn.CalcMoore.calcSASD) defined within the public class called public.The function start at line 1097 and ends at 1102. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 7 parameters, represented as [1097.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PairDistFxn.CalcMoore
def CalcMoore():def MoorePOR(cw,r,dmax):#lines 1417-1428n = 0nmax = len(cw)POR = np.zeros(len(r))while n < nmax:POR += 4.*r*cw[n]*np.sin((n+1.)*np.pi*r/dmax)n += 1return PORdef MooreIOREFF(cw,q,dmax):#lines 1437-1448n = 0nmax = len(cw)POR = np.zeros(len(q))dq = dmax*qfpd = 8.*(np.pi**2)*dmax*np.sin(dq)/qwhile n < nmax:...
8
50
0
530
0
1,075
1,149
1,075
null
[]
None
null
0
0
0
null
0
null
The function (PairDistFxn.CalcMoore) defined within the public class called public.The function start at line 1075 and ends at 1149. It contains 50 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
PairDistFxn
def PairDistFxn(Profile,ProfDict,Limits,Sample,data):def CalcMoore():def MoorePOR(cw,r,dmax):#lines 1417-1428n = 0nmax = len(cw)POR = np.zeros(len(r))while n < nmax:POR += 4.*r*cw[n]*np.sin((n+1.)*np.pi*r/dmax)n += 1return PORdef MooreIOREFF(cw,q,dmax):#lines 1437-1448n = 0nmax = len(cw)POR = np.zeros(len(q))dq = dmax*...
4
13
5
101
29
1,073
1,165
1,073
null
['covM', 'nmax', 'BinMag', 'N', 'pairData', 'dmax', 'Ifin', 'n', 'MPV', 'POR', 'BinSum', 'M', 'MPVR', 'Rwp', 'Back', 'Ibeg', 'Dbins', 'dq', 'Wt', 'result', 'chisq', 'fpd', 'Qmin', 'ncalc', 'wtFactor', 'sig', 'GOF', 'Qmax', 'Bins']
None
null
0
0
0
null
0
null
The function (PairDistFxn) defined within the public class called public.The function start at line 1073 and ends at 1165. It contains 13 lines of code and it has a cyclomatic complexity of 4. It takes 5 parameters, represented as [1073.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ModelFit.GetModelParms
def GetModelParms():parmDict = {'Scale':Sample['Scale'][0],'SlitLen':Sample.get('SlitLen',0.0),}varyList = []values = []levelTypes = []Back = Model['Back']if Back[1]:varyList += ['Back',]values.append(Back[0])parmDict['Back'] = Back[0]partData = Model['Particle']for i,level in enumerate(partData['Levels']):cid = str(i)...
14
44
0
443
0
1,191
1,234
1,191
null
[]
None
null
0
0
0
null
0
null
The function (ModelFit.GetModelParms) defined within the public class called public.The function start at line 1191 and ends at 1234. It contains 44 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
ModelFit.SetModelParms
def SetModelParms():print (' Refined parameters: Histogram scale: %.4g'%(parmDict['Scale']))if 'Back' in varyList:Model['Back'][0] = parmDict['Back']print ('%15s %15.4f esd: %15.4g'%('Background:',parmDict['Back'],sigDict['Back']))partData = Model['Particle']for i,level in enumerate(partData['Levels']):controls = level...
11
29
0
321
0
1,236
1,264
1,236
null
[]
None
null
0
0
0
null
0
null
The function (ModelFit.SetModelParms) defined within the public class called public.The function start at line 1236 and ends at 1264. It contains 29 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
ModelFit.calcSASD
def calcSASD(values,Q,Io,wt,Ifb,levelTypes,parmDict,varyList):parmDict.update(zip(varyList,values))M = np.sqrt(wt)*(getSASD(Q,levelTypes,parmDict)+Ifb-parmDict['Scale']*Io)return M
1
4
8
60
0
1,266
1,269
1,266
null
[]
None
null
0
0
0
null
0
null
The function (ModelFit.calcSASD) defined within the public class called public.The function start at line 1266 and ends at 1269. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 8 parameters, represented as [1266.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ModelFit.getSASD
def getSASD(Q,levelTypes,parmDict):Ic = np.zeros_like(Q)for i,Type in enumerate(levelTypes):cid = str(i)+';'if Type in ['LogNormal','Gaussian','LSW','Schulz-Zimm']:FFfxn = parmDict[cid+'FormFact']Volfxn = parmDict[cid+'FFVolume']SFfxn = parmDict[cid+'StrFact']FFargs = []SFargs = []for item in [cid+'Aspect ratio',cid+'L...
18
60
3
720
0
1,271
1,330
1,271
null
[]
None
null
0
0
0
null
0
null
The function (ModelFit.getSASD) defined within the public class called public.The function start at line 1271 and ends at 1330. It contains 60 lines of code and it has a cyclomatic complexity of 18. It takes 3 parameters, represented as [1271.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ModelFit
def ModelFit(Profile,ProfDict,Limits,Sample,Model):shapes = {'Spheroid':[SpheroidFF,SpheroidVol],'Cylinder':[CylinderDFF,CylinderDVol],'Cylinder AR':[CylinderARFF,CylinderARVol],'Unified sphere':[UniSphereFF,UniSphereVol],'Unified rod':[UniRodFF,UniRodVol],'Unified rod AR':[UniRodARFF,UniRodARVol],'Unified disk':[UniDi...
6
67
5
751
46
1,173
1,381
1,173
null
['distDict', 'covM', 'Porod', 'values', 'parmOrder', 'SFfxn', 'Guin', 'slitLen', 'SFargs', 'Type', 'cid', 'Rvals', 'R', 'FFargs', 'Ifin', 'covMatrix', 'partData', 'SFparmOrder', 'M', 'sfxns', 'Back', 'Ibeg', 'parmDict', 'Nans', 'contrast', 'varyList', 'Negs', 'Msg', 'Volfxn', 'name', 'Gmat', 'Ic', 'result', 'FFfxn', 'c...
None
null
0
0
0
null
0
null
The function (ModelFit) defined within the public class called public.The function start at line 1173 and ends at 1381. It contains 67 lines of code and it has a cyclomatic complexity of 6. It takes 5 parameters, represented as [1173.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getSASDRg
def getSASDRg(Q,parmDict):Ic = np.zeros_like(Q)Rg,G,B = parmDict['Rg'],parmDict['G'],parmDict['B']Qstar = Q/(scsp.erf(Q*Rg/np.sqrt(6)))**3Guin = G*np.exp(-(Q*Rg)**2/3)Porod = (B/Qstar**4)#*np.exp(-(Q*B)**2/3)Ic += Guin+Porod+parmDict['Back']return Ic
1
8
2
98
4
1,383
1,390
1,383
null
['Ic', 'Guin', 'Qstar', 'Porod']
None
null
0
0
0
null
0
null
The function (getSASDRg) defined within the public class called public.The function start at line 1383 and ends at 1390. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1383.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
RgFit.GetModelParms
def GetModelParms():parmDict = {}varyList = []values = []Back = Model['Back']if Back[1]:varyList += ['Back',]values.append(Back[0])parmDict['Back'] = Back[0]pairData = Model['Pair']parmDict['G'] = pairData.get('Dist G',Io[Ibeg])parmDict['Rg'] = pairData['MaxRadius']/2.5parmDict['B'] = pairData.get('Dist B',Io[Ifin-1]*Q...
2
16
0
147
0
1,395
1,410
1,395
null
[]
None
null
0
0
0
null
0
null
The function (RgFit.GetModelParms) defined within the public class called public.The function start at line 1395 and ends at 1410. It contains 16 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
RgFit.calcSASD
def calcSASD(values,Q,Io,wt,Ifb,parmDict,varyList):parmDict.update(zip(varyList,values))M = np.sqrt(wt)*(getSASDRg(Q,parmDict)-Io)return M
1
4
7
49
0
1,412
1,415
1,412
null
[]
None
null
0
0
0
null
0
null
The function (RgFit.calcSASD) defined within the public class called public.The function start at line 1412 and ends at 1415. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 7 parameters, represented as [1412.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
RgFit.SetModelParms
def SetModelParms():print (' Refined parameters: ')if 'Back' in varyList:Model['Back'][0] = parmDict['Back']print ('%15s %15.4f esd: %15.4g'%('Background:',parmDict['Back'],sigDict['Back']))pairData = Model['Pair']pairData['Dist G'] = parmDict['G']pairData['MaxRadius'] = parmDict['Rg']*2.5pairData['Dist B'] = parmDict[...
3
11
0
103
0
1,417
1,427
1,417
null
[]
None
null
0
0
0
null
0
null
The function (RgFit.SetModelParms) defined within the public class called public.The function start at line 1417 and ends at 1427. 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
RgFit
def RgFit(Profile,ProfDict,Limits,Sample,Model):print('unified fit single Rg to data to estimate a size')def GetModelParms():parmDict = {}varyList = []values = []Back = Model['Back']if Back[1]:varyList += ['Back',]values.append(Back[0])parmDict['Back'] = Back[0]pairData = Model['Pair']parmDict['G'] = pairData.get('Dist...
8
54
5
572
24
1,392
1,478
1,392
null
['covM', 'values', 'pairData', 'Rvals', 'Ifin', 'covMatrix', 'M', 'Back', 'Ibeg', 'parmDict', 'Negs', 'varyList', 'Msg', 'Wt', 'name', 'result', 'chisq', 'sigDict', 'Qmin', 'ncalc', 'wtFactor', 'sig', 'Qmax', 'Nans']
None
null
0
0
0
null
0
null
The function (RgFit) defined within the public class called public.The function start at line 1392 and ends at 1478. It contains 54 lines of code and it has a cyclomatic complexity of 8. It takes 5 parameters, represented as [1392.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ModelFxn
def ModelFxn(Profile,ProfDict,Limits,Sample,sasdData):shapes = {'Spheroid':[SpheroidFF,SpheroidVol],'Cylinder':[CylinderDFF,CylinderDVol],'Cylinder AR':[CylinderARFF,CylinderARVol],'Unified sphere':[UniSphereFF,UniSphereVol],'Unified rod':[UniRodFF,UniRodVol],'Unified rod AR':[UniRodARFF,UniRodARVol],'Unified disk':[Un...
17
93
5
1,170
26
1,481
1,576
1,481
null
['distDict', 'Dist', 'Porod', 'Guin', 'SFfxn', 'slitLen', 'SFargs', 'Ifin', 'FFargs', 'R', 'partData', 'Rbins', 'sfxns', 'Back', 'Ibeg', 'parmDict', 'contrast', 'Volfxn', 'Gmat', 'distFxn', 'FFfxn', 'shapes', 'Qmin', 'Qstar', 'Qmax', 'controls']
None
null
0
0
0
null
0
null
The function (ModelFxn) defined within the public class called public.The function start at line 1481 and ends at 1576. It contains 93 lines of code and it has a cyclomatic complexity of 17. It takes 5 parameters, represented as [1481.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
MakeDiamDist
def MakeDiamDist(DistName,nPoints,cutoff,distDict):if 'LogNormal' in DistName:distFxn = 'LogNormalDist'cumeFxn = 'LogNormalCume'pos = distDict['MinSize']args = [distDict['Mean'],distDict['StdDev']]step = 4.*np.sqrt(np.exp(distDict['StdDev']**2)*(np.exp(distDict['StdDev']**2)-1.))mode = distDict['MinSize']+distDict['Mea...
5
39
4
383
14
1,578
1,617
1,578
null
['args', 'maxX', 'pos', 'rBins', 'mode', 'step', 'nP', 'Diam', 'dBins', 'TCW', 'minX', 'distFxn', 'CumeTgts', 'cumeFxn']
None
null
0
0
0
null
0
null
The function (MakeDiamDist) defined within the public class called public.The function start at line 1578 and ends at 1617. It contains 39 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [1578.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
print_vec
def print_vec(text, a):'''print the contents of a vector to the console'''n = a.shape[0]print ("%s[ = (" % text,end='')for i in range(n):s = " %g, " % a[i]print (s,end='')print (")")
2
7
2
54
2
1,623
1,630
1,623
null
['s', 'n']
None
null
0
0
0
null
0
null
The function (print_vec) defined within the public class called public.The function start at line 1623 and ends at 1630. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [1623.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
print_arr
def print_arr(text, a):'''print the contents of an array to the console'''n, m = a.shapeprint ("%s[][] = (" % text)for i in range(n):print (" (",end='')for j in range(m):print (" %g, " % a[i][j],end='')print ("),")print (")")
3
9
2
69
0
1,632
1,641
1,632
null
[]
None
null
0
0
0
null
0
null
The function (print_arr) defined within the public class called public.The function start at line 1632 and ends at 1641. It contains 9 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [1632.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
test_MaxEnt_SB.readTextData
def readTextData(filename):'''return q, I, dI from a 3-column text file'''if not os.path.exists(filename):raise Exception("file not found: " + filename)buf = [line.split() for line in open(filename, 'r').readlines()]buf = zip(*buf) # transpose rows and columnsq= np.array(buf[0], dtype=np.float64)I= np.array(buf[1], dty...
3
9
1
110
0
1,644
1,653
1,644
null
[]
None
null
0
0
0
null
0
null
The function (test_MaxEnt_SB.readTextData) defined within the public class called public.The function start at line 1644 and ends at 1653. 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
test_MaxEnt_SB
def test_MaxEnt_SB(report=True):def readTextData(filename):'''return q, I, dI from a 3-column text file'''if not os.path.exists(filename):raise Exception("file not found: " + filename)buf = [line.split() for line in open(filename, 'r').readlines()]buf = zip(*buf) # transpose rows and columnsq= np.array(buf[0], dtype=np...
3
23
1
235
15
1,643
1,678
1,643
null
['dr', 'I', 'errFac', 'bkg', 'r', 'f_dr', 'q', 'rhosq', 'IterMax', 'defaultDistLevel', 'b', 'test_data_file', 'dI', 'G', 'buf']
None
null
0
0
0
null
0
null
The function (test_MaxEnt_SB) defined within the public class called public.The function start at line 1643 and ends at 1678. It contains 23 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
tests
def tests():test_MaxEnt_SB(report=True)
1
2
0
10
0
1,680
1,681
1,680
null
[]
None
null
0
0
0
null
0
null
The function (tests) defined within the public class called public.The function start at line 1680 and ends at 1681. 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
SetPrintLevel
def SetPrintLevel(level):'''Set the level of output from calls to :func:`GSASIIfiles.G2Print`,which should be used in place of print() where possible. This is awrapper for :func:`GSASIIfiles.G2SetPrintLevel` so that this routine isdocumented here.:param str level: a string used to set the print level, which may be'all'...
3
7
1
38
1
63
79
63
null
['printLevel']
None
null
0
0
0
null
0
null
The function (SetPrintLevel) defined within the public class called public.The function start at line 63 and ends at 79. It contains 7 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SetDebugMode
def SetDebugMode(mode):'''Set the debug configuration mode on (mode=True) or off (mode=False).This will provide some additional output that may help with tracking down problems in the code.'''GSASIIpath.AddConfigValue({'debug':bool(mode)})
1
2
1
19
0
80
85
80
null
[]
None
null
0
0
0
null
0
null
The function (SetDebugMode) defined within the public class called public.The function start at line 80 and ends at 85. 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
installScriptingShortcut
def installScriptingShortcut():'''Creates a file named G2script in the current Python site-packages directory.This is equivalent to the "Install GSASIIscriptable shortcut" command in the GUI'sFile menu. Once this is done, a shortcut for calling GSASIIscriptable is created,where the command:>>> import G2script as G2scwi...
2
6
0
29
1
87
110
87
null
['f']
None
null
0
0
0
null
0
null
The function (installScriptingShortcut) defined within the public class called public.The function start at line 87 and ends at 110. 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
ShowVersions
def ShowVersions():'''Show the versions all of required Python packages, etc.'''out = ''pkgList = [('Python',None), ('numpy',np)]try:import scipypkgList.append(('scipy',scipy))except:passtry:import IPythonpkgList.append(('IPython',IPython))except:passfor s,m in pkgList:msg = ''if s == 'Python':pkgver = platform.python_...
9
45
0
213
9
112
160
112
null
['dated', 'out', 'pkgver', 'vnum', 'pkgList', 'version', 'f', 'msg', 'loc']
None
null
0
0
0
null
0
null
The function (ShowVersions) defined within the public class called public.The function start at line 112 and ends at 160. It contains 45 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
LoadG2fil
def LoadG2fil():'''Setup GSAS-II importers.Delay importing this module when possible, it is slow.Multiple calls are not. Only the first does anything.'''if len(Readers['Pwdr']) > 0: return# initialize importsbefore = list(G2fil.condaRequestList.keys())Readers['Pwdr'] = G2fil.LoadImportRoutines("pwd", "Powder_Data")Read...
10
26
0
226
1
162
195
162
null
['before']
None
null
0
0
0
null
0
null
The function (LoadG2fil) defined within the public class called public.The function start at line 162 and ends at 195. It contains 26 lines of code and it has a cyclomatic complexity of 10. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
LoadDictFromProjFile
def LoadDictFromProjFile(ProjFile):'''Read a GSAS-II project file and load items to dictionary:param str ProjFile: GSAS-II project (name.gpx) full file name:returns: Project,nameList, where* Project (dict) is a representation of gpx file following the GSAS-II tree structurefor each item: key = tree name (e.g. 'Controls...
4
12
1
71
1
197
251
197
null
['errmsg']
None
null
0
0
0
null
0
null
The function (LoadDictFromProjFile) defined within the public class called public.The function start at line 197 and ends at 251. It contains 12 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SaveDictToProjFile
def SaveDictToProjFile(Project,nameList,ProjFile):'''Save a GSAS-II project file from dictionary/nameList created by LoadDictFromProjFile:param dict Project: representation of gpx file following the GSAS-IItree structure as described for LoadDictFromProjFile:param list nameList: names of main tree entries & subentries ...
4
13
3
101
3
253
272
253
null
['item', 'data', 'file']
None
null
0
0
0
null
0
null
The function (SaveDictToProjFile) defined within the public class called public.The function start at line 253 and ends at 272. It contains 13 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [253.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PreSetup
def PreSetup(data):'''Create part of an initial (empty) phase dictionaryfrom GSASIIphsGUI.py, near end of UpdatePhaseDataAuthor: Jackson O'Donnell (jacksonhodonnell .at. gmail.com)'''if 'RBModels' not in data:data['RBModels'] = {}if 'MCSA' not in data:data['MCSA'] = {'Models':[{'Type':'MD','Coef':[1.0,False,[.8,1.2],],...
5
9
1
126
0
274
288
274
null
[]
None
null
0
0
0
null
0
null
The function (PreSetup) defined within the public class called public.The function start at line 274 and ends at 288. It contains 9 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
SetupGeneral
def SetupGeneral(data, dirname):'''Initialize phase data.'''errmsg = ''try:G2elem.SetupGeneral(data,dirname)except ValueError as msg:errmsg = msgif errmsg: raise G2ScriptException(errmsg)
3
7
2
37
1
294
302
294
null
['errmsg']
None
null
0
0
0
null
0
null
The function (SetupGeneral) defined within the public class called public.The function start at line 294 and ends at 302. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [294.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
make_empty_project
def make_empty_project(author=None, filename=None):"""Creates an dictionary in the style of GSASIIscriptable, for an emptyproject.If no author name or filename is supplied, 'no name' and<current dir>/test_output.gpx are used , respectively.Returns: project dictionary, name listAuthor: Jackson O'Donnell (jacksonhodonnel...
3
24
2
205
4
304
340
304
null
['controls_data', 'filename', 'output', 'names']
None
null
0
0
0
null
0
null
The function (make_empty_project) defined within the public class called public.The function start at line 304 and ends at 340. It contains 24 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [304.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GenerateReflections
def GenerateReflections(spcGrp,cell,Qmax=None,dmin=None,TTmax=None,wave=None):"""Generates the crystallographically unique powder diffraction reflectionsfor a lattice and space group (see :func:`GSASIIlattice.GenHLaue`).:param str spcGrp: A GSAS-II formatted space group (with spaces between axial fields, e.g. 'P 21 21 ...
8
18
6
179
3
342
401
342
null
['opts', 'A', 'dmin']
None
null
0
0
0
null
0
null
The function (GenerateReflections) defined within the public class called public.The function start at line 342 and ends at 401. It contains 18 lines of code and it has a cyclomatic complexity of 8. It takes 6 parameters, represented as [342.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
downloadFile
def downloadFile(URL,download_loc=None):'''Download the URL '''import requestsfname = os.path.split(URL)[1]if download_loc is None: import tempfile download_loc = tempfile.gettempdir()elif os.path.isdir(download_loc) and os.path.exists(download_loc):passelif os.path.exists(os.path.dirname(download_loc)):download_loc,fn...
5
20
2
151
4
409
431
409
null
['fname', 'filename', 'response', 'download_loc']
None
null
0
0
0
null
0
null
The function (downloadFile) defined within the public class called public.The function start at line 409 and ends at 431. It contains 20 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [409.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
import_generic
def import_generic(filename, readerlist, fmthint=None, bank=None, URL=False, download_loc=None, useNet=True):"""Attempt to import a filename, using a list of reader objects.Returns the first reader object which worked."""if URL is True:filename = downloadFile(filename,download_loc)# Translated from OnImportGeneric meth...
28
81
7
509
8
433
528
433
null
['l', 'block', 'repeat', 'filename', 'hintcount', 'flag', 'rdbuffer', 'rd_list']
None
null
0
0
0
null
0
null
The function (import_generic) defined within the public class called public.The function start at line 433 and ends at 528. It contains 81 lines of code and it has a cyclomatic complexity of 28. It takes 7 parameters, represented as [433.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
load_iprms
def load_iprms(instfile, reader, bank=None):"""Loads instrument parameters from a file, and edits thegiven reader.Returns a 2-tuple of (Iparm1, Iparm2) parameters"""LoadG2fil()ext = os.path.splitext(instfile)[1]if ext.lower() == '.instprm':# New GSAS File, load appropriate bankwith open(instfile) as f:lines = f.readlin...
12
38
3
327
5
531
579
531
null
['bank', 'ibanks', 'Iparm', 'ext', 'lines']
None
null
0
0
0
null
0
null
The function (load_iprms) defined within the public class called public.The function start at line 531 and ends at 579. It contains 38 lines of code and it has a cyclomatic complexity of 12. It takes 3 parameters, represented as [531.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
load_pwd_from_reader
def load_pwd_from_reader(reader, instprm, existingnames=[],bank=None):"""Loads powder data from a reader object, and assembles it into a GSASII data tree.:returns: (name, tree) - 2-tuple of the histogram name (str), and dataAuthor: Jackson O'Donnell (jacksonhodonnell .at. gmail.com)"""HistName = 'PWDR ' + G2obj.StripUn...
13
87
4
941
16
581
695
581
null
['corr', 'Tmin', 'Ibeg', 'valuesdict', 'Ifin', 'HistName', 'Ymax', 'output_dict', 'cw', 'npts', 'Ymin', 'default_background', 'names', 'var', 'Tmin1', 'Tmax']
None
null
0
0
0
null
0
null
The function (load_pwd_from_reader) defined within the public class called public.The function start at line 581 and ends at 695. It contains 87 lines of code and it has a cyclomatic complexity of 13. It takes 4 parameters, represented as [581.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
_deep_copy_into
def _deep_copy_into(from_, into):"""Helper function for reloading .gpx file. See G2Project.reload():author: Jackson O'Donnell (jacksonhodonnell .at. gmail.com)"""if isinstance(from_, dict) and isinstance(into, dict):combined_keys = set(from_.keys()).union(into.keys())for key in combined_keys:if key in from_ and key in ...
19
30
2
270
3
697
730
697
null
['both_dicts', 'combined_keys', 'both_lists']
None
null
0
0
0
null
0
null
The function (_deep_copy_into) defined within the public class called public.The function start at line 697 and ends at 730. It contains 30 lines of code and it has a cyclomatic complexity of 19. It takes 2 parameters, represented as [697.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
_getCorrImage
def _getCorrImage(ImageReaderlist,proj,imageRef):'''Gets image & applies dark, background & flat background corrections.based on :func:`GSASIIimgGUI.GetImageZ`. Expected to be for internaluse only.:param list ImageReaderlist: list of Reader objects for images:param object proj: references a :class:`G2Project` project:p...
15
55
3
499
15
732
798
732
null
['dImgObj', 'bImgObj', 'Controls', 'ImgObj', 'gImgObj', 'sumImg', 'ImageTag', 'Imax', 'backImage', 'formatName', 'GMimage', 'darkImg', 'imagefile', 'gainMap', 'darkImage']
None
null
0
0
0
null
0
null
The function (_getCorrImage) defined within the public class called public.The function start at line 732 and ends at 798. It contains 55 lines of code and it has a cyclomatic complexity of 15. It takes 3 parameters, represented as [732.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
_constr_type
def _constr_type(var):'''returns the constraint type based on phase/histogram usein a variable'''if var.histogram and var.phase:return 'HAP'elif var.phase:return 'Phase'elif var.histogram:return 'Hist'else:return 'Global'
5
9
1
35
0
800
811
800
null
[]
None
null
0
0
0
null
0
null
The function (_constr_type) defined within the public class called public.The function start at line 800 and ends at 811. It contains 9 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__
def __init__(self, datadict):self.data = datadict
1
2
2
12
0
821
822
821
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 821 and ends at 822. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [821.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
__getitem__
def __getitem__(self, key):return self.data[key]
1
2
2
14
0
824
825
824
null
[]
None
null
0
0
0
null
0
null
The function (__getitem__) defined within the public class called public.The function start at line 824 and ends at 825. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [824.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
__setitem__
def __setitem__(self, key, value):self.data[key] = value
1
2
3
17
0
827
828
827
null
[]
None
null
0
0
0
null
0
null
The function (__setitem__) defined within the public class called public.The function start at line 827 and ends at 828. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [827.0] and does not return any value..