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
transposeHKLF
def transposeHKLF(transMat,Super,refList):''' Apply transformation matrix to hkl(m)param: transmat: 3x3 or 4x4 arrayparam: Super: 0 or 1 for extra indexparam: refList list of h,k,l,....return: newRefs transformed list of h',k',l',,,return: badRefs list of noninteger h',k',l'...'''newRefs = np.copy(refList)badRefs = []f...
3
9
3
90
3
1,474
1,489
1,474
null
['newRefs', 'newH', 'badRefs']
None
null
0
0
0
null
0
null
The function (transposeHKLF) defined within the public class called public.The function start at line 1474 and ends at 1489. It contains 9 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [1474.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
sortHKLd
def sortHKLd(HKLd,ifreverse,ifdup,ifSS=False):'''sort reflection list on d-spacing; can sort in either order:param HKLd: a list of [h,k,l,d,...];:param ifreverse: True for largest d first:param ifdup: True if duplicate d-spacings allowed:return: sorted reflection list'''T = []N = 3if ifSS:N = 4for i,H in enumerate(HKLd...
7
20
4
119
5
1,491
1,517
1,491
null
['T', 'N', 'okey', 'D', 'X']
None
null
0
0
0
null
0
null
The function (sortHKLd) defined within the public class called public.The function start at line 1491 and ends at 1517. It contains 20 lines of code and it has a cyclomatic complexity of 7. It takes 4 parameters, represented as [1491.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SwapIndx
def SwapIndx(Axis,H):'needs doc string'if Axis in [1,-1]:return Helif Axis in [2,-3]:return [H[1],H[2],H[0]]else:return [H[2],H[0],H[1]]
3
8
2
66
0
1,519
1,526
1,519
null
[]
None
null
0
0
0
null
0
null
The function (SwapIndx) defined within the public class called public.The function start at line 1519 and ends at 1526. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [1519.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SwapItems
def SwapItems(Alist,pos1,pos2):'exchange 2 items in a list'try:get = Alist[pos1],Alist[pos2]Alist[pos2],Alist[pos1] = getexcept IndexError:passreturn Alist
2
8
3
40
1
1,528
1,535
1,528
null
['get']
None
null
0
0
0
null
0
null
The function (SwapItems) defined within the public class called public.The function start at line 1528 and ends at 1535. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [1528.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Rh2Hx
def Rh2Hx(Rh):'needs doc string'Hx = [0,0,0]Hx[0] = Rh[0]-Rh[1]Hx[1] = Rh[1]-Rh[2]Hx[2] = np.sum(Rh)return Hx
1
7
1
56
1
1,537
1,543
1,537
null
['Hx']
None
null
0
0
0
null
0
null
The function (Rh2Hx) defined within the public class called public.The function start at line 1537 and ends at 1543. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Hx2Rh
def Hx2Rh(Hx):'needs doc string'Rh = [0,0,0]itk = -Hx[0]+Hx[1]+Hx[2]if itk%3 != 0:return 0#error - not rhombohedral reflectionelse:Rh[1] = itk//3Rh[0] = Rh[1]+Hx[0]Rh[2] = Rh[1]-Hx[1]if Rh[0] < 0:for i in range(3):Rh[i] = -Rh[i]return Rh
4
14
1
106
2
1,545
1,558
1,545
null
['itk', 'Rh']
None
null
0
0
0
null
0
null
The function (Hx2Rh) defined within the public class called public.The function start at line 1545 and ends at 1558. It contains 14 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
CentCheck
def CentCheck(Cent,H):'checks individual hkl for centering extinction; returns True for allowed, False otherwise - slow'h,k,l = Hif Cent == 'A' and (k+l)%2:return Falseelif Cent == 'B' and (h+l)%2:return Falseelif Cent == 'C' and (h+k)%2:return Falseelif Cent == 'I' and (h+k+l)%2:return Falseelif Cent == 'F' and ((h+k)...
15
17
2
132
0
1,560
1,576
1,560
null
[]
None
null
0
0
0
null
0
null
The function (CentCheck) defined within the public class called public.The function start at line 1560 and ends at 1576. It contains 17 lines of code and it has a cyclomatic complexity of 15. It takes 2 parameters, represented as [1560.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
newCentCheck
def newCentCheck(Cent,H):'checks np.array of HKls for centering extinction; returns allowed HKLs - fast'K = H.Tif Cent == 'A':return H[np.where((K[1]+K[2])%2 == 0)]elif Cent == 'B':return H[np.where((K[0]+K[2])%2 == 0)]elif Cent == 'C':return H[np.where((K[0]+K[1])%2 == 0)]elif Cent == 'I':return H[np.where((K[0]+K[1]+...
7
21
2
262
2
1,578
1,598
1,578
null
['H', 'K']
None
null
0
0
0
null
0
null
The function (newCentCheck) defined within the public class called public.The function start at line 1578 and ends at 1598. It contains 21 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [1578.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
RBsymCheck
def RBsymCheck(Atoms,ct,cx,cs,AtLookUp,Amat,RBObjIds,SGData):""" Checks members of a rigid body to see if one is a symmetry equivalent of another.If so the atom site frac is set to zero.:param Atoms: atom array as defined in GSAS-II; modified here:param ct: int location of atom type in Atoms item:param cx: int location...
6
15
8
247
5
1,600
1,627
1,600
null
['XYZt', 'typo', 'close', 'XYZo', 'Xeqv']
None
null
0
0
0
null
0
null
The function (RBsymCheck) defined within the public class called public.The function start at line 1600 and ends at 1627. It contains 15 lines of code and it has a cyclomatic complexity of 6. It takes 8 parameters, represented as [1600.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetBraviasNum
def GetBraviasNum(center,system):"""Determine the Bravais lattice number, as used in GenHBravais:param center: one of: 'P', 'C', 'I', 'F', 'R' (see SGLatt from GSASIIspc.SpcGroup):param system: one of 'cubic', 'hexagonal', 'tetragonal', 'orthorhombic', 'trigonal' (for R)'monoclinic', 'triclinic' (see SGSys from GSASIIs...
37
38
2
361
0
1,629
1,675
1,629
null
[]
None
null
0
0
0
null
0
null
The function (GetBraviasNum) defined within the public class called public.The function start at line 1629 and ends at 1675. It contains 38 lines of code and it has a cyclomatic complexity of 37. It takes 2 parameters, represented as [1629.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
_GenHBravais_cctbx
def _GenHBravais_cctbx(dmin, Bravais, A, sg_type, uctbx_unit_cell, miller_index_generator):'''Alternate form of :func:`GenHBravais` that uses CCTBX internals'''g_inv = np.array([[A[0], A[3]/2, A[4]/2],[A[3]/2, A[1], A[5]/2],[A[4]/2, A[5]/2, A[2]]])g = np.linalg.inv(g_inv)g_elems = (g[0][0], g[1][1], g[2][2], g[0][1], g...
3
17
6
240
7
1,677
1,698
1,677
null
['g', 'g_inv', 'g_elems', 'mig', 'uc', 'result', 'd']
None
null
0
0
0
null
0
null
The function (_GenHBravais_cctbx) defined within the public class called public.The function start at line 1677 and ends at 1698. It contains 17 lines of code and it has a cyclomatic complexity of 3. It takes 6 parameters, represented as [1677.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GenHBravais
def GenHBravais(dmin, Bravais, A, cctbx_args=None,ifList=False):"""Generate the positionally unique powder diffraction reflections:param dmin: minimum d-spacing in A:param Bravais: lattice type (see GetBraviasNum). Bravais is one of:* 0 F cubic* 1 I cubic* 2 P cubic* 3 R hexagonal (trigonal not rhombohedral)* 4 P hexag...
31
81
5
1,116
12
1,700
1,832
1,700
null
['D', 'Indx', 'H1', 'Cent', 'H0', 'Hmax', 'H2', 'rdsq', 'HKL', 'hmin', 'H', 'lmin']
None
null
0
0
0
null
0
null
The function (GenHBravais) defined within the public class called public.The function start at line 1700 and ends at 1832. It contains 81 lines of code and it has a cyclomatic complexity of 31. It takes 5 parameters, represented as [1700.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getHKLmax
def getHKLmax(dmin,SGData,A):'finds maximum allowed hkl for given A within dmin'SGLaue = SGData['SGLaue']if SGLaue in ['3R','3mR']:#Rhombohedral axesHmax = [0,0,0]cell = A2cell(A)aHx = cell[0]*math.sqrt(2.0*(1.0-cosd(cell[3])))cHx = cell[0]*math.sqrt(3.0*(1.0+2.0*cosd(cell[3])))Hmax[0] = Hmax[1] = int(round(aHx/dmin))H...
2
13
3
147
5
1,834
1,847
1,834
null
['cHx', 'aHx', 'SGLaue', 'Hmax', 'cell']
None
null
0
0
0
null
0
null
The function (getHKLmax) defined within the public class called public.The function start at line 1834 and ends at 1847. It contains 13 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [1834.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GenHLaue
def GenHLaue(dmin,SGData,A):"""Generate the crystallographically unique powder diffraction reflectionsfor a lattice and Bravais type:param dmin: minimum d-spacing:param SGData: space group dictionary with at least* 'SGLaue': Laue group symbol: one of '-1','2/m','mmm','4/m','6/m','4/mmm','6/mmm', '3m1', '31m', '3', '3R'...
57
96
3
1,008
14
1,849
1,961
1,849
null
['lmax', 'SGLatt', 'dminsq', 'SGLaue', 'Hmax', 'SGUniq', 'rdsq', 'kmin', 'HKL', 'hmin', 'axisnum', 'H', 'kmax', 'lmin']
None
null
0
0
0
null
0
null
The function (GenHLaue) defined within the public class called public.The function start at line 1849 and ends at 1961. It contains 96 lines of code and it has a cyclomatic complexity of 57. It takes 3 parameters, represented as [1849.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GenPfHKLs
def GenPfHKLs(nMax,SGData,A):"""Generate the unique pole figure reflections for a lattice and Bravais type.Min d-spacing=1.0A & no more than nMax returned:param nMax: maximum number of hkls returned:param SGData: space group dictionary with at least* 'SGLaue': Laue group symbol: one of '-1','2/m','mmm','4/m','6/m','4/m...
2
4
3
75
2
1,963
1,980
1,963
null
['N', 'HKL']
None
null
0
0
0
null
0
null
The function (GenPfHKLs) defined within the public class called public.The function start at line 1963 and ends at 1980. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [1963.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GenSSHLaue
def GenSSHLaue(dmin,SGData,SSGData,Vec,maxH,A):'needs a doc string'ifMag = Falseif 'MagSpGrp' in SGData:ifMag = TrueHKLs = []vec = np.array(Vec)vstar = np.sqrt(calc_rDsq(vec,A)) #find extra needed for -n SS reflectionsdvec = 1./(maxH*vstar+1./dmin)HKL = GenHLaue(dvec,SGData,A)SSdH = [vec*h for h in range(-maxH,maxH+1)]...
12
26
6
295
12
1,982
2,007
1,982
null
['d', 'HKLs', 'vstar', 'HKLM', 'dvec', 'DH', 'ifMag', 'HKL', 'SSdH', 'ext', 'H', 'vec']
None
null
0
0
0
null
0
null
The function (GenSSHLaue) defined within the public class called public.The function start at line 1982 and ends at 2007. It contains 26 lines of code and it has a cyclomatic complexity of 12. It takes 6 parameters, represented as [1982.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
LaueUnique2
def LaueUnique2(SGData,refList):''' Impose Laue symmetry on hkl:param SGData: space group data from 'P '+Laue:param HKLF: np.array([[h,k,l,...]]) reflection set to be converted:return: HKLF new reflection array with imposed Laue symmetry'''for ref in refList:H = ref[:3]Uniq = G2spc.GenHKLf(H,SGData)[2]Uniq = G2mth.sort...
2
7
2
70
2
2,009
2,022
2,009
null
['H', 'Uniq']
None
null
0
0
0
null
0
null
The function (LaueUnique2) defined within the public class called public.The function start at line 2009 and ends at 2022. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [2009.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
LaueUnique
def LaueUnique(Laue,HKLF):''' Impose Laue symmetry on hkl:param str Laue: Laue symbol, as belowcentrosymmetric Laue groups::['-1','2/m','112/m','2/m11','mmm','-42m','-4m2','4/mmm','-3','-3m','-31m','-3m1','6/m','6/mmm','m3','m3m']noncentrosymmetric Laue groups:: ['1','2','211','112','m','m11','11m','222','mm2','m2m','2...
48
261
2
11,623
17
2,024
2,323
2,024
null
['matdmp', 'matdm', 'matk2', 'matdm3', 'mat31', 'mat43', 'matd3t', 'mat6', 'matd2', 'mat41', 'matd3q', 'mat4bar', 'mat2d43', 'HKLFT', 'matkm', 'matd3', 'mat32']
None
null
0
0
0
null
0
null
The function (LaueUnique) defined within the public class called public.The function start at line 2024 and ends at 2323. It contains 261 lines of code and it has a cyclomatic complexity of 48. It takes 2 parameters, represented as [2024.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
RBChk
def RBChk(sytsym,L,M):'''finds symmetry rules for spherical harmonic coefficients for site symmetries:param str sytsym: atom site symmetry symbol:param int L: principal harmonic term L>0:param int M: second harmonic term; can be -L <= M <= L:returns True if allowed and sign for termNB: not complete for all possible sit...
144
120
3
1,308
0
2,326
2,453
2,326
null
[]
None
null
0
0
0
null
0
null
The function (RBChk) defined within the public class called public.The function start at line 2326 and ends at 2453. It contains 120 lines of code and it has a cyclomatic complexity of 144. It takes 3 parameters, represented as [2326.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
RBsymChk
def RBsymChk(RBsym,cubic,coefNames,L=18):'''imposes rigid body symmetry on spherical harmonics termsKey problem is noncubic RB symmetries in cubic site symmetries & vice versa.:param str RBsym:molecular point symmetry symbol:param bool cubic: True if atom site symmetry is cubic:param list coefNames: sp. harm coefficien...
20
46
4
377
4
2,455
2,507
2,455
null
['LM', 'newSgns', 'M', 'newNames']
None
null
0
0
0
null
0
null
The function (RBsymChk) defined within the public class called public.The function start at line 2455 and ends at 2507. It contains 46 lines of code and it has a cyclomatic complexity of 20. It takes 4 parameters, represented as [2455.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GenRBCoeff
def GenRBCoeff(sytsym,RBsym,L):'''imposes rigid body symmetry on spherical harmonics termsKey problem is noncubic RB symmetries in cubic site symmetries & vice versa.:param str sytsym: atom position site symmetry symbol:param str RBsym: molecular point symmetry symbol:param int L: spherical harmonic order no.:returns l...
7
19
3
141
3
2,509
2,535
2,509
null
['coefSgns', 'coefNames', 'cubic']
None
null
0
0
0
null
0
null
The function (GenRBCoeff) defined within the public class called public.The function start at line 2509 and ends at 2535. It contains 19 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [2509.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GenShCoeff
def GenShCoeff(sytsym,L):'''Generate spherical harmonic coefficient names for atom site symmetry:param str sytsym: site symmetry or perhaps molecular symmetry:param int L:spherical harmonic order no.:returns list newNames: spherical harmonic term of order L as either C(L,M) or C(L,M)c for cubic terms:returns list newSg...
5
16
2
120
3
2,537
2,558
2,537
null
['coefSgns', 'coefNames', 'cubic']
None
null
0
0
0
null
0
null
The function (GenShCoeff) defined within the public class called public.The function start at line 2537 and ends at 2558. It contains 16 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [2537.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
OdfChk
def OdfChk(SGLaue,L,M):'''finds symmetry rules for spherical harmonic coefficients for Laue groups:param str SGLaue: Laue symbol:param int L: principal harmonic term; only evens are used:param int M: second harmonic term; can be -L <= M <= L:returns True if allowed'''if not L%2 and abs(M) <= L:if SGLaue == '0':#cylindr...
36
35
3
260
0
2,560
2,600
2,560
null
[]
None
null
0
0
0
null
0
null
The function (OdfChk) defined within the public class called public.The function start at line 2560 and ends at 2600. It contains 35 lines of code and it has a cyclomatic complexity of 36. It takes 3 parameters, represented as [2560.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GenSHCoeff
def GenSHCoeff(SGLaue,SamSym,L,IfLMN=True):'''Generate spherical harmonics coefficient names for texture:param str SGLaue: Laue symbol:param str SamSym: sample symmetry symbol:param int L: spherical harmonic order no.:param bool IfLMN: if TRUE return sp.harm. name as C(L,M,N); else return C(L,N):returns coefficient nam...
10
12
4
127
1
2,602
2,620
2,602
null
['coeffNames']
None
null
0
0
0
null
0
null
The function (GenSHCoeff) defined within the public class called public.The function start at line 2602 and ends at 2620. It contains 12 lines of code and it has a cyclomatic complexity of 10. It takes 4 parameters, represented as [2602.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CrsAng
def CrsAng(H,cell,SGData):'''Convert HKL to polar coordinates with proper orientation WRT space group point group:param array H: hkls:param list cell: lattice parameters:param dict SGData: space group data:returns arrays phi,beta: polar, azimuthal angles for HKL'''a,b,c,al,be,ga = cellSQ3 = 1.732050807569H1 = np.array(...
15
62
3
740
14
2,622
2,689
2,622
null
['SQ3', 'H4', 'DHR', 'H1', 'Laue', 'BA', 'BB', 'H3', 'DH', 'H2', 'Naxis', 'DR', 'phi', 'beta']
None
null
0
0
0
null
0
null
The function (CrsAng) defined within the public class called public.The function start at line 2622 and ends at 2689. It contains 62 lines of code and it has a cyclomatic complexity of 15. It takes 3 parameters, represented as [2622.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SamAng
def SamAng(Tth,Gangls,Sangl,IFCoup):"""Compute sample orientation angles vs laboratory coord. system:param Tth:Signed theta:param Gangls: Sample goniometer angles phi,chi,omega,azmuth:param Sangl:Sample angle zeros om-0, chi-0, phi-0:param IFCoup: True if omega & 2-theta coupled in CW scan:returns:psi,gam:Sample odf an...
2
46
4
555
36
2,691
2,756
2,691
null
['BC', 'SSchi', 'GSphi', 'dBAdF', 'SCchi', 'GCTth', 'BT', 'dBAdC', 'gam', 'SSomeg', 'GCphi', 'AT', 'GSazm', 'GSomeg', 'dPSdA', 'SComeg', 'BC3', 'C', 'BC1', 'dBBdF', 'GSTth', 'BB', 'GComeg', 'CT', 'DT', 'BD', 'dBBdO', 'GSchi', 'BA', 'GCazm', 'dBAdO', 'psi', 'dGMdA', 'dBBdC', 'GCchi', 'BC2']
None
null
0
0
0
null
0
null
The function (SamAng) defined within the public class called public.The function start at line 2691 and ends at 2756. It contains 46 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [2691.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetKcl
def GetKcl(L,N,SGLaue,phi,beta):'needs doc string'#from . import pytexture as ptxif SGLaue in ['m3','m3m']:if 'array' in str(type(phi)) and np.any(phi.shape):Kcl = np.zeros_like(phi)else:Kcl = 0.for j in range(0,L+1,4):im = j//4if 'array' in str(type(phi)) and np.any(phi.shape):pcrs = ptx.pyplmpsi(L,j,len(phi),phi)[0]e...
13
33
5
325
3
2,811
2,844
2,811
null
['pcrs', 'im', 'Kcl']
None
null
0
0
0
null
0
null
The function (GetKcl) defined within the public class called public.The function start at line 2811 and ends at 2844. It contains 33 lines of code and it has a cyclomatic complexity of 13. It takes 5 parameters, represented as [2811.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetKsl
def GetKsl(L,M,SamSym,psi,gam):'needs doc string'#from . import pytexture as ptxif 'array' in str(type(psi)) and np.any(psi.shape):psrs,dpdps = ptx.pyplmpsi(L,M,len(psi),psi)else:psrs,dpdps = ptx.pyplmpsi(L,M,1,psi)psrs *= RSQ2PIdpdps *= RSQ2PIif M:psrs *= SQ2dpdps *= SQ2if SamSym in ['mmm',]:dum = cosd(M*gam)Ksl = psr...
5
22
5
184
4
2,846
2,868
2,846
null
['Ksl', 'dKsdp', 'dKsdg', 'dum']
None
null
0
0
0
null
0
null
The function (GetKsl) defined within the public class called public.The function start at line 2846 and ends at 2868. It contains 22 lines of code and it has a cyclomatic complexity of 5. It takes 5 parameters, represented as [2846.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetKclKsl
def GetKclKsl(L,N,SGLaue,psi,phi,beta):"""This is used for spherical harmonics description of preferred orientation;cylindrical symmetry only (M=0) and no sample angle derivatives returned"""#from . import pytexture as ptxKsl,x = ptx.pyplmpsi(L,0,1,psi)Ksl *= RSQ2PIif SGLaue in ['m3','m3m']:Kcl = 0.0for j in range(0,L+...
7
25
6
239
2
2,870
2,899
2,870
null
['im', 'Kcl']
None
null
0
0
0
null
0
null
The function (GetKclKsl) defined within the public class called public.The function start at line 2870 and ends at 2899. It contains 25 lines of code and it has a cyclomatic complexity of 7. It takes 6 parameters, represented as [2870.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
H2ThPh2
def H2ThPh2(H,Bmat):'''Convert HKL to spherical polar & azimuth angles:param array H: array of hkl as [n,3]:param [3,3] array Bmat: inv crystal to Cartesian transformation:returns array Th: HKL azimuth angles:returns array Ph: HKL polar angles'''Hcart = np.inner(H,Bmat)R = np.sqrt(np.sum(np.square(Hcart),axis=1))Hcart ...
1
7
2
84
4
2,901
2,914
2,901
null
['Az', 'Pl', 'Hcart', 'R']
None
null
0
0
0
null
0
null
The function (H2ThPh2) defined within the public class called public.The function start at line 2901 and ends at 2914. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [2901.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SetUVvec
def SetUVvec(Neigh):''' Set deformation coordinate choices from neighbors; called in G2phsGUI/UpdateDeformationparam: list neigh: list of neighboring atoms; each with name, dist & cartesian vector:returns list UVvec: list of normalized vectors:returns list UVchoice: list of names for each'''UVvec = []UVchoice = []choic...
4
15
1
207
4
2,945
2,966
2,945
null
['Nneigh', 'choice', 'UVvec', 'UVchoice']
None
null
0
0
0
null
0
null
The function (SetUVvec) defined within the public class called public.The function start at line 2945 and ends at 2966. It contains 15 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
SHarmcal
def SHarmcal(SytSym,SHFln,psi,gam):'''Perform a surface spherical harmonics computation.Presently only used for plottingNote that the the number of gam values must either be 1 or must match psi:param str SytSym: sit symmetry - only looking for cubics - remove this:param dict SHFln: spherical harmonics coefficients; key...
5
12
4
136
3
2,968
2,991
2,968
null
['Ksl', 'SHVal', 'trm']
None
null
0
0
0
null
0
null
The function (SHarmcal) defined within the public class called public.The function start at line 2968 and ends at 2991. It contains 12 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [2968.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
KslCalc
def KslCalc(trm,psi,gam):'''Compute one angular part term in spherical harmonics:param str trm:sp. harm term name in the form of 'C(l,m)' or 'C(l,m)c' for cubic:param float/array psi: Azimuthal coordinate 0 <= Th <= 360:param float/array gam: Polar coordinate 0<= Ph <= 180:returns array Ksl: spherical harmonics angular...
2
6
3
61
0
2,993
3,005
2,993
null
[]
None
null
0
0
0
null
0
null
The function (KslCalc) defined within the public class called public.The function start at line 2993 and ends at 3005. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [2993.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SphHarmAng
def SphHarmAng(L,M,P,Th,Ph):''' Compute spherical harmonics values using scipy.special.sph_harm:param int L: degree of the harmonic (L >= 0):param int M: order number (\\|M\\| <= L):param int P: sign flag = -1 or 1:param float/array Th: Azimuthal coordinate 0 <= Th <= 360:param float/array Ph: Polar coordinate 0<= Ph <...
3
8
5
89
1
3,007
3,026
3,007
null
['ylmp']
None
null
0
0
0
null
0
null
The function (SphHarmAng) defined within the public class called public.The function start at line 3007 and ends at 3026. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 5 parameters, represented as [3007.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CubicSHarm
def CubicSHarm(L,M,Th,Ph):'''Calculation of the cubic harmonics given in Table 3 in M.Kara & K. Kurki-Suonio,Acta Cryt. A37, 201 (1981). For L = 14,20 only for m3m from F.M. Mueller and M.G. Priestley,Phys Rev 148, 638 (1966):param int L: degree of the harmonic (L >= 0):param int M: order number [\\|M\\| <= L]:param fl...
21
94
4
1,496
1
3,028
3,134
3,028
null
['klm']
None
null
0
0
0
null
0
null
The function (CubicSHarm) defined within the public class called public.The function start at line 3028 and ends at 3134. It contains 94 lines of code and it has a cyclomatic complexity of 21. It takes 4 parameters, represented as [3028.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Glnh
def Glnh(SHCoef,psi,gam,SamSym):'needs doc string'#from . import pytexture as ptxFln = np.zeros(len(SHCoef))for i,term in enumerate(SHCoef):l,m,n = eval(term.strip('C'))pcrs,dum = ptx.pyplmpsi(l,m,1,psi)pcrs *= RSQPIif m == 0:pcrs /= SQ2if SamSym in ['mmm',]:Ksl = pcrs*cosd(m*gam)else:Ksl = pcrs*(cosd(m*gam)+sind(m*gam...
4
16
4
161
3
3,136
3,153
3,136
null
['Ksl', 'Fln', 'ODFln']
None
null
0
0
0
null
0
null
The function (Glnh) defined within the public class called public.The function start at line 3136 and ends at 3153. It contains 16 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [3136.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Flnh
def Flnh(SHCoef,phi,beta,SGData):'needs doc string'#from . import pytexture as ptxFln = np.zeros(len(SHCoef))for i,term in enumerate(SHCoef):l,m,n = eval(term.strip('C'))if SGData['SGLaue'] in ['m3','m3m']:Kcl = 0.0for j in range(0,l+1,4):im = j//4pcrs,dum = ptx.pyplmpsi(l,j,1,phi)Kcl += BOH['L='+str(l)][n-1][im]*pcrs*...
8
29
4
299
4
3,155
3,185
3,155
null
['ODFln', 'im', 'Fln', 'Kcl']
None
null
0
0
0
null
0
null
The function (Flnh) defined within the public class called public.The function start at line 3155 and ends at 3185. It contains 29 lines of code and it has a cyclomatic complexity of 8. It takes 4 parameters, represented as [3155.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
polfcal
def polfcal(ODFln,SamSym,psi,gam):'''Perform a pole figure computation.Note that the the number of gam values must either be 1 or mustmatch psi. Updated for numpy 1.8.0'''#from . import pytexture as ptxPolVal = np.ones_like(psi)for term in ODFln:if abs(ODFln[term][1]) > 1.e-3:l,m,n = eval(term.strip('C'))psrs,dum = ptx...
6
18
4
158
2
3,187
3,209
3,187
null
['Ksl', 'PolVal']
None
null
0
0
0
null
0
null
The function (polfcal) defined within the public class called public.The function start at line 3187 and ends at 3209. It contains 18 lines of code and it has a cyclomatic complexity of 6. It takes 4 parameters, represented as [3187.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
invpolfcal
def invpolfcal(ODFln,SGData,phi,beta):'needs doc string'#from . import pytexture as ptxinvPolVal = np.ones_like(beta)for term in ODFln:if abs(ODFln[term][1]) > 1.e-3:l,m,n = eval(term.strip('C'))if SGData['SGLaue'] in ['m3','m3m']:Kcl = 0.0for j in range(0,l+1,4):im = j//4pcrs,dum = ptx.pyplmpsi(l,j,len(beta),phi)Kcl +...
9
29
4
282
3
3,211
3,241
3,211
null
['invPolVal', 'im', 'Kcl']
None
null
0
0
0
null
0
null
The function (invpolfcal) defined within the public class called public.The function start at line 3211 and ends at 3241. It contains 29 lines of code and it has a cyclomatic complexity of 9. It takes 4 parameters, represented as [3211.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
textureIndex
def textureIndex(SHCoef):'needs doc string'Tindx = 1.0for term in SHCoef:l = eval(term.strip('C'))[0]Tindx += SHCoef[term]**2/(2.0*l+1.)return Tindx
2
7
1
51
2
3,244
3,250
3,244
null
['Tindx', 'l']
None
null
0
0
0
null
0
null
The function (textureIndex) defined within the public class called public.The function start at line 3244 and ends at 3250. 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
InitVars
def InitVars():'''Initializes all constraint information'''global dependentParmList,arrayList,invarrayList,indParmList,consNum,symGenListdependentParmList = [] # contains a list of parameters in each grouparrayList = [] # a list of of relationship matrices invarrayList = [] # a list of inverse relationship matrices ind...
2
20
0
90
12
115
135
115
null
['invarrayList', 'holdParmList', 'symGenList', 'depVarList', 'dependentParmList', 'holdParmType', 'droppedSym', 'indParmList', 'constrVarList', 'arrayList', 'consNum', 'indepVarList']
None
null
0
0
0
null
0
null
The function (InitVars) defined within the public class called public.The function start at line 115 and ends at 135. It contains 20 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
VarKeys
def VarKeys(constr):"""Finds the keys in a constraint that represent parameterse.g. eliminates any that start with '_':param dict constr: a single constraint entry of form::{'var1': mult1, 'var2': mult2,... '_notVar': val,...}(see :func:`GroupConstraints`):returns: a list of keys where any keys beginning with '_' arere...
3
2
1
26
0
137
149
137
null
[]
None
null
0
0
0
null
0
null
The function (VarKeys) defined within the public class called public.The function start at line 137 and ends at 149. It contains 2 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
GroupConstraints
def GroupConstraints(constrDict):"""Divide the constraints into groups that share no parameters.:param dict constrDict: a list of dicts defining relationships/constraints:: constrDict = [{<constr1>}, {<constr2>}, ...]where {<constr1>} is {'var1': mult1, 'var2': mult2,... }:returns: two lists of lists:* a list of groupe...
7
24
1
155
8
152
193
152
null
['group', 'varlist', 'grouplist', 'groupset', 'assignedlist', 'changes', 'groups', 'ParmList']
None
null
0
0
0
null
0
null
The function (GroupConstraints) defined within the public class called public.The function start at line 152 and ends at 193. It contains 24 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
GenerateConstraints.warn
def warn(msg,cdict=None,val=None,prefix=None):if prefix is None: prefix = '\nProblem with 'if cdict is not None and cdict != warninfo['shown']:warninfo['shown'] = cdictif warninfo['msg']: warninfo['msg'] += '\n'if '_vary' in cdict:warninfo['msg'] += prefix + 'new var expression: ' + _FormatConstraint(cdict,cdict.get('_...
7
11
4
120
0
249
259
249
null
[]
None
null
0
0
0
null
0
null
The function (GenerateConstraints.warn) defined within the public class called public.The function start at line 249 and ends at 259. It contains 11 lines of code and it has a cyclomatic complexity of 7. It takes 4 parameters, represented as [249.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GenerateConstraints
def GenerateConstraints(varyList,constrDict,fixedList,parmDict=None,seqHistNum=None,raiseException=False):'''Takes a list of relationship entries that have been stored by :func:`ProcessConstraints` into lists ``constrDict`` and ``fixedList``This routine then calls :func:`CheckEquivalences` for internal consistency. Thi...
109
237
6
1,634
27
195
537
195
null
['warninfo', 'saveVaryList', 'holdList', 'skipList', 'msg', 'rel', 'maplist', 'zeroList', 'noVaryList', 'dropList', 'groupErrors', 'valid', 'constrVarList', 'constrArr', 'errmsg', 'noWildcardList', 'prefix', 'problem', 'invConstrArr', 'unvaried', 'invalidParms', 'notDefList', 'undefinedVars', 'value', 'hasNewVar', 'var...
None
null
0
0
0
null
0
null
The function (GenerateConstraints) defined within the public class called public.The function start at line 195 and ends at 537. It contains 237 lines of code and it has a cyclomatic complexity of 109. It takes 6 parameters, represented as [195.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CheckEquivalences.warnEqv
def warnEqv(msg,cnum=None):if cnum is not None and cnum != warninfo['shown']:warninfo['shown'] = cnumif warninfo['msg']: warninfo['msg'] += '\n'warninfo['msg'] += '\nProblem with equivalence: ' + _showEquiv(dependentParmList[cnum],indParmList[cnum],invarrayList[cnum])if warninfo['msg']: warninfo['msg'] += '\n'warninfo[...
5
8
2
84
0
562
569
562
null
[]
None
null
0
0
0
null
0
null
The function (CheckEquivalences.warnEqv) defined within the public class called public.The function start at line 562 and ends at 569. It contains 8 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [562.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CheckEquivalences
def CheckEquivalences(constrDict,varyList,fixedList,parmDict=None,seqHistNum=None):'''Process equivalence constraints, looking for conflicts such as where a parameter is used in both an equivalence and a constraint expressionor where chaining is done (A->B and B->C). Removes equivalences or parameters from equivalences...
87
193
5
1,266
21
539
801
539
null
['changed', 'warninfo', 'convertList', 'holdList', 'i', 'gotNotVary', 'msg', 'indepVarList', 'convVarList', 'droppedSym', 'dropVarList', 'count', 'removeList', 'gotHold', 'unvariedParmsList', 'depVarList', 'seenOnce', 'indvar', 'drop', 'multdepVarList', 'gotVary']
None
null
0
0
0
null
0
null
The function (CheckEquivalences) defined within the public class called public.The function start at line 539 and ends at 801. It contains 193 lines of code and it has a cyclomatic complexity of 87. It takes 5 parameters, represented as [539.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ProcessConstraints
def ProcessConstraints(constList,seqmode='use-all',seqhst=None):"""Interpret the constraints in the constList input into a dictionary, etc.All :class:`GSASIIobj.G2VarObj` objects are mapped to the appropriatephase/hist/atoms based on the object internals (random Ids). If this can't bedone (if a phase has been deleted, ...
31
80
3
539
13
803
920
803
null
['fixedList', 'constrDict', 'eqlist', 'firstmult', 'varyFlag', 'var', 'terms', 'varname', 'skip', 'ignored', 'firstvar', 'namedVarList', 'D']
None
null
0
0
0
null
0
null
The function (ProcessConstraints) defined within the public class called public.The function start at line 803 and ends at 920. It contains 80 lines of code and it has a cyclomatic complexity of 31. It takes 3 parameters, represented as [803.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
StoreHold
def StoreHold(var,holdType=None):'''Takes a variable name and prepares it to be removed from the refined variables.Called with user-supplied constraints by :func:`ProcessConstraints`.At present symGen is not used, but could be set up to track Holds generatedby symmetry.'''global holdParmList,holdParmTypeif var not in h...
3
5
2
35
0
922
933
922
null
[]
None
null
0
0
0
null
0
null
The function (StoreHold) defined within the public class called public.The function start at line 922 and ends at 933. It contains 5 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [922.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
StoreEquivalence
def StoreEquivalence(independentVar,dependentList,symGen=True):'''Takes a list of dependent parameter(s) and stores theirrelationship to a single independent parameter (independentVar).Called with user-supplied constraints by :func:`ProcessConstraints`,with Pawley constraints from :func:`GSASIIstrIO.GetPawleyConstr`, w...
6
27
3
171
4
935
1,000
935
null
['mapList', 'multlist', 'allfloat', 'mult']
None
null
0
0
0
null
0
null
The function (StoreEquivalence) defined within the public class called public.The function start at line 935 and ends at 1000. It contains 27 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [935.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SubfromParmDict
def SubfromParmDict(s,prmDict):'''Process a string as a multiplier and convert it to a float value. Thisis done by subsituting any GSAS-II parameter names that appear in the string that have associated values in the parameter dict with the value for that parameter. :param str s: a string to be converted to a value:para...
3
5
2
39
1
1,002
1,018
1,002
null
['s']
None
null
0
0
0
null
0
null
The function (SubfromParmDict) defined within the public class called public.The function start at line 1002 and ends at 1018. It contains 5 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [1002.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
EvaluateMultipliers
def EvaluateMultipliers(constList,*dicts):'''Convert multipliers for constraints and equivalences that are specifiedas strings into values. The strings can specify values in the parameter dicts as well as normal Python functions, such as "2*np.cos(0::Ax:2/2.)":param list constList: a list of dicts containing constraint...
17
47
2
278
4
1,020
1,078
1,020
null
['prmDict', 'newval', 'repList', 'problemList']
None
null
0
0
0
null
0
null
The function (EvaluateMultipliers) defined within the public class called public.The function start at line 1020 and ends at 1078. It contains 47 lines of code and it has a cyclomatic complexity of 17. It takes 2 parameters, represented as [1020.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetDependentVars
def GetDependentVars(opt=None):'''Return a list of dependent variables: e.g. parameters that areconstrained in terms of other parameters:param str opt: type of dependent variables.'equiv': from equivalences, 'constr': from constraintsNone (default): all:returns: a list of parameter names'''if opt == 'equiv':return cons...
3
7
1
40
0
1,080
1,095
1,080
null
[]
None
null
0
0
0
null
0
null
The function (GetDependentVars) defined within the public class called public.The function start at line 1080 and ends at 1095. 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
GetIndependentVars
def GetIndependentVars():'''Return a list of independent variables: e.g. parameters that areslaved to other parameters by constraints:returns: a list of parameter names'''return constrParms['indep-equiv']+constrParms['indep-constr']
1
2
0
15
0
1,097
1,104
1,097
null
[]
None
null
0
0
0
null
0
null
The function (GetIndependentVars) defined within the public class called public.The function start at line 1097 and ends at 1104. 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
getConstrError
def getConstrError(constrLst,seqmode,seqhst):'''This is used to display error messages for constraints and equivalence relations:parm list constrLst: a single constraint or equivalence as saved in the data tree(see :ref:`constraint definitions <Constraint_definitions_table>`).:param str seqmode: one of 'use-all', 'wild...
120
216
3
1,352
14
1,106
1,347
1,106
null
['undef', 'toBeUsed', 'zeroList', 'hold', 'unvar', 'note', 'v', 'terms', 'varList', 'gotNotVary', 'valid', 'gotVary', 'msg', 's']
None
null
0
0
0
null
0
null
The function (getConstrError) defined within the public class called public.The function start at line 1106 and ends at 1347. It contains 216 lines of code and it has a cyclomatic complexity of 120. It takes 3 parameters, represented as [1106.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ComputeDepESD
def ComputeDepESD(covMatrix,varyList,noSym=False):'''Compute uncertainties for dependent parameters from independent onesreturns a dictionary containing the esd values for dependent parameters:param np.array covMatrix: the full covariance matrix:param list varyList: the names of the variables matching the columns and r...
9
18
3
183
5
1,349
1,381
1,349
null
['iv1', 'iv2', 'varied', 'sigmaDict', 'vcov']
None
null
0
0
0
null
0
null
The function (ComputeDepESD) defined within the public class called public.The function start at line 1349 and ends at 1381. It contains 18 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [1349.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
_FormatConstraint
def _FormatConstraint(RelDict,RelVal):'''Formats a Constraint or Function for use in a convenient way'''linelen = 65s = [""]for var,val in RelDict.items():if var.startswith('_'): continueif len(s[-1]) > linelen: s.append(' ')m = valif s[-1] != "" and m >= 0:s[-1] += ' + 'elif s[-1] != "":s[-1] += ' - 'm = abs(m)if m ==...
12
26
2
193
4
1,383
1,409
1,383
null
['s', 'm', 's1', 'linelen']
None
null
0
0
0
null
0
null
The function (_FormatConstraint) defined within the public class called public.The function start at line 1383 and ends at 1409. It contains 26 lines of code and it has a cyclomatic complexity of 12. It takes 2 parameters, represented as [1383.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
_showEquiv
def _showEquiv(varlist,mapvars,invmultarr,longmsg=False):'''Format an equivalence relationship, note that varlist, mapvars, invmultarr are elements of dependentParmList, indParmList, invarrayList'''for i,mv in enumerate(mapvars):s1 = str(mv)if not longmsg:s1 += ' ==> 'elif len(varlist) == 1:s1 += ' is equivalent to 'el...
9
19
4
137
2
1,411
1,432
1,411
null
['j', 's1']
None
null
0
0
0
null
0
null
The function (_showEquiv) defined within the public class called public.The function start at line 1411 and ends at 1432. It contains 19 lines of code and it has a cyclomatic complexity of 9. It takes 4 parameters, represented as [1411.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
VarRemapSumm
def VarRemapSumm():'''Summarize the constraints in a single line:returns: a string summarizing the contraint relationships. May be blank'''varyList = saveVaryLists = ''depVars = constrParms['dep-equiv']+constrParms['dep-constr']userOut = 0symOut = 0consOut = 0varOut = 0freeOut = 0variedOut = 0global dependentParmList,a...
22
49
0
240
10
1,434
1,490
1,434
null
['userOut', 'varyList', 'variedOut', 'numHold', 'symOut', 'consOut', 'depVars', 's', 'freeOut', 'varOut']
None
null
0
0
0
null
0
null
The function (VarRemapSumm) defined within the public class called public.The function start at line 1434 and ends at 1490. It contains 49 lines of code and it has a cyclomatic complexity of 22. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
VarRemapShow
def VarRemapShow(varyList=None,inputOnly=False,linelen=60):'''List out the saved relationships. This should be done after the constraints have beendefined using :func:`StoreEquivalence`, :func:`GroupConstraints` and :func:`GenerateConstraints`.:returns: a string containing the details of the contraint relationships'''i...
61
145
3
858
16
1,492
1,652
1,492
null
['userOut', 'varyList', 'ln', 'first', 'symOut', 'varied', 'consOut', 'j', 'lineDict', 'depVars', 'lineOut', 's1', 'constrVal', 's', 'freeOut', 'varOut']
None
null
0
0
0
null
0
null
The function (VarRemapShow) defined within the public class called public.The function start at line 1492 and ends at 1652. It contains 145 lines of code and it has a cyclomatic complexity of 61. It takes 3 parameters, represented as [1492.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CountUserConstraints
def CountUserConstraints():'''Count the number of user-supplied constraints in use for the current refinement. Symmetry generated constraints are not countedas well as constraints that involve variables that are not varied.This is used for CIF reporting.:returns: an integer count'''varyList = saveVaryListglobal depende...
8
14
0
98
2
1,654
1,678
1,654
null
['count', 'varyList']
None
null
0
0
0
null
0
null
The function (CountUserConstraints) defined within the public class called public.The function start at line 1654 and ends at 1678. It contains 14 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
getInvConstraintEq
def getInvConstraintEq(var,varyList):'''For a dependent variable, find the constraint that defines the dependent variable in terms of varied independent variables.This works for constraint equations (via new var or generated parameters)or equivalences. For equivalences the result will lists of length 1:param str var: n...
8
15
2
119
3
1,680
1,704
1,680
null
['vList', 'i', 'mList']
None
null
0
0
0
null
0
null
The function (getInvConstraintEq) defined within the public class called public.The function start at line 1680 and ends at 1704. It contains 15 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [1680.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetSymEquiv
def GetSymEquiv(seqmode,seqhistnum):'''Return the automatically generated (equivalence) relationships.:returns: a list of strings containing the details of the contraint relationships'''symout = []symerr = []symhelp = []global dependentParmList,arrayList,invarrayList,indParmList,symGenListfor varlist,mapvars,multarr,in...
15
57
2
523
11
1,706
1,770
1,706
null
['m', 's2', 'cnstr', 'symerr', 'symout', 'j', 'helptext', 's1', 'var1', 's', 'symhelp']
None
null
0
0
0
null
0
null
The function (GetSymEquiv) defined within the public class called public.The function start at line 1706 and ends at 1770. It contains 57 lines of code and it has a cyclomatic complexity of 15. It takes 2 parameters, represented as [1706.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetDroppedSym
def GetDroppedSym(seqmode,seqhistnum):'''Return automatically generated (equivalence) relationships that wereconverted to constraint equations:returns: a list of strings containing the details of the equivalences'''symout = []symerr = []symhelp = []global droppedSymfor varlist,mapvars,multarr,invmultarr in droppedSym:f...
14
55
2
497
11
1,772
1,834
1,772
null
['m', 's2', 'cnstr', 'symerr', 'symout', 'j', 'helptext', 's1', 'var1', 's', 'symhelp']
None
null
0
0
0
null
0
null
The function (GetDroppedSym) defined within the public class called public.The function start at line 1772 and ends at 1834. It contains 55 lines of code and it has a cyclomatic complexity of 14. It takes 2 parameters, represented as [1772.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Dict2Deriv
def Dict2Deriv(varyList,derivDict,dMdv):'''Compute derivatives for Independent Parameters from thederivatives for the original parameters:param list varyList: a list of parameters names that will be varied:param dict derivDict: a dict containing derivatives for parameter values keyed by theparameter names.:param list d...
10
14
3
162
0
1,836
1,863
1,836
null
[]
None
null
0
0
0
null
0
null
The function (Dict2Deriv) defined within the public class called public.The function start at line 1836 and ends at 1863. It contains 14 lines of code and it has a cyclomatic complexity of 10. It takes 3 parameters, represented as [1836.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Map2Dict
def Map2Dict(parmDict,varyList):'''Updates the parameter dictionary and the varyList using the equivalence and constraint input. This should be called at least once, after the constraints have been defined using :func:`StoreEquivalence`, :func:`GroupConstraints` and :func:`GenerateConstraints` and before any parameter ...
17
19
2
221
3
1,865
1,915
1,865
null
['z', 'A', 'saveVaryList']
None
null
0
0
0
null
0
null
The function (Map2Dict) defined within the public class called public.The function start at line 1865 and ends at 1915. It contains 19 lines of code and it has a cyclomatic complexity of 17. It takes 2 parameters, represented as [1865.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
normParms
def normParms(parmDict):'''Attempt to put parameters into the right ballpark by scaling to enforce constraint equations'''for varlist,mapvars,multarr,invmultarr in zip(dependentParmList,indParmList,arrayList,invarrayList):if multarr is None or invmultarr is None: continue # unexpectedfor i,s in enumerate(mapvars):try:s...
12
18
1
126
2
1,917
1,937
1,917
null
['s', 'sumcons']
None
null
0
0
0
null
0
null
The function (normParms) defined within the public class called public.The function start at line 1917 and ends at 1937. It contains 18 lines of code and it has a cyclomatic complexity of 12. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Dict2Map
def Dict2Map(parmDict):'''Applies the constraints defined using :func:`StoreEquivalence`,:func:`GroupConstraints` and :func:`GenerateConstraints` by changingvalues in a dict containing the parameters. This should bedone after refinement and before the parameters are used for any computations:param dict parmDict: a dict...
5
9
1
94
1
1,939
1,958
1,939
null
['valslist']
None
null
0
0
0
null
0
null
The function (Dict2Map) defined within the public class called public.The function start at line 1939 and ends at 1958. 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
GramSchmidtOrtho.proj
def proj(a,b):'Projection operator'return a*(np.dot(a,b)/np.dot(a,a))
1
3
2
30
0
1,975
1,977
1,975
null
[]
None
null
0
0
0
null
0
null
The function (GramSchmidtOrtho.proj) defined within the public class called public.The function start at line 1975 and ends at 1977. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1975.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GramSchmidtOrtho
def GramSchmidtOrtho(a,nkeep=0):'''Use the Gram-Schmidt process (http://en.wikipedia.org/wiki/Gram-Schmidt) tofind orthonormal unit vectors relative to first row.If nkeep is non-zero, the first nkeep rows in the array are not changedinput:arrayin: a 2-D non-singular square arrayreturns: a orthonormal set of unit vector...
4
9
2
96
0
1,964
1,984
1,964
null
[]
None
null
0
0
0
null
0
null
The function (GramSchmidtOrtho) defined within the public class called public.The function start at line 1964 and ends at 1984. It contains 9 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [1964.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
_FillArray
def _FillArray(sel,d,collist):'''Construct a n by n matrix [n = len(collist)]with the initial m rows [m = len(sel)] using the relationships defined in the expressions dict, d.Since m may be smaller than n, the remaining rowsare filled with rows that are tested to not createa singular matrix. :param list sel: a list of ...
10
35
3
239
3
1,986
2,034
1,986
null
['m', 'n', 'arr']
None
null
0
0
0
null
0
null
The function (_FillArray) defined within the public class called public.The function start at line 1986 and ends at 2034. It contains 35 lines of code and it has a cyclomatic complexity of 10. It takes 3 parameters, represented as [1986.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
_SwapColumns
def _SwapColumns(i,m,v):'''Swap columns in matrix m as well as the labels in v so that element (i,i) is replaced by the first non-zero element in row i after that elementThrows an exception if there are no non-zero elements in that row'''for j in range(i+1,len(v)):if not np.allclose(m[i,j],0):m[:,(i,j)] = m[:,(j,i)]v[i...
3
8
3
89
0
2,036
2,048
2,036
null
[]
None
null
0
0
0
null
0
null
The function (_SwapColumns) defined within the public class called public.The function start at line 2036 and ends at 2048. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [2036.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
_RowEchelon
def _RowEchelon(m,arr,collist):'''Convert the first m rows in Matrix arr to row-echelon formexchanging columns in the matrix and collist as needed.throws an exception if the matrix is singular becausethe first m rows are not linearly independent'''for i in range(m):if np.allclose(arr[i,i],0):_SwapColumns(i,arr,collist)...
4
7
3
87
0
2,050
2,063
2,050
null
[]
None
null
0
0
0
null
0
null
The function (_RowEchelon) defined within the public class called public.The function start at line 2050 and ends at 2063. It contains 7 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [2050.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
pinv
def pinv(a, rcond=1e-15 ):'''Compute the (Moore-Penrose) pseudo-inverse of a matrix.Modified from numpy.linalg.pinv; assumes a is Hessian & returns no. zeros foundCalculate the generalized inverse of a matrix using itssingular-value decomposition (SVD) and including all*large* singular values.:param array a: (M, M) arr...
1
7
2
94
4
62
107
62
null
['s', 'res', 'nzero', 'cutoff']
None
null
0
0
0
null
0
null
The function (pinv) defined within the public class called public.The function start at line 62 and ends at 107. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [62.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
dropTerms
def dropTerms(bad, hessian, indices, *vectors):'''Remove the 'bad' terms from the Hessian and vector:param tuple bad: a list of variable (row/column) numbers that should beremoved from the hessian and vector. Example: (0,3) removes the 1st and4th column/row:param np.array hessian: a square matrix of length n x n:param ...
2
5
4
65
1
109
127
109
null
['out']
None
null
0
0
0
null
0
null
The function (dropTerms) defined within the public class called public.The function start at line 109 and ends at 127. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [109.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
setHcorr
def setHcorr(info,Amat,xtol,problem=False):'''Find & report high correlation terms in covariance matrix'''Adiag = np.sqrt(np.diag(Amat))if np.any(np.abs(Adiag) < 1.e-14): raise G2NormException# test for any hard singularitiesAnorm = np.outer(Adiag,Adiag)Amat = Amat/AnormBmat,Nzeros = pinv(Amat,xtol)#Moore-Penrose inver...
5
16
4
220
8
129
146
129
null
['AcovUp', 'Bmat', 'm', 'Amat', 'sig', 'xvar', 'Adiag', 'Anorm']
None
null
0
0
0
null
0
null
The function (setHcorr) defined within the public class called public.The function start at line 129 and ends at 146. It contains 16 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [129.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
setSVDwarn
def setSVDwarn(info,Amat,Nzeros,indices):'''Find & report terms causing SVD zeros'''if Nzeros == 0: returnd = np.abs(np.diag(nl.qr(Amat)[1]))svdsing = list(np.where(d < 1.e-14)[0])if len(svdsing) < Nzeros: # try to get the Nzeros worst termssvdsing = list(np.where(d <= sorted(d)[Nzeros-1])[0])if not len(svdsing): # mak...
5
9
4
123
2
148
160
148
null
['svdsing', 'd']
None
null
0
0
0
null
0
null
The function (setSVDwarn) defined within the public class called public.The function start at line 148 and ends at 160. It contains 9 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [148.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
HessianLSQ
def HessianLSQ(func,x0,Hess,args=(),ftol=1.49012e-8,xtol=1.e-6, maxcyc=0,lamda=-3,Print=False,refPlotUpdate=None):'''Minimize the sum of squares of a function (:math:`f`) evaluated on a series ofvalues (y): :math:`\\sum_{y=0}^{N_{obs}} f(y,{args})`where :math:`x = arg min(\\sum_{y=0}^{N_{obs}} (func(y)^2,axis=0))`:para...
70
240
4
2,326
40
162
459
162
null
['args', 'Histograms', 'ifConverged', 'info', 'AmatAll', 'Xvec', 'd', 'chisq00', 'chitol', 'XvecAll', 'n', 'chisqf', 'chisq1', 'Amat', 'Bmat', 'maxdrop', 'dlg', 'nfev', 'M', 'psing_prev', 'loops', 'x0', 'Nzeros', 'Nobs', 'deltaChi2', 'Amatlam', 'icycle', 'ins', 'Anorm', 'chisq0', 'maxcyc', 'indices', 'time0', 'psing', ...
None
null
0
0
0
null
0
null
The function (HessianLSQ) defined within the public class called public.The function start at line 162 and ends at 459. It contains 240 lines of code and it has a cyclomatic complexity of 70. It takes 4 parameters, represented as [162.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
HessianSVD
def HessianSVD(func,x0,Hess,args=(),ftol=1.49012e-8,xtol=1.e-6, maxcyc=0,lamda=-3,Print=False,refPlotUpdate=None):'''Minimize the sum of squares of a function (:math:`f`) evaluated on a series ofvalues (y): :math:`\\sum_{y=0}^{N_{obs}} f(y,{args})`where :math:`x = arg min(\\sum_{y=0}^{N_{obs}} (func(y)^2,axis=0))`:para...
14
70
4
710
20
461
576
461
null
['args', 'Histograms', 'ifConverged', 'Xvec', 'chisq00', 'Bmat', 'n', 'chisq1', 'Amat', 'nfev', 'M', 'x0', 'deltaChi2', 'icycle', 'Anorm', 'chisq0', 'time0', 'psing', 'M2', 'Adiag']
None
null
0
0
0
null
0
null
The function (HessianSVD) defined within the public class called public.The function start at line 461 and ends at 576. It contains 70 lines of code and it has a cyclomatic complexity of 14. It takes 4 parameters, represented as [461.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getVCov
def getVCov(varyNames,varyList,covMatrix):'''obtain variance-covariance terms for a set of variables. NB: the varyListand covMatrix were saved by the last least squares refinement so they must match.:param list varyNames: variable names to find v-cov matric for:param list varyList: full list of all variables in v-cov m...
4
9
3
91
1
578
602
578
null
['vcov']
None
null
0
0
0
null
0
null
The function (getVCov) defined within the public class called public.The function start at line 578 and ends at 602. It contains 9 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [578.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getAtomPtrs
def getAtomPtrs(data,draw=False):''' get atom data pointers cx,ct,cs,cia in Atoms or Draw Atoms listsNB:may not match column numbers in displayed tableparam: dict: data phase data structuredraw: boolean True if Draw Atoms list pointers are requiredreturn: cx,ct,cs,cia pointers to atom xyz, type, site sym, uiso/aniso fl...
2
5
2
31
0
608
619
608
null
[]
None
null
0
0
0
null
0
null
The function (getAtomPtrs) defined within the public class called public.The function start at line 608 and ends at 619. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [608.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FindMolecule.getNeighbors
def getNeighbors(atom,radius):Dx = UAtoms-np.array(atom[cx:cx+3])dist = ma.masked_less(np.sqrt(np.sum(np.inner(Amat,Dx)**2,axis=0)),0.5) #gets rid of disorder "bonds" < 0.5AsumR = Radii+radiusreturn set(ma.nonzero(ma.masked_greater(dist-factor*sumR,0.))[0])#get indices of bonded atoms
1
5
2
89
0
623
627
623
null
[]
None
null
0
0
0
null
0
null
The function (FindMolecule.getNeighbors) defined within the public class called public.The function start at line 623 and ends at 627. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [623.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FindMolecule
def FindMolecule(ind,generalData,atomData):#uses numpy & masks - very fast even for proteins!def getNeighbors(atom,radius):Dx = UAtoms-np.array(atom[cx:cx+3])dist = ma.masked_less(np.sqrt(np.sum(np.inner(Amat,Dx)**2,axis=0)),0.5) #gets rid of disorder "bonds" < 0.5AsumR = Radii+radiusreturn set(ma.nonzero(ma.masked_gre...
19
75
3
650
23
621
701
621
null
['dist', 'nAtom', 'radius', 'UAtoms', 'factor', 'Units', 'unit', 'IndB', 'newAtoms', 'indb', 'DisAglCtls', 'SGData', 'atomTypes', 'Dx', 'Indx', 'Radii', 'jndb', 'newAtom', 'indices', 'indH', 'mAtoms', 'sumR', 'radii']
None
null
0
0
0
null
0
null
The function (FindMolecule) defined within the public class called public.The function start at line 621 and ends at 701. It contains 75 lines of code and it has a cyclomatic complexity of 19. It takes 3 parameters, represented as [621.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FindAtomIndexByIDs
def FindAtomIndexByIDs(atomData,loc,IDs,Draw=True):'''finds the set of atom array indices for a list of atom IDs. Will searcheither the Atom table or the drawAtom table.:param list atomData: Atom or drawAtom table containting coordinates, etc.:param int loc: location of atom id in atomData record:param list IDs: atom I...
5
8
4
60
1
703
722
703
null
['indx']
None
null
0
0
0
null
0
null
The function (FindAtomIndexByIDs) defined within the public class called public.The function start at line 703 and ends at 722. It contains 8 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [703.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FillAtomLookUp
def FillAtomLookUp(atomData,indx):'''create a dictionary of atom indexes with atom IDs as keys:param list atomData: Atom table to be used:param intindx: pointer to position of atom id in atom record (typically cia+8):returns: dict atomLookUp: dictionary of atom indexes with atom IDs as keys'''return {atom[indx]:iatm fo...
2
2
2
26
0
724
733
724
null
[]
None
null
0
0
0
null
0
null
The function (FillAtomLookUp) defined within the public class called public.The function start at line 724 and ends at 733. It contains 2 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [724.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
DrawAtomsReplaceByID
def DrawAtomsReplaceByID(data,loc,atom,ID):'''Replace all atoms in drawing array with an ID matching the specified value'''atomData = data['Drawing']['Atoms']indx = FindAtomIndexByIDs(atomData,loc,[ID,])for ind in indx:atomData[ind] = MakeDrawAtom(data,atom,atomData[ind])
2
5
4
55
2
735
740
735
null
['indx', 'atomData']
None
null
0
0
0
null
0
null
The function (DrawAtomsReplaceByID) defined within the public class called public.The function start at line 735 and ends at 740. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [735.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
MakeDrawAtom
def MakeDrawAtom(data,atom,oldatom=None):'needs a description'AA3letter = ['ALA','ARG','ASN','ASP','CYS','GLN','GLU','GLY','HIS','ILE','LEU','LYS','MET','PHE','PRO','SER','THR','TRP','TYR','VAL','MSE','HOH','WAT','UNK']AA1letter = ['A','R','N','D','C','Q','E','G','H','I','L','K','M','F','P','S','T','W','Y','V','M',' ',...
10
54
3
833
13
742
795
742
null
['opr', 'AA3letter', 'AA1letter', 'Mom', 'atomInfo', 'generalData', 'deftype', 'oneLetter', 'mom', 'SSGData', 'atNum', 'SGData', 'X']
None
null
0
0
0
null
0
null
The function (MakeDrawAtom) defined within the public class called public.The function start at line 742 and ends at 795. It contains 54 lines of code and it has a cyclomatic complexity of 10. It takes 3 parameters, represented as [742.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetAtomsById
def GetAtomsById(atomData,atomLookUp,IdList):'''gets a list of atoms from Atom table that match a set of atom IDs:param list atomData: Atom table to be used:param dict atomLookUp: dictionary of atom indexes with atom IDs as keys:param list IdList: atom IDs to be found:returns: list atoms: list of atoms found'''atoms = ...
3
7
3
39
1
797
812
797
null
['atoms']
None
null
0
0
0
null
0
null
The function (GetAtomsById) defined within the public class called public.The function start at line 797 and ends at 812. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [797.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetAtomItemsById
def GetAtomItemsById(atomData,atomLookUp,IdList,itemLoc,numItems=1):'''gets atom parameters for atoms using atom IDs:param list atomData: Atom table to be used:param dict atomLookUp: dictionary of atom indexes with atom IDs as keys:param list IdList: atom IDs to be found:param int itemLoc: pointer to desired 1st item i...
5
12
5
89
2
814
836
814
null
['IdList', 'Items']
None
null
0
0
0
null
0
null
The function (GetAtomItemsById) defined within the public class called public.The function start at line 814 and ends at 836. It contains 12 lines of code and it has a cyclomatic complexity of 5. It takes 5 parameters, represented as [814.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetAtomCoordsByID
def GetAtomCoordsByID(pId,parmDict,AtLookup,indx):'''default doc string:param type name: description:returns: type name: description'''pfx = [str(pId)+'::A'+i+':' for i in ['x','y','z']]dpfx = [str(pId)+'::dA'+i+':' for i in ['x','y','z']]XYZ = []for ind in indx:names = [pfx[i]+str(AtLookup[ind]) for i in range(3)]dnam...
7
9
4
144
5
838
853
838
null
['dpfx', 'names', 'XYZ', 'pfx', 'dnames']
None
null
0
0
0
null
0
null
The function (GetAtomCoordsByID) defined within the public class called public.The function start at line 838 and ends at 853. It contains 9 lines of code and it has a cyclomatic complexity of 7. It takes 4 parameters, represented as [838.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetAtomFracByID
def GetAtomFracByID(pId,parmDict,AtLookup,indx):'''default doc string:param type name: description:returns: type name: description'''pfx = str(pId)+'::Afrac:'Frac = []for ind in indx:name = pfx+str(AtLookup[ind])Frac.append(parmDict[name])return Frac
2
7
4
51
3
855
868
855
null
['Frac', 'pfx', 'name']
None
null
0
0
0
null
0
null
The function (GetAtomFracByID) defined within the public class called public.The function start at line 855 and ends at 868. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [855.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetAtomMomsByID
def GetAtomMomsByID(pId,parmDict,AtLookup,indx):'''default doc string:param type name: description:returns: type name: description'''pfx = [str(pId)+'::A'+i+':' for i in ['Mx','My','Mz']]Mom = []for ind in indx:names = [pfx[i]+str(AtLookup[ind]) for i in range(3)]Mom.append([parmDict[name] for name in names])return Mom
5
7
4
85
3
876
889
876
null
['Mom', 'pfx', 'names']
None
null
0
0
0
null
0
null
The function (GetAtomMomsByID) defined within the public class called public.The function start at line 876 and ends at 889. It contains 7 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [876.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ApplySeqData
def ApplySeqData(data,seqData,PF2=False):'''Applies result from seq. refinement to drawing atom positions & Uijs:param dict data: GSAS-II phase data structure:param dict seqData: GSAS-II sequential refinement results structure:param bool PF2: if True then seqData is from a sequential run of PDFfit2:returns: list drawAt...
13
55
3
672
20
891
955
891
null
['opr', 'drawAtoms', 'pId', 'PDFData', 'item', 'pfx', 'Ids', 'AtmConstr', 'SGData', 'drawatom', 'parmDict', 'atuiso', 'itm', 'dxyz', 'drawingData', 'atxyz', 'indx', 'atuij', 'atoms', 'X']
None
null
0
0
0
null
0
null
The function (ApplySeqData) defined within the public class called public.The function start at line 891 and ends at 955. It contains 55 lines of code and it has a cyclomatic complexity of 13. It takes 3 parameters, represented as [891.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FindOctahedron
def FindOctahedron(results):Octahedron = np.array([[1.,0,0],[0,1.,0],[0,0,1.],[-1.,0,0],[0,-1.,0],[0,0,-1.]])Polygon = np.array([result[3] for result in results])Dists = np.array([np.sqrt(np.sum(axis**2)) for axis in Polygon])bond = np.mean(Dists)std = np.std(Dists)Norms = Polygon/Dists[:,nxs]Tilts = acosd(np.dot(Norms...
6
27
1
407
23
957
983
957
null
['std', 'Octahedron', 'Tilts', 'disp', 'QQ', 'dispids', 'stdDisp', 'bond', 'QA', 'jAng', 'newNorms', 'Disps', 'Qbvec', 'Polygon', 'Norms', 'iAng', 'QB', 'meanDisp', 'Qavec', 'vecDisp', 'dispVecs', 'Dists', 'Rots']
None
null
0
0
0
null
0
null
The function (FindOctahedron) defined within the public class called public.The function start at line 957 and ends at 983. It contains 27 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
FindTetrahedron
def FindTetrahedron(results):Tetrahedron = np.array([[1.,1,1],[1,-1,-1],[-1,1,-1],[-1,-1,1]])/np.sqrt(3.)Polygon = np.array([result[3] for result in results])Dists = np.array([np.sqrt(np.sum(axis**2)) for axis in Polygon])bond = np.mean(Dists)std = np.std(Dists)Norms = Polygon/Dists[:,nxs]Tilts = acosd(np.dot(Norms,Tet...
6
27
1
397
23
985
1,011
985
null
['std', 'Tilts', 'disp', 'QQ', 'dispids', 'stdDisp', 'bond', 'QA', 'jAng', 'newNorms', 'Disps', 'Qbvec', 'Polygon', 'Norms', 'iAng', 'QB', 'Tetrahedron', 'meanDisp', 'Qavec', 'vecDisp', 'dispVecs', 'Dists', 'Rots']
None
null
0
0
0
null
0
null
The function (FindTetrahedron) defined within the public class called public.The function start at line 985 and ends at 1011. It contains 27 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
FindNeighbors
def FindNeighbors(phase,FrstName,AtNames,notName=''):General = phase['General']cx,ct,cs,cia = getAtomPtrs(phase)Atoms = phase['Atoms']atNames = [atom[ct-1] for atom in Atoms]Cell = General['Cell'][1:7]Amat,Bmat = G2lat.cell2AB(Cell)atTypes = General['AtomTypes']Radii = np.array(General['BondRadii'])try:DisAglCtls = Gen...
7
31
4
311
19
1,013
1,043
1,013
null
['Orig', 'dist', 'XYZ', 'AtInfo', 'Ids', 'atTypes', 'OType', 'IndB', 'DisAglCtls', 'Radii', 'Dx', 'atNames', 'Atoms', 'OId', 'radiusFactor', 'General', 'Cell', 'Neigh', 'sumR']
None
null
0
0
0
null
0
null
The function (FindNeighbors) defined within the public class called public.The function start at line 1013 and ends at 1043. It contains 31 lines of code and it has a cyclomatic complexity of 7. It takes 4 parameters, represented as [1013.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FindAllNeighbors
def FindAllNeighbors(phase,FrstName,AtNames,notName='',Orig=None,Short=False,searchType='Bond'):'''Find neighboring atomsUses Bond search criteria unless searchType is set to non-default'''if searchType == 'Bond':skey = 'BondRadii'sindex = 0else:skey = 'AngleRadii'sindex = 1General = phase['General']cx,ct,cs,cia = getA...
19
62
7
612
30
1,045
1,109
1,045
null
['Orig', 'dist', 'XYZ', 'AtInfo', 'Ids', 'Units', 'atTypes', 'OType', 'results', 'sindex', 'IndB', 'unit', 'DisAglCtls', 'SGData', 'Radii', 'Dx', 'atNames', 'Atoms', 'OId', 'Oxyz', 'Topstr', 'radiusFactor', 'AtTypes', 'dx', 'indices', 'skey', 'General', 'Cell', 'Neigh', 'sumR']
None
null
0
0
0
null
0
null
The function (FindAllNeighbors) defined within the public class called public.The function start at line 1045 and ends at 1109. It contains 62 lines of code and it has a cyclomatic complexity of 19. It takes 7 parameters, represented as [1045.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
calcBond
def calcBond(A,Ax,Bx,MTCU):cell = G2lat.A2cell(A)Amat,Bmat = G2lat.cell2AB(cell)M,T,C,U = MTCUBtx = np.inner(M,Bx)+T+C+UDx = Btx-Axdist = np.sqrt(np.inner(Amat,Dx))return dist
1
8
4
76
4
1,111
1,118
1,111
null
['cell', 'dist', 'Btx', 'Dx']
None
null
0
0
0
null
0
null
The function (calcBond) defined within the public class called public.The function start at line 1111 and ends at 1118. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [1111.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
AddHydrogens.getTransMat
def getTransMat(RXYZ,OXYZ,TXYZ,Amat):Vec = np.inner(Amat,np.array([OXYZ-TXYZ[0],RXYZ-TXYZ[0]])).TVec /= np.sqrt(np.sum(Vec**2,axis=1))[:,nxs]Mat2 = np.cross(Vec[0],Vec[1])#UxVMat2 /= np.sqrt(np.sum(Mat2**2))Mat3 = np.cross(Mat2,Vec[0])#(UxV)xUreturn nl.inv(np.array([Vec[0],Mat2,Mat3]))
1
7
4
133
0
1,122
1,128
1,122
null
[]
None
null
0
0
0
null
0
null
The function (AddHydrogens.getTransMat) defined within the public class called public.The function start at line 1122 and ends at 1128. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [1122.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
AddHydrogens
def AddHydrogens(AtLookUp,General,Atoms,AddHydId):def getTransMat(RXYZ,OXYZ,TXYZ,Amat):Vec = np.inner(Amat,np.array([OXYZ-TXYZ[0],RXYZ-TXYZ[0]])).TVec /= np.sqrt(np.sum(Vec**2,axis=1))[:,nxs]Mat2 = np.cross(Vec[0],Vec[1])#UxVMat2 /= np.sqrt(np.sum(Mat2**2))Mat3 = np.cross(Mat2,Vec[0])#(UxV)xUreturn nl.inv(np.array([Vec...
13
88
4
1,197
22
1,120
1,215
1,120
null
['iMat', 'TXYZ', 'Mat2', 'Oatom', 'Ratom', 'mapData', 'a', 'Uiso', 'b', 'imax', 'azm', 'Vec', 'OXYZ', 'Tatoms', 'Mat3', 'Len', 'RXYZ', 'Hpos', 'HU', 'nBonds', 'Cell', 'Rhos']
None
null
0
0
0
null
0
null
The function (AddHydrogens) defined within the public class called public.The function start at line 1120 and ends at 1215. It contains 88 lines of code and it has a cyclomatic complexity of 13. It takes 4 parameters, represented as [1120.0] and does not return any value..