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
FitHKLE.errFitE
def errFitE(values,ibrav,d,H,keV,tth):A = Values2A(ibrav,values)Qo = 1./d**2Qc = G2lat.calc_rDsq(H,A)return (Qo-Qc)
1
5
6
47
0
625
629
625
null
[]
None
null
0
0
0
null
0
null
The function (FitHKLE.errFitE) defined within the public class called public.The function start at line 625 and ends at 629. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [625.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FitHKLE.dervFitE
def dervFitE(values,ibrav,d,H,keV,tth):if ibrav in [0,1,2]:derv = [H[0]*H[0]+H[1]*H[1]+H[2]*H[2],]elif ibrav in [3,4,]:derv = [H[0]*H[0]+H[1]*H[1]+H[0]*H[1],H[2]*H[2]]elif ibrav in [5,6]:derv = [H[0]*H[0]+H[1]*H[1],H[2]*H[2]]elif ibrav in [7,8,9,10,11,12]:derv = [H[0]*H[0],H[1]*H[1],H[2]*H[2]]elif ibrav in [13,14,15,16...
6
15
6
338
0
631
645
631
null
[]
None
null
0
0
0
null
0
null
The function (FitHKLE.dervFitE) defined within the public class called public.The function start at line 631 and ends at 645. It contains 15 lines of code and it has a cyclomatic complexity of 6. It takes 6 parameters, represented as [631.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FitHKLE
def FitHKLE(tth,ibrav,peaks,A):'needs a doc string'def errFitE(values,ibrav,d,H,keV,tth):A = Values2A(ibrav,values)Qo = 1./d**2Qc = G2lat.calc_rDsq(H,A)return (Qo-Qc)def dervFitE(values,ibrav,d,H,keV,tth):if ibrav in [0,1,2]:derv = [H[0]*H[0]+H[1]*H[1]+H[2]*H[2],]elif ibrav in [3,4,]:derv = [H[0]*H[0]+H[1]*H[1]+H[0]*H[...
1
11
4
139
8
622
653
622
null
['chisq', 'Qc', 'result', 'values', 'Peaks', 'Qo', 'A', 'derv']
None
null
0
0
0
null
0
null
The function (FitHKLE) defined within the public class called public.The function start at line 622 and ends at 653. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [622.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FitHKLTSS.errFitTSS
def errFitTSS(values,ibrav,d,H,tof,difC,vec,Vref,Z,Zref):Zero = Zif Zref:Zero = values[-1]A = Values2A(ibrav,values)Vec = Values2Vec(ibrav,vec,Vref,values)Qo = 1./d**2Qc = G2lat.calc_rDsqTSS(H,A,Vec,Zero,tof,difC)return (Qo-Qc)
2
9
10
88
0
658
666
658
null
[]
None
null
0
0
0
null
0
null
The function (FitHKLTSS.errFitTSS) defined within the public class called public.The function start at line 658 and ends at 666. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 10 parameters, represented as [658.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FitHKLTSS.dervFitTSS
def dervFitTSS(values,ibrav,d,H,tof,difC,vec,Vref,Z,Zref):A = Values2A(ibrav,values)Vec = Values2Vec(ibrav,vec,Vref,values)HM = H[:3]+(H[3][:,np.newaxis]*Vec).Tif ibrav in [3,4,]:derv = [HM[0]*HM[0]+HM[1]*HM[1]+HM[0]*HM[1],HM[2]*HM[2]]elif ibrav in [5,6]:derv = [HM[0]*HM[0]+HM[1]*HM[1],HM[2]*HM[2]]elif ibrav in [7,8,9,...
9
24
10
536
0
668
691
668
null
[]
None
null
0
0
0
null
0
null
The function (FitHKLTSS.dervFitTSS) defined within the public class called public.The function start at line 668 and ends at 691. It contains 24 lines of code and it has a cyclomatic complexity of 9. It takes 10 parameters, represented as [668.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FitHKLTSS
def FitHKLTSS(difC,ibrav,peaks,A,V,Vref,Z,Zref):'needs a doc string'def errFitTSS(values,ibrav,d,H,tof,difC,vec,Vref,Z,Zref):Zero = Zif Zref:Zero = values[-1]A = Values2A(ibrav,values)Vec = Values2Vec(ibrav,vec,Vref,values)Qo = 1./d**2Qc = G2lat.calc_rDsqTSS(H,A,Vec,Zero,tof,difC)return (Qo-Qc)def dervFitTSS(values,ibr...
5
21
8
233
12
655
709
655
null
['chisq', 'Z', 'Qc', 'result', 'values', 'Zero', 'Peaks', 'HM', 'Vec', 'Qo', 'A', 'derv']
None
null
0
0
0
null
0
null
The function (FitHKLTSS) defined within the public class called public.The function start at line 655 and ends at 709. It contains 21 lines of code and it has a cyclomatic complexity of 5. It takes 8 parameters, represented as [655.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
rotOrthoA
def rotOrthoA(A):'needs a doc string'return [A[1],A[2],A[0],0,0,0]
1
3
1
29
0
711
713
711
null
[]
None
null
0
0
0
null
0
null
The function (rotOrthoA) defined within the public class called public.The function start at line 711 and ends at 713. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
swapMonoA
def swapMonoA(A):'needs a doc string'return [A[2],A[1],A[0],0,A[4],0]
1
3
1
32
0
715
717
715
null
[]
None
null
0
0
0
null
0
null
The function (swapMonoA) defined within the public class called public.The function start at line 715 and ends at 717. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
oddPeak
def oddPeak(indx,peaks):'needs a doc string'noOdd = Truefor peak in peaks:H = peak[4:7]if H[indx] % 2:noOdd = Falsereturn noOdd
3
8
2
37
2
719
726
719
null
['noOdd', 'H']
None
null
0
0
0
null
0
null
The function (oddPeak) defined within the public class called public.The function start at line 719 and ends at 726. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [719.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
halfCell
def halfCell(ibrav,A,peaks):'needs a doc string'if ibrav in [0,1,2]:if oddPeak(0,peaks):A[0] *= 2A[1] = A[2] = A[0]elif ibrav in [3,4,5,6]:if oddPeak(0,peaks):A[0] *= 2A[1] = A[0]if oddPeak(2,peaks):A[2] *=2else:if oddPeak(0,peaks):A[0] *=2if oddPeak(1,peaks):A[1] *=2if oddPeak(2,peaks):A[2] *=2return A
9
20
3
151
0
728
747
728
null
[]
None
null
0
0
0
null
0
null
The function (halfCell) defined within the public class called public.The function start at line 728 and ends at 747. It contains 20 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [728.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getDmin
def getDmin(peaks):'needs a doc string'return peaks[-1][-2]
1
3
1
16
0
749
751
749
null
[]
None
null
0
0
0
null
0
null
The function (getDmin) defined within the public class called public.The function start at line 749 and ends at 751. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getDmax
def getDmax(peaks):'needs a doc string'return peaks[0][-2]
1
3
1
15
0
753
755
753
null
[]
None
null
0
0
0
null
0
null
The function (getDmax) defined within the public class called public.The function start at line 753 and ends at 755. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
refinePeaksZ
def refinePeaksZ(peaks,wave,ibrav,A,Zero,ZeroRef):'needs a doc string'dmin = getDmin(peaks)OK,smin,Aref,Z,result = FitHKLZ(wave,ibrav,peaks,A,Zero,ZeroRef)Peaks = np.array(peaks).TH = Peaks[4:7]Peaks[8] = 1./np.sqrt(G2lat.calc_rDsqZ(H,Aref,Z,Peaks[0],wave))peaks = Peaks.THKL = G2lat.GenHBravais(dmin,ibrav,A)M20,X20 = c...
1
11
6
134
5
757
767
757
null
['dmin', 'peaks', 'Peaks', 'HKL', 'H']
None
null
0
0
0
null
0
null
The function (refinePeaksZ) defined within the public class called public.The function start at line 757 and ends at 767. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [757.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
refinePeaksT
def refinePeaksT(peaks,difC,ibrav,A,Zero,ZeroRef):'needs a doc string'dmin = getDmin(peaks)OK,smin,Aref,Z,result = FitHKLT(difC,ibrav,peaks,A,Zero,ZeroRef)Peaks = np.array(peaks).TH = Peaks[4:7]Peaks[8] = 1./np.sqrt(G2lat.calc_rDsqT(H,Aref,Z,Peaks[0],difC))peaks = Peaks.THKL = G2lat.GenHBravais(dmin,ibrav,A)M20,X20 = c...
1
11
6
134
5
769
779
769
null
['dmin', 'peaks', 'Peaks', 'HKL', 'H']
None
null
0
0
0
null
0
null
The function (refinePeaksT) defined within the public class called public.The function start at line 769 and ends at 779. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [769.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
refinePeaksE
def refinePeaksE(peaks,tth,ibrav,A):'needs a doc string'dmin = getDmin(peaks)OK,smin,Aref,result = FitHKLE(tth,ibrav,peaks,A)Peaks = np.array(peaks).TH = Peaks[4:7]Peaks[8] = 1./np.sqrt(G2lat.calc_rDsq(H,Aref))peaks = Peaks.THKL = G2lat.GenHBravais(dmin,ibrav,A)M20,X20 = calc_M20(peaks,HKL)return len(HKL),M20,X20,Aref
1
11
4
113
5
781
791
781
null
['dmin', 'peaks', 'Peaks', 'HKL', 'H']
None
null
0
0
0
null
0
null
The function (refinePeaksE) defined within the public class called public.The function start at line 781 and ends at 791. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [781.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
refinePeaksZSS
def refinePeaksZSS(peaks,wave,Inst,SGData,SSGData,maxH,ibrav,A,vec,vecRef,Zero,ZeroRef):'needs a doc string'dmin = getDmin(peaks)OK,smin,Aref,Vref,Z,result = FitHKLZSS(wave,ibrav,peaks,A,vec,vecRef,Zero,ZeroRef)Peaks = np.array(peaks).TH = Peaks[4:8]Peaks[9] = 1./np.sqrt(G2lat.calc_rDsqZSS(H,Aref,Vref,Z,Peaks[0],wave))...
1
11
12
164
5
793
803
793
null
['dmin', 'peaks', 'Peaks', 'HKL', 'H']
None
null
0
0
0
null
0
null
The function (refinePeaksZSS) defined within the public class called public.The function start at line 793 and ends at 803. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 12 parameters, represented as [793.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
refinePeaksTSS
def refinePeaksTSS(peaks,difC,Inst,SGData,SSGData,maxH,ibrav,A,vec,vecRef,Zero,ZeroRef):'needs a doc string'dmin = getDmin(peaks)OK,smin,Aref,Vref,Z,result = FitHKLTSS(difC,ibrav,peaks,A,vec,vecRef,Zero,ZeroRef)Peaks = np.array(peaks).TH = Peaks[4:8]Peaks[9] = 1./np.sqrt(G2lat.calc_rDsqTSS(H,Aref,Vref,Z,Peaks[0],difC))...
1
12
12
176
5
805
816
805
null
['dmin', 'peaks', 'Peaks', 'HKL', 'H']
None
null
0
0
0
null
0
null
The function (refinePeaksTSS) defined within the public class called public.The function start at line 805 and ends at 816. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 12 parameters, represented as [805.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
refinePeaks
def refinePeaks(peaks,ibrav,A,ifX20=True,cctbx_args=None):'needs a doc string'dmin = getDmin(peaks)smin = 1.0e10pwr = 8maxTries = 3OK = Falsetries = 0HKL = G2lat.GenHBravais(dmin,ibrav,A,cctbx_args)while len(HKL) > 2 and IndexPeaks(peaks,HKL)[0]:Pwr = pwr - (tries % 2)HKL = []tries += 1osmin = sminoldA = A[:]Vold = G2l...
12
43
5
328
17
818
861
818
null
['tries', 'oldA', 'Vnew', 'dmin', 'maxTries', 'Vold', 'peaks', 'Pwr', 'pwr', 'osmin', 'Peaks', 'smin', 'HKL', 'H', 'A', 'OK', 'rat']
None
null
0
0
0
null
0
null
The function (refinePeaks) defined within the public class called public.The function start at line 818 and ends at 861. It contains 43 lines of code and it has a cyclomatic complexity of 12. It takes 5 parameters, represented as [818.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
findBestCell
def findBestCell(dlg,ncMax,A,Ntries,ibrav,peaks,V1,ifX20=True,cctbx_args=None):'needs a doc string'# dlg & ncMax are used for wx progress bar # A != 0 find the best A near input A,# A = 0 for random cell, volume normalized to V1;# returns number of generated hkls, M20, X20 & A for best foundmHKL = [3,3,3, 5,5, 5,5, 7,7...
14
46
9
419
13
863
913
863
null
['tries', 'mHKL', 'dmin', 'peaks', 'Nc', 'Asave', 'amax', 'GoOn', 'HKL', 'Skip', 'Abeg', 'amin', 'X']
None
null
0
0
0
null
0
null
The function (findBestCell) defined within the public class called public.The function start at line 863 and ends at 913. It contains 46 lines of code and it has a cyclomatic complexity of 14. It takes 9 parameters, represented as [863.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
monoCellReduce
def monoCellReduce(ibrav,A):'needs a doc string'a,b,c,alp,bet,gam = G2lat.A2cell(A)if bet < 90.: bet = 180.-bet #always want obtuse betaA = G2lat.cell2A([a,b,c,90.,bet,90.])G,g = G2lat.A2Gmat(A)if ibrav in [14,]:#A-monoclinic - OK?u = [0,0,-1]v = [1,0,2]anew = math.sqrt(np.dot(np.dot(v,g),v))if anew < a:cang = np.dot(n...
17
60
2
764
12
915
974
915
null
['beta', 'ua', 'cnew', 'bet', 'va', 'anew', 'u', 'cang', 'v', 'uc', 'A', 'vc']
None
null
0
0
0
null
0
null
The function (monoCellReduce) defined within the public class called public.The function start at line 915 and ends at 974. It contains 60 lines of code and it has a cyclomatic complexity of 17. It takes 2 parameters, represented as [915.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
DoIndexPeaks
def DoIndexPeaks(peaks,controls,bravais,dlg,ifX20=True,timeout=None,M20_min=2.0,X20_max=None,return_Nc=False,cctbx_args=None):'needs a doc string'timingOn = Falseif timingOn:import cProfile,pstatsimport io as StringIOdelt = 0.005 #lowest d-spacing cushionamin = 2.5amax = 5.0*getDmax(peaks)dmin = getDmin(peaks)-deltbrav...
39
134
10
1,100
32
976
1,112
976
null
['tries', 'cells', 'newcell', 'cycle', 'N1s', 'ncMax', 'delt', 'HKL', 'cell', 'begin', 'notUse', 'bestM20', 'bravaisNames', 'GoOn', 's', 'timingOn', 'N2s', 'sortby', 'Nobs', 'dmin', 'V', 'amax', 'ps', 'pr', 'amin', 'A', 'topM20', 'V1', 'peaks', 'N2', 'Nm', 'lastcell']
None
null
0
0
0
null
0
null
The function (DoIndexPeaks) defined within the public class called public.The function start at line 976 and ends at 1112. It contains 134 lines of code and it has a cyclomatic complexity of 39. It takes 10 parameters, represented as [976.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
TestData
def TestData():'needs a doc string'global NeedTestDataNeedTestData = Falseglobal TestDataTestData = [14, [7.,8.70,10.86,90.,102.95,90.], [7.76006,8.706215,10.865679,90.,102.947,90.],3,[[2.176562137832974, 761.60902227696033, True, True, 0, 0, 1, 10.591300714328161, 10.589436], [3.0477561489789498, 4087.2956049071572, T...
1
66
0
1,679
3
1,116
1,181
1,116
null
['TestData', 'TestData2', 'NeedTestData']
None
null
0
0
0
null
0
null
The function (TestData) defined within the public class called public.The function start at line 1116 and ends at 1181. It contains 66 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
test0
def test0():if NeedTestData: TestData()ibrav,cell,bestcell,Pwr,peaks = TestDataprint ('best cell:',bestcell)print ('old cell:',cell)Peaks = np.array(peaks)HKL = Peaks[4:7]print (calc_M20(peaks,HKL))A = G2lat.cell2A(cell)OK,smin,A,result = FitHKL(ibrav,peaks,A,Pwr)print ('new cell:',G2lat.A2cell(A))print ('x:',result[0]...
3
22
0
197
4
1,183
1,204
1,183
null
['result', 'Peaks', 'A', 'HKL']
None
null
0
0
0
null
0
null
The function (test0) defined within the public class called public.The function start at line 1183 and ends at 1204. It contains 22 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
test1
def test1():if NeedTestData: TestData()ibrav,A,Pwr,peaks = TestData2print ('bad cell:',G2lat.A2cell(A))print ('FitHKL')OK,smin,A,result = FitHKL(ibrav,peaks,A,Pwr)result = refinePeaks(peaks,ibrav,A)N,M20,X20,A = resultprint ('refinePeaks:',N,M20,X20,A)
2
9
0
83
1
1,206
1,214
1,206
null
['result']
None
null
0
0
0
null
0
null
The function (test1) defined within the public class called public.The function start at line 1206 and ends at 1214. It contains 9 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
sec2HMS
def sec2HMS(sec):"""Convert time in sec to H:M:S string:param sec: time in seconds:return: H:M:S string (to nearest 100th second)"""H = int(sec//3600)M = int(sec//60-H*60)S = sec-3600*H-60*Mreturn '%d:%2d:%.2f'%(H,M,S)
1
5
1
39
3
47
57
47
null
['M', 'H', 'S']
None
null
0
0
0
null
0
null
The function (sec2HMS) defined within the public class called public.The function start at line 47 and ends at 57. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
rotdMat
def rotdMat(angle,axis=0):"""Prepare rotation matrix for angle in degrees about axis(=0,1,2):param angle: angle in degrees:param axis:axis (0,1,2 = x,y,z) about which for the rotation:return: rotation matrix - 3x3 numpy array"""if axis == 2:return np.array([[cosd(angle),-sind(angle),0],[sind(angle),cosd(angle),0],[0,0,...
3
7
2
154
0
59
72
59
null
[]
None
null
0
0
0
null
0
null
The function (rotdMat) defined within the public class called public.The function start at line 59 and ends at 72. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [59.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
rotdMat4
def rotdMat4(angle,axis=0):"""Prepare rotation matrix for angle in degrees about axis(=0,1,2) with scaling for OpenGL:param angle: angle in degrees:param axis:axis (0,1,2 = x,y,z) about which for the rotation:return: rotation matrix - 4x4 numpy array (last row/column for openGL scaling)"""Mat = rotdMat(angle,axis)retur...
1
3
2
69
1
74
83
74
null
['Mat']
None
null
0
0
0
null
0
null
The function (rotdMat4) defined within the public class called public.The function start at line 74 and ends at 83. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [74.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
fillgmat
def fillgmat(cell):"""Compute lattice metric tensor from unit cell constants:param cell: tuple with a,b,c,alpha, beta, gamma (degrees):return: 3x3 numpy array"""a,b,c,alp,bet,gam = cellg = np.array([[a*a,a*b*cosd(gam),a*c*cosd(bet)],[a*b*cosd(gam),b*b,b*c*cosd(alp)],[a*c*cosd(bet) ,b*c*cosd(alp), c*c]])return g
1
7
1
101
1
85
97
85
null
['g']
None
null
0
0
0
null
0
null
The function (fillgmat) defined within the public class called public.The function start at line 85 and ends at 97. 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
cell2Gmat
def cell2Gmat(cell):"""Compute real and reciprocal lattice metric tensor from unit cell constants:param cell: tuple with a,b,c,alpha, beta, gamma (degrees):return: reciprocal (G) & real (g) metric tensors (list of two numpy 3x3 arrays)"""g = fillgmat(cell)G = nl.inv(g)return G,g
1
4
1
24
2
99
108
99
null
['g', 'G']
None
null
0
0
0
null
0
null
The function (cell2Gmat) defined within the public class called public.The function start at line 99 and ends at 108. 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
A2Gmat
def A2Gmat(A,inverse=True):"""Fill real & reciprocal metric tensor (G) from A.:param A: reciprocal metric tensor elements as [G11,G22,G33,2*G12,2*G13,2*G23]:param bool inverse: if True return both G and g; else just G:return: reciprocal (G) & real (g) metric tensors (list of two numpy 3x3 arrays)"""G = np.array([[A[0],...
2
10
2
106
2
110
126
110
null
['g', 'G']
None
null
0
0
0
null
0
null
The function (A2Gmat) defined within the public class called public.The function start at line 110 and ends at 126. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [110.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Gmat2A
def Gmat2A(G):"""Extract A from reciprocal metric tensor (G):param G: reciprocal metric tensor (3x3 numpy array):return: A = [G11,G22,G33,2*G12,2*G13,2*G23]"""return [G[0][0],G[1][1],G[2][2],2.*G[0][1],2.*G[0][2],2.*G[1][2]]
1
2
1
65
0
128
135
128
null
[]
None
null
0
0
0
null
0
null
The function (Gmat2A) defined within the public class called public.The function start at line 128 and ends at 135. 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
cell2A
def cell2A(cell):"""Obtain A = [G11,G22,G33,2*G12,2*G13,2*G23] from lattice parameters:param cell: [a,b,c,alpha,beta,gamma] (degrees):return: G reciprocal metric tensor as 3x3 numpy array"""G,g = cell2Gmat(cell)return Gmat2A(G)
1
3
1
19
0
137
145
137
null
[]
None
null
0
0
0
null
0
null
The function (cell2A) defined within the public class called public.The function start at line 137 and ends at 145. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
A2cell
def A2cell(A):"""Compute unit cell constants from A:param A: [G11,G22,G33,2*G12,2*G13,2*G23] G - reciprocal metric tensor:return: a,b,c,alpha, beta, gamma (degrees) - lattice parameters"""G,g = A2Gmat(A)return Gmat2cell(g)
1
3
1
19
0
147
155
147
null
[]
None
null
0
0
0
null
0
null
The function (A2cell) defined within the public class called public.The function start at line 147 and ends at 155. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Gmat2cell
def Gmat2cell(g):"""Compute real/reciprocal lattice parameters from real/reciprocal metric tensor (g/G)The math works the same either way.:param g (or G): real (or reciprocal) metric tensor 3x3 array:return: a,b,c,alpha, beta, gamma (degrees) (or a*,b*,c*,alpha*,beta*,gamma* degrees)"""oldset = np.seterr('raise')a = np...
1
10
1
144
7
157
173
157
null
['oldset', 'bet', 'a', 'b', 'c', 'gam', 'alp']
None
null
0
0
0
null
0
null
The function (Gmat2cell) defined within the public class called public.The function start at line 157 and ends at 173. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
invcell2Gmat
def invcell2Gmat(invcell):"""Compute real and reciprocal lattice metric tensor from reciprocal unit cell constants:param invcell: [a*,b*,c*,alpha*, beta*, gamma*] (degrees):return: reciprocal (G) & real (g) metric tensors (list of two 3x3 arrays)"""G = fillgmat(invcell)g = nl.inv(G)return G,g
1
4
1
24
2
175
185
175
null
['g', 'G']
None
null
0
0
0
null
0
null
The function (invcell2Gmat) defined within the public class called public.The function start at line 175 and ends at 185. 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
cellDijFill
def cellDijFill(pfx,phfx,SGData,parmDict):'''Returns the filled-out reciprocal cell (A) termsfrom the parameter dictionaries corrected for Dij.:param str pfx: parameter prefix ("n::", where n is a phase index):param str phfx: parameter prefix ("n:h:", where n is a phase indexand h is a histogram index):param dict SGdat...
11
36
4
708
1
187
233
187
null
['A']
None
null
0
0
0
null
0
null
The function (cellDijFill) defined within the public class called public.The function start at line 187 and ends at 233. It contains 36 lines of code and it has a cyclomatic complexity of 11. It takes 4 parameters, represented as [187.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getCellSU
def getCellSU(pId,hId,SGData,parmDict,covData):'''Compute the unit cell parameters and standard uncertaintieswhere lattice parameters and Hstrain (Dij) may be refined. :param pId: phase index:param hId: histogram index:param SGdata: space group information for current phase:param dict parmDict: parameter dict, must hav...
16
68
5
966
20
235
318
235
null
['pdcdA', 'sigMat', 'srcvlsq', 'sigVol', 'pfx', 'delt', 'cell', 'dcdA', 'rVsq', 'covMatrix', 'phfx', 'Vol', 'vcov', 'Anames', 'CS', 'varyList', 'drVdA', 'A', 'Dnames', 'var']
None
null
0
0
0
null
0
null
The function (getCellSU) defined within the public class called public.The function start at line 235 and ends at 318. It contains 68 lines of code and it has a cyclomatic complexity of 16. It takes 5 parameters, represented as [235.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
showCellSU
def showCellSU(cellList,cellSig,SGData,cellNames=None):'''Produce the cell parameters from :func:`getCellSU` as a nicely formatted string:param list cellList: a list of 7 items, a, b,... Vol, from getCellSU:param list cellSig: a list of 7 items, sig(a), sig(b),... sig(Vol), from getCellSU:param SGdata: space group info...
9
24
4
185
7
320
354
320
null
['txt', 'cellNames', 'laue', 'prevsig', 'uniqCellIndx', 's', 'defsigL']
None
null
0
0
0
null
0
null
The function (showCellSU) defined within the public class called public.The function start at line 320 and ends at 354. It contains 24 lines of code and it has a cyclomatic complexity of 9. It takes 4 parameters, represented as [320.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getCellEsd
def getCellEsd(pfx,SGData,A,covData,unique=False):'''Compute the standard uncertainty on cell parameters:param str pfx: prefix of form "p::":param SGdata: space group information:param list A: Reciprocal cell Ai terms:param dict covData: covariance tree item :param bool unique: when True, only directly refined paramete...
13
63
5
795
15
356
432
356
null
['RMnames', 'CS', 'covMatrix', 'varyList', 'dcdA', 'pdcdA', 'sigMat', 'srcvlsq', 'sigVol', 'var', 'delt', 'Vol', 'vcov', 'drVdA', 'rVsq']
None
null
0
0
0
null
0
null
The function (getCellEsd) defined within the public class called public.The function start at line 356 and ends at 432. It contains 63 lines of code and it has a cyclomatic complexity of 13. It takes 5 parameters, represented as [356.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CellDijCorr
def CellDijCorr(Cell,SGData,Data,hist):'''Returns the cell corrected for Dij values.:param list Cell: lattice parameters:param dict SGdata: a symmetry object:param dict Data: phase data structure; contains set of Dij values:param str hist: histogram name:returns: cell corrected for Dij values'''A = cell2A(Cell)Dij = Da...
1
5
4
45
3
434
447
434
null
['Dij', 'A', 'newA']
None
null
0
0
0
null
0
null
The function (CellDijCorr) defined within the public class called public.The function start at line 434 and ends at 447. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [434.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
AplusDij
def AplusDij(A,Dij,SGData):''' returns the A corrected by Dij:param list A: reciprocal metric terms A0-A5:param array Dij: unique Dij values as stored in Hstrain:param dict SGdata: a symmetry object:returns list newA: A corrected by Dij'''if SGData['SGLaue'] in ['-1',]:newA = [A[0]+Dij[0],A[1]+Dij[1],A[2]+Dij[2],A[3]+D...
10
21
3
548
1
449
478
449
null
['newA']
None
null
0
0
0
null
0
null
The function (AplusDij) defined within the public class called public.The function start at line 449 and ends at 478. It contains 21 lines of code and it has a cyclomatic complexity of 10. It takes 3 parameters, represented as [449.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
prodMGMT
def prodMGMT(G,Mat):'''Transform metric tensor by matrix:param G: array metric tensor:param Mat: array transformation matrix:return: array new metric tensor'''return np.inner(np.inner(Mat,G),Mat)#right
1
2
2
24
0
480
488
480
null
[]
None
null
0
0
0
null
0
null
The function (prodMGMT) defined within the public class called public.The function start at line 480 and ends at 488. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [480.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
TransformCell
def TransformCell(cell,Trans):'''Transform lattice parameters by matrix:param cell: list a,b,c,alpha,beta,gamma,(volume):param Trans: array transformation matrix:return: array transformed a,b,c,alpha,beta,gamma,volume'''newCell = np.zeros(7)g = cell2Gmat(cell)[1]newg = prodMGMT(g,Trans)newCell[:6] = Gmat2cell(newg)newC...
1
7
2
61
3
493
506
493
null
['g', 'newg', 'newCell']
None
null
0
0
0
null
0
null
The function (TransformCell) defined within the public class called public.The function start at line 493 and ends at 506. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [493.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
symInner
def symInner(M1,M2):'''Compute inner product of two square matrices with symbolic processingUse dot product because sympy does not define an inner product primitiveThis requires that M1 & M2 be two sympy objects, as created inGenerateCellConstraints().Note that this is only used to do the symbolic math needed to genera...
3
9
2
70
2
511
528
511
null
['prod', 'prodOuter']
None
null
0
0
0
null
0
null
The function (symInner) defined within the public class called public.The function start at line 511 and ends at 528. It contains 9 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [511.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GenerateCellConstraints
def GenerateCellConstraints():'''Generate unit cell constraints for transforming one set of A tensorvalues to another using symbolic math (requires the sympy package)Note that this is only used to do the symbolic math needed to generatecell relationships. It is not used normally in GSAS-II.'''import sympy as sym# defin...
1
11
0
204
3
530
550
530
null
['Tr', 'newG', 'G']
None
null
0
0
0
null
0
null
The function (GenerateCellConstraints) defined within the public class called public.The function start at line 530 and ends at 550. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
subVals
def subVals(expr,A,T):'''Evaluate the symbolic expressions by substituting for A0-A5 & TijThis can be used on the cell relationships created in:func:`GenerateCellConstraints` like this:: Trans = np.array([ [2/3, 4/3, 1/3], [-1, 0, 0], [-1/3, -2/3, 1/3] ]) T = np.linalg.inv(Trans).T print([subVals(i,Aold,T) for i in Gen...
1
8
3
125
1
552
579
552
null
['vals']
None
null
0
0
0
null
0
null
The function (subVals) defined within the public class called public.The function start at line 552 and ends at 579. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [552.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
fmtCellConstraints
def fmtCellConstraints(cellConstr):'''Format the cell relationships created in :func:`GenerateCellConstraints`in a format that can be used to generate constraints.Use::cXforms = G2lat.fmtCellConstraints(G2lat.GenerateCellConstraints())Note that this is only used to do the symbolic math needed to generatecell relationsh...
4
17
1
143
3
597
623
597
null
['consDict', 'cons', 'l']
None
null
0
0
0
null
0
null
The function (fmtCellConstraints) defined within the public class called public.The function start at line 597 and ends at 623. It contains 17 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
GenCellConstraints
def GenCellConstraints(Trans,origPhase,newPhase,origA,oSGLaue,nSGLaue,debug=False):'''Generate the constraints between two unit cells constants for a phase transformedby matrix Trans.:param np.array Trans: a 3x3 direct cell transformation matrix where, Trans = np.array([ [2/3, 4/3, 1/3], [-1, 0, 0], [-1/3, -2/3, 1/3] ]...
8
23
7
229
7
669
711
669
null
['uniqueAnew', 'Anew', 'constr', 'constrList', 'const', 'mult', 'zeroAorig']
None
null
0
0
0
null
0
null
The function (GenCellConstraints) defined within the public class called public.The function start at line 669 and ends at 711. It contains 23 lines of code and it has a cyclomatic complexity of 8. It takes 7 parameters, represented as [669.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
cellUnique
def cellUnique(SGData):'''Returns the indices for the unique A tensor termsbased on the Laue class.Any terms that are determined from others or are zero are not included.:param dict SGdata: a symmetry object:returns: a list of 0 to 6 terms with indices of the unique A terms'''if SGData['SGLaue'] in ['-1',]:return [0,1,...
10
20
1
186
0
713
739
713
null
[]
None
null
0
0
0
null
0
null
The function (cellUnique) defined within the public class called public.The function start at line 713 and ends at 739. It contains 20 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
cellZeros
def cellZeros(SGData):'''Returns a list with the A terms required to be zero based on Laue symmetry:param dict SGdata: a symmetry object:returns: A list of six terms where the values are True if theA term must be zero, False otherwise.'''if SGData['SGLaue'] in ['-1',]:return 6*[False]elif SGData['SGLaue'] in ['2/m',]:i...
10
20
1
221
0
741
766
741
null
[]
None
null
0
0
0
null
0
null
The function (cellZeros) defined within the public class called public.The function start at line 741 and ends at 766. It contains 20 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
TransformXYZ
def TransformXYZ(XYZ,Trans,Vec):return np.inner(XYZ,Trans)+Vec
1
2
3
20
0
768
769
768
null
[]
None
null
0
0
0
null
0
null
The function (TransformXYZ) defined within the public class called public.The function start at line 768 and ends at 769. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [768.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
TransformU6
def TransformU6(U6,Trans):Uij = np.inner(Trans,np.inner(U6toUij(U6),Trans).T)/nl.det(Trans)return UijtoU6(Uij)
1
3
2
41
1
771
773
771
null
['Uij']
None
null
0
0
0
null
0
null
The function (TransformU6) defined within the public class called public.The function start at line 771 and ends at 773. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [771.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ExpandCell
def ExpandCell(Atoms,atCodes,cx,Trans):Unit = [int(max(abs(np.array(unit)))-1) for unit in Trans.T]nUnit = (Unit[0]+1)*(Unit[1]+1)*(Unit[2]+1)Ugrid = np.mgrid[0:Unit[0]+1,0:Unit[1]+1,0:Unit[2]+1]Ugrid = np.reshape(Ugrid,(3,nUnit)).TCodes = copy.deepcopy(atCodes)newAtoms = copy.deepcopy(Atoms)for unit in Ugrid[1:]:moreA...
5
16
4
209
8
775
790
775
null
['nUnit', 'newAtoms', 'moreCodes', 'Ugrid', 'Unit', 'moreAtoms', 'codes', 'Codes']
None
null
0
0
0
null
0
null
The function (ExpandCell) defined within the public class called public.The function start at line 775 and ends at 790. It contains 16 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [775.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
TransformPhase
def TransformPhase(oldPhase,newPhase,Trans,Uvec,Vvec,ifMag,Force=True):'''Transform atoms from oldPhase to newPhaseM' is inv(M)does X' = M(X-U)+V transformation for coordinates and U' = MUM/det(M)for anisotropic thermal parameters:param oldPhase: dict G2 phase info for old phase:param newPhase: dict G2 phase info for n...
11
49
7
553
11
792
858
792
null
['atCodes', 'invTrans', 'newAtoms', 'xyz', 'SGData', 'Landeg', 'magatCodes', 'magAtoms', 'cm', 'mag', 'mom']
None
null
0
0
0
null
0
null
The function (TransformPhase) defined within the public class called public.The function start at line 792 and ends at 858. It contains 49 lines of code and it has a cyclomatic complexity of 11. It takes 7 parameters, represented as [792.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FindNonstandard
def FindNonstandard(controls,Phase):'''Find nonstandard setting of magnetic cell that aligns with parent nuclear cell:param controls: list unit cell indexing controls:param Phase: dict new magnetic phase data (NB:not G2 phase construction); modified here:return: None'''abc = np.eye(3)cba = np.rot90(np.eye(3))cba[1,1] *...
19
77
2
996
20
860
945
860
null
['SGsym', 'newcell', 'BNS', 'MatsA', 'MatsB', 'Nresult', 'NTrans', 'Bns', 'lattSym', 'SpGrp', 'Trans', 'SGData', 'bns', 'NSG', 'abc', 'cba', 'Mats', 'Uvec', 'spn', 'MSG']
None
null
0
0
0
null
0
null
The function (FindNonstandard) defined within the public class called public.The function start at line 860 and ends at 945. It contains 77 lines of code and it has a cyclomatic complexity of 19. It takes 2 parameters, represented as [860.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
makeBilbaoPhase
def makeBilbaoPhase(result,uvec,trans,ifMag=False):phase = {}phase['Name'] = result[0].strip()phase['Uvec'] = uvecphase['Trans'] = transphase['Keep'] = Falsephase['Use'] = Falsephase['aType'] = ''SpGp = result[0].replace("'",'')SpGrp = G2spc.StandardizeSpcName(SpGp)phase['SGData'] = G2spc.SpcGroup(SpGrp)[1]if ifMag:BNS...
5
25
4
265
5
947
971
947
null
['SpGp', 'MSpGrp', 'phase', 'BNSlatt', 'SpGrp']
None
null
0
0
0
null
0
null
The function (makeBilbaoPhase) defined within the public class called public.The function start at line 947 and ends at 971. It contains 25 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [947.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FillUnitCell
def FillUnitCell(Phase,Force=True):Atoms = copy.deepcopy(Phase['Atoms'])atomData = []atCodes = []SGData = Phase['General']['SGData']SpnFlp = SGData.get('SpnFlp',[])Amat,Bmat = cell2AB(Phase['General']['Cell'][1:7])cx,ct,cs,cia = Phase['General']['AtomPtrs']cm = 0if Phase['General']['Type'] == 'magnetic':cm = cx+4for ia...
9
48
2
551
16
973
1,023
973
null
['atCodes', 'cellj', 'item', 'Atoms', 'xyz', 'Uij', 'cm', 'SpnFlp', 'XYZ', 'opNum', 'atomData', 'M', 'Opr', 'result', 'SGData', 'mom']
None
null
0
0
0
null
0
null
The function (FillUnitCell) defined within the public class called public.The function start at line 973 and ends at 1023. It contains 48 lines of code and it has a cyclomatic complexity of 9. It takes 2 parameters, represented as [973.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetUnique.noDuplicate
def noDuplicate(xyzA,XYZ):if True in [np.allclose(xyzA%1.,xyzB%1.,atol=0.0002) for xyzB in XYZ]:return Falsereturn True
3
4
2
41
0
1,027
1,030
1,027
null
[]
None
null
0
0
0
null
0
null
The function (GetUnique.noDuplicate) defined within the public class called public.The function start at line 1027 and ends at 1030. It contains 4 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [1027.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetUnique
def GetUnique(Phase,atCodes):def noDuplicate(xyzA,XYZ):if True in [np.allclose(xyzA%1.,xyzB%1.,atol=0.0002) for xyzB in XYZ]:return Falsereturn Truecx,ct = Phase['General']['AtomPtrs'][:2]SGData = Phase['General']['SGData']Atoms = Phase['Atoms']Ind = len(Atoms)newAtoms = []newAtCodes = []Indx = {}XYZ = {}for ind in ran...
11
28
2
240
10
1,025
1,057
1,025
null
['Equiv', 'Indx', 'xyzs', 'newAtCodes', 'newAtoms', 'Ind', 'Atoms', 'xyz', 'XYZ', 'SGData']
None
null
0
0
0
null
0
null
The function (GetUnique) defined within the public class called public.The function start at line 1025 and ends at 1057. It contains 28 lines of code and it has a cyclomatic complexity of 11. It takes 2 parameters, represented as [1025.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
calc_rVsq
def calc_rVsq(A):"""Compute the square of the reciprocal lattice volume (1/V**2) from A'"""G,g = A2Gmat(A)rVsq = nl.det(G)if rVsq < 0:return 1return rVsq
2
6
1
31
1
1,059
1,067
1,059
null
['rVsq']
None
null
0
0
0
null
0
null
The function (calc_rVsq) defined within the public class called public.The function start at line 1059 and ends at 1067. 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
calc_rV
def calc_rV(A):"""Compute the reciprocal lattice volume (V*) from A"""return np.sqrt(calc_rVsq(A))
1
2
1
16
0
1,069
1,072
1,069
null
[]
None
null
0
0
0
null
0
null
The function (calc_rV) defined within the public class called public.The function start at line 1069 and ends at 1072. 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
calc_V
def calc_V(A):"""Compute the real lattice volume (V) from A"""return 1./calc_rV(A)
1
2
1
14
0
1,074
1,077
1,074
null
[]
None
null
0
0
0
null
0
null
The function (calc_V) defined within the public class called public.The function start at line 1074 and ends at 1077. 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
A2invcell
def A2invcell(A):"""Compute reciprocal unit cell constants from Areturns tuple with a*,b*,c*,alpha*, beta*, gamma* (degrees)"""G,g = A2Gmat(A)return Gmat2cell(G)
1
3
1
19
0
1,079
1,084
1,079
null
[]
None
null
0
0
0
null
0
null
The function (A2invcell) defined within the public class called public.The function start at line 1079 and ends at 1084. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Gmat2AB
def Gmat2AB(G):"""Computes orthogonalization matrix from reciprocal metric tensor G:returns: tuple of two 3x3 numpy arrays (A,B) * A for crystal to Cartesian transformations (A*x = np.inner(A,x) = X) * B (= inverse of A) for Cartesian to crystal transformation (B*X = np.inner(B,X) = x)"""#cellstar = Gmat2cell(G)g = nl....
1
4
1
25
2
1,086
1,099
1,086
null
['cell', 'g']
None
null
0
0
0
null
0
null
The function (Gmat2AB) defined within the public class called public.The function start at line 1086 and ends at 1099. 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
cell2AB
def cell2AB(cell,alt=False):"""Computes orthogonalization matrix from unit cell constants:param tuple cell: a,b,c, alpha, beta, gamma (degrees):returns: tuple of two 3x3 numpy arrays (A,B) A for crystal to Cartesian transformations A*x = np.inner(A,x) = X B (= inverse of A) for Cartesian to crystal transformation B*X =...
2
23
2
316
3
1,110
1,141
1,110
null
['cellstar', 'B', 'A']
None
null
0
0
0
null
0
null
The function (cell2AB) defined within the public class called public.The function start at line 1110 and ends at 1141. It contains 23 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [1110.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
HKL2SpAng
def HKL2SpAng(H,cell,SGData):"""Computes spherical coords for hkls; view along 001:param array H: arrays of hkl:param tuple cell: a,b,c, alpha, beta, gamma (degrees):param dict SGData: space group dictionary:returns: arrays of r,phi,psi (radius,inclination,azimuth) about 001"""A,B = cell2AB(cell)xH = np.inner(B.T,H)r =...
1
8
3
98
4
1,143
1,157
1,143
null
['xH', 'phi', 'r', 'psi']
None
null
0
0
0
null
0
null
The function (HKL2SpAng) defined within the public class called public.The function start at line 1143 and ends at 1157. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [1143.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
U6toUij
def U6toUij(U6):"""Fill matrix (Uij) from U6 = [U11,U22,U33,U12,U13,U23]NB: there is a non numpy version in GSASIIspc: U2Uij:param list U6: 6 terms of u11,u22,...:returns:Uij - numpy [3][3] array of uij"""U = np.array([[U6[0],U6[3],U6[4]],[U6[3],U6[1],U6[5]],[U6[4],U6[5],U6[2]]])return U
1
6
1
67
1
1,159
1,171
1,159
null
['U']
None
null
0
0
0
null
0
null
The function (U6toUij) defined within the public class called public.The function start at line 1159 and ends at 1171. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UijtoU6
def UijtoU6(U):"""Fill vector [U11,U22,U33,U12,U13,U23] from UijNB: there is a non numpy version in GSASIIspc: Uij2U"""U6 = np.array([U[0][0],U[1][1],U[2][2],U[0][1],U[0][2],U[1][2]])return U6
1
3
1
64
1
1,173
1,178
1,173
null
['U6']
None
null
0
0
0
null
0
null
The function (UijtoU6) defined within the public class called public.The function start at line 1173 and ends at 1178. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
betaij2Uij
def betaij2Uij(betaij,G):"""Convert beta-ij to Uij tensors:param beta-ij - numpy array [beta-ij]:param G: reciprocal metric tensor:returns: Uij: numpy array [Uij]"""ast = np.sqrt(np.diag(G)) #a*, b*, c*Mast = np.multiply.outer(ast,ast)return R2pisq*UijtoU6(U6toUij(betaij)/Mast)
1
4
2
45
2
1,180
1,190
1,180
null
['Mast', 'ast']
None
null
0
0
0
null
0
null
The function (betaij2Uij) defined within the public class called public.The function start at line 1180 and ends at 1190. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1180.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Uij2betaij
def Uij2betaij(Uij,G):"""Convert Uij to beta-ij tensors -- stub for eventual completion:param Uij: numpy array [Uij]:param G: reciprocal metric tensor:returns: beta-ij - numpy array [beta-ij]"""pass
1
2
2
9
0
1,192
1,200
1,192
null
[]
None
null
0
0
0
null
0
null
The function (Uij2betaij) defined within the public class called public.The function start at line 1192 and ends at 1200. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1192.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
cell2GS
def cell2GS(cell):''' returns Uij to betaij conversion matrix'''G,g = cell2Gmat(cell)GS = GGS[0][1] = GS[1][0] = math.sqrt(GS[0][0]*GS[1][1])GS[0][2] = GS[2][0] = math.sqrt(GS[0][0]*GS[2][2])GS[1][2] = GS[2][1] = math.sqrt(GS[1][1]*GS[2][2])return GS
1
7
1
127
1
1,202
1,209
1,202
null
['GS']
None
null
0
0
0
null
0
null
The function (cell2GS) defined within the public class called public.The function start at line 1202 and ends at 1209. 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
Uij2Ueqv
def Uij2Ueqv(Uij,GS,Amat):''' returns 1/3 trace of diagonalized U matrix:param Uij: numpy array [Uij]:param GS: Uij too betaij conversion matrix:param Amat: crystal to Cartesian transformation matrix:returns: 1/3 trace of diagonalized U matrix:returns: True if nonpositive-definite; False otherwise'''U = np.multiply(U6t...
1
5
3
70
1
1,211
1,222
1,211
null
['U']
None
null
0
0
0
null
0
null
The function (Uij2Ueqv) defined within the public class called public.The function start at line 1211 and ends at 1222. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [1211.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CosAngle
def CosAngle(U,V,G):""" calculate cos of angle between U & V in generalized coordinatesdefined by metric tensor G:param U: 3-vectors assume numpy arrays, can be multiple reflections as (N,3) array:param V: 3-vectors assume numpy arrays, only as (3) vector:param G: metric tensor for U & V defined space assume numpy arra...
1
5
3
87
3
1,224
1,237
1,224
null
['u', 'cosP', 'v']
None
null
0
0
0
null
0
null
The function (CosAngle) defined within the public class called public.The function start at line 1224 and ends at 1237. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [1224.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CosSinAngle
def CosSinAngle(U,V,G):""" calculate sin & cos of angle between U & V in generalized coordinatesdefined by metric tensor G:param U: 3-vectors assume numpy arrays:param V: 3-vectors assume numpy arrays:param G: metric tensor for U & V defined space assume numpy array:returns:cos(phi) & sin(phi)"""u = U/np.sqrt(np.inner(...
1
6
3
100
4
1,239
1,253
1,239
null
['sinP', 'u', 'cosP', 'v']
None
null
0
0
0
null
0
null
The function (CosSinAngle) defined within the public class called public.The function start at line 1239 and ends at 1253. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [1239.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
criticalEllipse
def criticalEllipse(prob):"""Calculate critical values for probability ellipsoids from probability"""if not ( 0.01 <= prob < 1.0):return 1.54coeff = np.array([6.44988E-09,4.16479E-07,1.11172E-05,1.58767E-04,0.00130554,0.00604091,0.0114921,-0.040301,-0.6337203,1.311582])llpr = math.log(-math.log(prob))return np.polyval(...
2
7
1
105
2
1,255
1,264
1,255
null
['llpr', 'coeff']
None
null
0
0
0
null
0
null
The function (criticalEllipse) defined within the public class called public.The function start at line 1255 and ends at 1264. 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
CellBlock
def CellBlock(nCells):"""Generate block of unit cells n*n*n on a side; [0,0,0] centered, n = 2*nCells+1currently only works for nCells = 0 or 1 (not >1)"""if nCells:N = 2*nCells+1N2 = N*NN3 = N*N*NcellArray = []A = np.array(range(N3))cellGen = np.array([A//N2-1,A//N%N-1,A%N-1]).Tfor cell in cellGen:cellArray.append(cel...
3
13
1
75
6
1,266
1,282
1,266
null
['cellGen', 'N2', 'cellArray', 'N3', 'N', 'A']
None
null
0
0
0
null
0
null
The function (CellBlock) defined within the public class called public.The function start at line 1266 and ends at 1282. It contains 13 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CellAbsorption
def CellAbsorption(ElList,Volume):'''Compute unit cell absorption:param dict ElList: dictionary of element contents including mu andnumber of atoms be cell:param float Volume: unit cell volume:returns: mu-total/Volume'''muT = 0for El in ElList:muT += ElList[El]['mu']*ElList[El]['FormulaNo']return muT/Volume
2
5
2
37
1
1,284
1,295
1,284
null
['muT']
None
null
0
0
0
null
0
null
The function (CellAbsorption) defined within the public class called public.The function start at line 1284 and ends at 1295. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [1284.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
_combinators
def _combinators(_handle, items, n):""" factored-out common structure of all following combinators """if n==0:yield [ ]returnfor i, item in enumerate(items):this_one = [ item ]for cc in _combinators(_handle, _handle(items, i), n-1):yield this_one + cc
4
8
3
57
1
1,301
1,309
1,301
null
['this_one']
None
null
0
0
0
null
0
null
The function (_combinators) defined within the public class called public.The function start at line 1301 and ends at 1309. It contains 8 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [1301.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
combinations.skipIthItem
def skipIthItem(items, i):return items[:i] + items[i+1:]
1
2
2
21
0
1,312
1,313
1,312
null
[]
None
null
0
0
0
null
0
null
The function (combinations.skipIthItem) defined within the public class called public.The function start at line 1312 and ends at 1313. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1312.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
combinations
def combinations(items, n):""" take n distinct items, order matters """def skipIthItem(items, i):return items[:i] + items[i+1:]return _combinators(skipIthItem, items, n)
1
3
2
19
0
1,310
1,314
1,310
null
[]
None
null
0
0
0
null
0
null
The function (combinations) defined within the public class called public.The function start at line 1310 and ends at 1314. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1310.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
uniqueCombinations.afterIthItem
def afterIthItem(items, i):return items[i+1:]
1
2
2
15
0
1,317
1,318
1,317
null
[]
None
null
0
0
0
null
0
null
The function (uniqueCombinations.afterIthItem) defined within the public class called public.The function start at line 1317 and ends at 1318. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1317.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
uniqueCombinations
def uniqueCombinations(items, n):""" take n distinct items, order is irrelevant """def afterIthItem(items, i):return items[i+1:]return _combinators(afterIthItem, items, n)
1
3
2
19
0
1,315
1,319
1,315
null
[]
None
null
0
0
0
null
0
null
The function (uniqueCombinations) defined within the public class called public.The function start at line 1315 and ends at 1319. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1315.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
selections.keepAllItems
def keepAllItems(items, i):return items
1
2
2
9
0
1,322
1,323
1,322
null
[]
None
null
0
0
0
null
0
null
The function (selections.keepAllItems) defined within the public class called public.The function start at line 1322 and ends at 1323. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1322.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
selections
def selections(items, n):""" take n (not necessarily distinct) items, order matters """def keepAllItems(items, i):return itemsreturn _combinators(keepAllItems, items, n)
1
3
2
19
0
1,320
1,324
1,320
null
[]
None
null
0
0
0
null
0
null
The function (selections) defined within the public class called public.The function start at line 1320 and ends at 1324. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1320.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
permutations
def permutations(items):""" take all items, order matters """return combinations(items, len(items))
1
2
1
16
0
1,325
1,327
1,325
null
[]
None
null
0
0
0
null
0
null
The function (permutations) defined within the public class called public.The function start at line 1325 and ends at 1327. 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
Pos2dsp
def Pos2dsp(Inst,pos):''' convert powder pattern position (2-theta or TOF, musec) to d-spacingis currently only approximate for EDX data; accurate for others.'''if 'T' in Inst['Type'][0]:return TOF2dsp(Inst,pos)elif 'E' in Inst['Type'][0]:return 12.398/(2.0*pos*sind(Inst['2-theta'][1]/2.0))else: #'PKS', 'C' or 'B'wave ...
3
8
2
109
1
1,333
1,343
1,333
null
['wave']
None
null
0
0
0
null
0
null
The function (Pos2dsp) defined within the public class called public.The function start at line 1333 and ends at 1343. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [1333.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
TOF2dsp.func
def func(d,pos,Inst):return (pos-Inst['difA'][1]*d**2-Inst['Zero'][1]-Inst['difB'][1]/d)/Inst['difC'][1]
1
2
3
51
0
1,349
1,350
1,349
null
[]
None
null
0
0
0
null
0
null
The function (TOF2dsp.func) defined within the public class called public.The function start at line 1349 and ends at 1350. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [1349.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
TOF2dsp
def TOF2dsp(Inst,Pos):''' convert powder pattern TOF, musec to d-spacing by successive approximationPos can be numpy array'''def func(d,pos,Inst):return (pos-Inst['difA'][1]*d**2-Inst['Zero'][1]-Inst['difB'][1]/d)/Inst['difC'][1]dsp0 = Pos/Inst['difC'][1]N = 0while True:#successive approximationsdsp = func(dsp0,Pos,Ins...
4
12
2
68
3
1,345
1,360
1,345
null
['dsp0', 'N', 'dsp']
None
null
0
0
0
null
0
null
The function (TOF2dsp) defined within the public class called public.The function start at line 1345 and ends at 1360. It contains 12 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [1345.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Dsp2pos
def Dsp2pos(Inst,dsp):''' convert d-spacing to powder pattern position (2-theta or TOF, musec)'''if 'T' in Inst['Type'][0]:pos = Inst['difC'][1]*dsp+Inst['difA'][1]*dsp**2+Inst.get('difB',[0,0,False])[1]/dsp+Inst['Zero'][1]elif 'E' in Inst['Type'][0]:return 12.398/(2.0*dsp*sind(Inst['2-theta'][1]/2.0))+Inst['ZE'][1]+In...
3
10
2
193
3
1,362
1,373
1,362
null
['wave', 'val', 'pos']
None
null
0
0
0
null
0
null
The function (Dsp2pos) defined within the public class called public.The function start at line 1362 and ends at 1373. It contains 10 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [1362.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getPeakPos
def getPeakPos(dataType,parmdict,dsp):''' convert d-spacing to powder pattern position (2-theta, E or TOF, musec)'''if 'T' in dataType:pos = parmdict['difC']*dsp+parmdict['difA']*dsp**2+parmdict['difB']/dsp+parmdict['Zero']elif 'E'in dataType:pos = 12.398/(2.0*dsp*sind(parmdict['2-theta']/2.0)+parmdict['ZE']+parmdict['...
3
8
3
124
1
1,375
1,384
1,375
null
['pos']
None
null
0
0
0
null
0
null
The function (getPeakPos) defined within the public class called public.The function start at line 1375 and ends at 1384. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [1375.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
calc_rDsq
def calc_rDsq(H,A):'calc 1/d^2 from individual hkl and A-terms'B = np.array([H[0]**2,H[1]**2,H[2]**2,H[0]*H[1],H[0]*H[2],H[1]*H[2]])return np.sum(A*B)
1
4
2
76
1
1,386
1,389
1,386
null
['B']
None
null
0
0
0
null
0
null
The function (calc_rDsq) defined within the public class called public.The function start at line 1386 and ends at 1389. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1386.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
calc_rDsqA
def calc_rDsqA(H,A):'calc array of 1/d^2 from array of hkl & A-terms'# B = np.array([H[0]**2,H[1]**2,H[2]**2,H[0]*H[1],H[0]*H[2],H[1]*H[2]])# return np.sum(np.array(A)[:,nxs]*B,axis=0)h,k,l = Hreturn A[0]*h*h+A[1]*k*k+A[2]*l*l+A[3]*h*k+A[4]*h*l+A[5]*k*l #quicker
1
4
2
69
0
1,391
1,396
1,391
null
[]
None
null
0
0
0
null
0
null
The function (calc_rDsqA) defined within the public class called public.The function start at line 1391 and ends at 1396. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1391.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
calc_rDsq2
def calc_rDsq2(H,G):'computes 1/d^2 from one hkl & reciprocal metric tensor G'return np.inner(H,np.inner(G,H))
1
3
2
24
0
1,398
1,400
1,398
null
[]
None
null
0
0
0
null
0
null
The function (calc_rDsq2) defined within the public class called public.The function start at line 1398 and ends at 1400. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1398.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
calc_rDsqSS
def calc_rDsqSS(H,A,vec):'computes 1/d^2 from one hklm, reciprocal metric tensor A & k-vector'rdsq = calc_rDsq(H[:3]+(H[3]*vec).T,A)return rdsq
1
4
3
35
1
1,402
1,405
1,402
null
['rdsq']
None
null
0
0
0
null
0
null
The function (calc_rDsqSS) defined within the public class called public.The function start at line 1402 and ends at 1405. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [1402.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
calc_rDsqZ
def calc_rDsqZ(H,A,Z,tth,lam):'computes 1/d^2 from hkl array & reciprocal metric tensor A with CW ZERO shift'rdsq = calc_rDsqA(H,A)+Z*sind(tth)*2.0*rpd/lam**2return rdsq
1
4
5
41
1
1,407
1,410
1,407
null
['rdsq']
None
null
0
0
0
null
0
null
The function (calc_rDsqZ) defined within the public class called public.The function start at line 1407 and ends at 1410. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [1407.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
calc_rDsqZSS
def calc_rDsqZSS(H,A,vec,Z,tth,lam):'computes 1/d^2 from hklm array, reciprocal metric tensor A & k-vector with CW Z shift'rdsq = calc_rDsqA(H[:3]+(H[3][:,np.newaxis]*vec).T,A)+Z*sind(tth)*2.0*rpd/lam**2return rdsq
1
4
6
65
1
1,412
1,415
1,412
null
['rdsq']
None
null
0
0
0
null
0
null
The function (calc_rDsqZSS) 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 6 parameters, represented as [1412.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
calc_rDsqT
def calc_rDsqT(H,A,Z,tof,difC):'computes 1/d^2 from hkl array & reciprocal metric tensor A with TOF ZERO shift'rdsq = calc_rDsqA(H,A)+Z/difCreturn rdsq
1
4
5
28
1
1,417
1,420
1,417
null
['rdsq']
None
null
0
0
0
null
0
null
The function (calc_rDsqT) defined within the public class called public.The function start at line 1417 and ends at 1420. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [1417.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
calc_rDsqTSS
def calc_rDsqTSS(H,A,vec,Z,tof,difC):'computes 1/d^2 from hklm array, reciprocal metric tensor A & k-vector with TOF Z shift'rdsq = calc_rDsqA(H[:3]+(H[3][:,np.newaxis]*vec).T,A)+Z/difCreturn rdsq
1
4
6
52
1
1,422
1,425
1,422
null
['rdsq']
None
null
0
0
0
null
0
null
The function (calc_rDsqTSS) defined within the public class called public.The function start at line 1422 and ends at 1425. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [1422.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PlaneIntercepts
def PlaneIntercepts(Amat,H,phase,stack):''' find unit cell intercepts for a stack of hkl planes'''Steps = range(-1,2,2)if stack:Steps = range(-10,10,1)Stack = []Ux = np.array([[0,0],[1,0],[1,1],[0,1]])for step in Steps:HX = []for i in [0,1,2]:if H[i]: h,k,l = [(i+1)%3,(i+2)%3,(i+3)%3] for j in [0,1,2,3]:hx = [0,0,0]int...
9
33
4
397
10
1,427
1,461
1,427
null
['HX', 'Steps', 'Dsort', 'hx', 'intcpt', 'Ux', 'DX', 'D', 'A', 'Stack']
None
null
0
0
0
null
0
null
The function (PlaneIntercepts) defined within the public class called public.The function start at line 1427 and ends at 1461. It contains 33 lines of code and it has a cyclomatic complexity of 9. It takes 4 parameters, represented as [1427.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
MaxIndex
def MaxIndex(dmin,A):'needs doc string'Hmax = [0,0,0]try:cell = A2cell(A)except:cell = [1.,1.,1.,90.,90.,90.]for i in range(3):Hmax[i] = int(np.round(cell[i]/dmin))return Hmax
3
10
2
77
2
1,463
1,472
1,463
null
['cell', 'Hmax']
None
null
0
0
0
null
0
null
The function (MaxIndex) defined within the public class called public.The function start at line 1463 and ends at 1472. It contains 10 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [1463.0] and does not return any value..