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 | FitTexture | def FitTexture(General,Gangls,refData,keyList,pgbar):#if GSASIIpath.binaryPath:#import pytexture as ptx#else:#from . import pytexture as ptx##import GSASII.pytexture as ptxptx.pyqlmninit()#initialize fortran arrays for spherical harmonicsdef printSpHarm(textureData,SHtextureSig):Tindx = 1.0Tvar = 0.0print ('\n Spherica... | 12 | 53 | 5 | 463 | 38 | 3,760 | 3,934 | 3,760 | null | ['l', 'iBeg', 'iFin', 'Refs', 'values', 'namstr', 'names', 'ncyc', 'SHcoeff', 'Mat', 'cell', 'sumD', 'begin', 'runtime', 'Tvar', 'R', 'ptstr', 'Kcl', 'wt', 'Sangls', 'SHkeys', 'SGData', 'Lnorm', 'parmDict', 'varyList', 'result', 'sumObs', 'nCoeff', 'chisq', 'sigDict', 'Tindx', 'mat', 'sig', 'GOF', 'nBlock', 'Texture', ... | None | null | 0 | 0 | 0 | null | 0 | null | The function (FitTexture) defined within the public class called public.The function start at line 3760 and ends at 3934. It contains 53 lines of code and it has a cyclomatic complexity of 12. It takes 5 parameters, represented as [3760.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | adjHKLmax | def adjHKLmax(SGData,Hmax):'''default doc string:param type name: description:returns: type name: description'''if SGData['SGLaue'] in ['3','3m1','31m','6/m','6/mmm']:Hmax[0] = int(math.ceil(Hmax[0]/6.))*6Hmax[1] = int(math.ceil(Hmax[1]/6.))*6Hmax[2] = int(math.ceil(Hmax[2]/4.))*4else:Hmax[0] = int(math.ceil(Hmax[0]/4.... | 2 | 9 | 2 | 160 | 0 | 3,940 | 3,955 | 3,940 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (adjHKLmax) defined within the public class called public.The function start at line 3940 and ends at 3955. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [3940.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | OmitMap | def OmitMap(data,reflDict,pgbar=None):'''default doc string:param type name: description:returns: type name: description'''generalData = data['General']if not generalData['Map']['MapType']:G2fil.G2Print ('**** ERROR - Fourier map not defined')returnmapData = generalData['Map']dmin = mapData['GridStep']*2.SGData = gener... | 9 | 60 | 3 | 793 | 31 | 3,957 | 4,023 | 3,957 | null | ['iBeg', 'iFin', 'Phi', 'Fnew', 'dp', 'cell', 'SGT', 'rho_omit', 'phasem', 'hkl', 'Hmax', 'SGMT', 'mapData', 'M', 'Fhkl', 'SGData', 'nBlk', 'dmin', 'OFhkl', 'phasep', 'Uniq', 'a', 'b', 'rho1', 'phase', 'rho0', 'A', 'time0', 'generalData', 'F', 'blkIds'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (OmitMap) defined within the public class called public.The function start at line 3957 and ends at 4023. It contains 60 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [3957.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | FourierMap | def FourierMap(data,reflDict):'''default doc string:param type name: description:returns: type name: description'''generalData = data['General']mapData = generalData['Map']dmin = mapData['GridStep']*2.SGData = generalData['SGData']SGMT = np.array([ops[0].T for ops in SGData['SGOps']])SGT = np.array([ops[1] for ops in S... | 11 | 60 | 2 | 747 | 22 | 4,025 | 4,092 | 4,025 | null | ['dF', 'Phi', 'dp', 'cell', 'SGT', 'rho', 'phasem', 'hkl', 'Hmax', 'SGMT', 'mapData', 'Fhkl', 'SGData', 'dmin', 'phasep', 'Uniq', 'a', 'b', 'A', 'time0', 'generalData', 'F'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (FourierMap) defined within the public class called public.The function start at line 4025 and ends at 4092. It contains 60 lines of code and it has a cyclomatic complexity of 11. It takes 2 parameters, represented as [4025.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | Fourier4DMap | def Fourier4DMap(data,reflDict):'''default doc string:param type name: description:returns: type name: description'''generalData = data['General']map4DData = generalData['4DmapData']mapData = generalData['Map']dmin = mapData['GridStep']*2.SGData = generalData['SGData']SSGData = generalData['SSGData']SSGMT = np.array([o... | 9 | 59 | 2 | 746 | 27 | 4,094 | 4,159 | 4,094 | null | ['dF', 'Phi', 'dp', 'Fosq', 'cell', 'rho', 'phasem', 'hkl', 'SSrho', 'Hmax', 'map4DData', 'mapData', 'Fhkl', 'SGData', 'SSGMT', 'dmin', 'SSGT', 'phasep', 'Uniq', 'a', 'b', 'SSGData', 'A', 'maxM', 'time0', 'generalData', 'F'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (Fourier4DMap) defined within the public class called public.The function start at line 4094 and ends at 4159. It contains 59 lines of code and it has a cyclomatic complexity of 9. It takes 2 parameters, represented as [4094.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | printRho | def printRho(SGLaue,rho,rhoMax):'''default doc string:param type name: description:returns: type name: description'''dim = len(rho.shape)if dim == 2:ix,jy = rho.shapefor j in range(jy):line = ''if SGLaue in ['3','3m1','31m','6/m','6/mmm']:line += (jy-j)*''for i in range(ix):r = int(100*rho[i,j]/rhoMax)line += '%4d'%(r)... | 9 | 24 | 3 | 199 | 3 | 4,162 | 4,192 | 4,162 | null | ['dim', 'r', 'line'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (printRho) defined within the public class called public.The function start at line 4162 and ends at 4192. It contains 24 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [4162.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | findOffset | def findOffset(SGData,A,Fhkl):'''default doc string:param type name: description:returns: type name: description'''if SGData['SpGrp'] == 'P 1':return [0,0,0]hklShape = Fhkl.shapehklHalf = np.array(hklShape)//2sortHKL = np.argsort(Fhkl.flatten())Fdict = {}for hkl in sortHKL:HKL = np.unravel_index(hkl,hklShape)F = Fhkl[H... | 9 | 53 | 3 | 682 | 26 | 4,195 | 4,254 | 4,195 | null | ['Dang', 'i', 'sortHKL', 'Phi', 'XYZ', 'HKL', 'ang0', 'Mmap', 'hklHalf', 'hkl', 'Fdict', 'Hmax', 'steps', 'Fh0', 'DX', 'ang', 'Flist', 'dH', 'ptext', 'Uniq', 'DH', 'dang', 'chisq', 'F', 'hklShape', 'Dphi'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (findOffset) defined within the public class called public.The function start at line 4195 and ends at 4254. It contains 53 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [4195.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | ChargeFlip | def ChargeFlip(data,reflDict,pgbar):'''default doc string:param type name: description:returns: type name: description'''print('Charge flip data type: ',reflDict['Type'])generalData = data['General']mapData = generalData['Map']flipData = generalData['Flip']FFtable = {}if 'None' not in flipData['Norm element'] and 'N' n... | 23 | 104 | 3 | 1,208 | 48 | 4,256 | 4,368 | 4,256 | null | ['im', 'Rcf', 'twophases', 'ff', 'old', 'Phi', 'E', 'dp', 'cell', 'sumE', 'MEhkl', 'CErho', 'SGT', 'phasem', 'hkl', 'Hmax', 'FFs', 'SGMT', 'Emask', 'mapData', 'GoOn', 'normElem', 'Vol', 'SGData', 'CEsig', 'ctext', 'testHKL', 'CEhkl', 'dmin', 'Ehkl', 'CFhkl', 'FFtable', 'Uniq', 'phasep', 'DEhkl', 'dsp', 'a', 'CFrho', 'b... | None | null | 0 | 0 | 0 | null | 0 | null | The function (ChargeFlip) defined within the public class called public.The function start at line 4256 and ends at 4368. It contains 104 lines of code and it has a cyclomatic complexity of 23. It takes 3 parameters, represented as [4256.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | findSSOffset | def findSSOffset(SGData,SSGData,A,Fhklm):'''default doc string:param type name: description:returns: type name: description'''if SGData['SpGrp'] == 'P 1':return [0,0,0,0]hklmShape = Fhklm.shapehklmHalf = np.array(hklmShape)/2sortHKLM = np.argsort(Fhklm.flatten())Fdict = {}for hklm in sortHKLM:HKLM = np.unravel_index(hk... | 11 | 55 | 4 | 754 | 29 | 4,370 | 4,431 | 4,370 | null | ['Dang', 'hklmHalf', 'HKLM', 'i', 'Phi', 'ang0', 'Mmap', 'hklmShape', 'Fdict', 'Hmax', 'steps', 'hklm', 'XYZT', 'Fh0', 'DX', 'Flist', 'ang', 'dH', 'SSGMT', 'ptext', 'SSGT', 'Uniq', 'DH', 'sortHKLM', 'dang', 'chisq', 'F', 'H', 'Dphi'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (findSSOffset) defined within the public class called public.The function start at line 4370 and ends at 4431. It contains 55 lines of code and it has a cyclomatic complexity of 11. It takes 4 parameters, represented as [4370.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | SSChargeFlip | def SSChargeFlip(data,reflDict,pgbar):'''default doc string:param type name: description:returns: type name: description'''generalData = data['General']mapData = generalData['Map']map4DData = {}flipData = generalData['Flip']FFtable = {}if 'None' not in flipData['Norm element']:normElem = flipData['Norm element'].upper(... | 15 | 93 | 3 | 1,198 | 49 | 4,433 | 4,535 | 4,433 | null | ['Rcf', 'ff', 'old', 'Phi', 'E', 'dp', 'cell', 'sumE', 'MEhkl', 'CErho', 'phasem', 'SSrho', 'Hmax', 'map4DData', 'FFs', 'Emask', 'hklm', 'mapData', 'GoOn', 'normElem', 'Vol', 'SGData', 'CEsig', 'ctext', 'SSGMT', 'CEhkl', 'dmin', 'Ehkl', 'SSGT', 'FFtable', 'Uniq', 'phasep', 'CFhkl', 'dsp', 'a', 'CFrho', 'b', 'DEhkl', 'p... | None | null | 0 | 0 | 0 | null | 0 | null | The function (SSChargeFlip) defined within the public class called public.The function start at line 4433 and ends at 4535. It contains 93 lines of code and it has a cyclomatic complexity of 15. It takes 3 parameters, represented as [4433.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | getRho | def getRho(xyz,mapData):''' get scattering density at a point by 8-point interpolationparam xyz: coordinate to be probedparam: mapData: dict of map data:returns: density at xyz'''rollMap = lambda rho,roll: np.roll(np.roll(np.roll(rho,roll[0],axis=0),roll[1],axis=1),roll[2],axis=2)if not len(mapData):return 0.0rho = cop... | 3 | 22 | 2 | 384 | 13 | 4,537 | 4,564 | 4,537 | null | ['D13', 'Rho', 'rho', 'rollMap', 'I', 'D123', 'R', 'D23', 'mapShape', 'D12', 'D', 'mapStep', 'X'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getRho) defined within the public class called public.The function start at line 4537 and ends at 4564. It contains 22 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [4537.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | getRhos.getBoxes | def getBoxes(rho,I):Rhos = np.zeros((2,2,2))Mx,My,Mz = rho.shapeIx,Iy,Iz = IRhos = np.array([[[rho[Ix%Mx,Iy%My,Iz%Mz],rho[Ix%Mx,Iy%My,(Iz+1)%Mz]],[rho[Ix%Mx,(Iy+1)%My,Iz%Mz],rho[Ix%Mx,(Iy+1)%My,(Iz+1)%Mz]]],[[rho[(Ix+1)%Mx,Iy%My,Iz%Mz],rho[(Ix+1)%Mx,Iy%My,(Iz+1)%Mz]],[rho[(Ix+1)%Mx,(Iy+1)%My,Iz%Mz],rho[(Ix+1)%Mx,(Iy+1)... | 1 | 9 | 2 | 227 | 0 | 4,576 | 4,584 | 4,576 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getRhos.getBoxes) defined within the public class called public.The function start at line 4576 and ends at 4584. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [4576.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | getRhos | def getRhos(XYZ,rho):''' get scattering density at an array of point by 8-point interpolationthis is faster than gerRho which is only used for single points. However, getRhos isreplaced by scipy.ndimage.interpolation.map_coordinates which does a better job &is just as fast.Thus, getRhos is unused in GSAS-II at this tim... | 3 | 20 | 2 | 243 | 14 | 4,566 | 4,604 | 4,566 | null | ['Xs', 'RIs', 'RIJs', 'I', 'iBeg', 'nBlk', 'R', 'iFin', 'mapShape', 'Blk', 'Ds', 'Rhos', 'mapStep', 'X'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getRhos) defined within the public class called public.The function start at line 4566 and ends at 4604. It contains 20 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [4566.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | SearchMap.fixSpecialPos | def fixSpecialPos(xyz,SGData,Amat):equivs = G2spc.GenAtom(xyz,SGData,Move=True)X = []xyzs = [equiv[0] for equiv in equivs]for x in xyzs:if np.sqrt(np.sum(np.inner(Amat,xyz-x)**2,axis=0))<0.5:X.append(x)if len(X) > 1:return np.average(X,axis=0)else:return xyz | 5 | 11 | 3 | 105 | 0 | 4,631 | 4,641 | 4,631 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (SearchMap.fixSpecialPos) defined within the public class called public.The function start at line 4631 and ends at 4641. It contains 11 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [4631.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | SearchMap.rhoCalc | def rhoCalc(parms,rX,rY,rZ,res,SGLaue):Mag,x0,y0,z0,sig = parmsz = -((x0-rX)**2+(y0-rY)**2+(z0-rZ)**2)/(2.*sig**2)#return norm*Mag*np.exp(z)/(sig*res**3) #not slower but some faults in LSreturn norm*Mag*(1.+z+z**2/2.)/(sig*res**3) | 1 | 4 | 6 | 89 | 0 | 4,643 | 4,647 | 4,643 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (SearchMap.rhoCalc) defined within the public class called public.The function start at line 4643 and ends at 4647. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [4643.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | SearchMap.peakFunc | def peakFunc(parms,rX,rY,rZ,rho,res,SGLaue):Mag,x0,y0,z0,sig = parmsM = rho-rhoCalc(parms,rX,rY,rZ,res,SGLaue)return M | 1 | 4 | 7 | 48 | 0 | 4,649 | 4,652 | 4,649 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (SearchMap.peakFunc) defined within the public class called public.The function start at line 4649 and ends at 4652. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 7 parameters, represented as [4649.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | SearchMap.peakHess | def peakHess(parms,rX,rY,rZ,rho,res,SGLaue):Mag,x0,y0,z0,sig = parmsdMdv = np.zeros(([5,]+list(rX.shape)))delt = .01for i in range(5):parms[i] -= deltrhoCm = rhoCalc(parms,rX,rY,rZ,res,SGLaue)parms[i] += 2.*deltrhoCp = rhoCalc(parms,rX,rY,rZ,res,SGLaue)parms[i] -= deltdMdv[i] = (rhoCp-rhoCm)/(2.*delt)rhoC = rhoCalc(par... | 2 | 16 | 7 | 212 | 0 | 4,654 | 4,670 | 4,654 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (SearchMap.peakHess) defined within the public class called public.The function start at line 4654 and ends at 4670. It contains 16 lines of code and it has a cyclomatic complexity of 2. It takes 7 parameters, represented as [4654.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | SearchMap | def SearchMap(generalData,drawingData,Neg=False):'''Does a search of a density map for peaks meeting the criterion of peakheight is greater than mapData['cutOff']/100 of mapData['rhoMax'] wheremapData is data['General']['mapData']; the map is also in mapData.:param generalData: the phase data structure; includes the ma... | 11 | 59 | 3 | 831 | 40 | 4,606 | 4,723 | 4,606 | null | ['res', 'mags', 'rhoCp', 'cent', 'delt', 'norm', 'rhoPeak', 'z', 'incre', 'rho', 'rolls', 'x1', 'step', 'dMdv', 'rhoC', 'mapHalf', 'steps', 'mapData', 'M', 'SGData', 'x0', 'Hess', 'xyzs', 'rMP', 'peakInt', 'Vec', 'result', 'rollMap', 'peaks', 'rMM', 'peak', 'equivs', 'dcent', 'X', 'indices', 'indx', 'rhoCm', 'rhoMask',... | None | null | 0 | 0 | 0 | null | 0 | null | The function (SearchMap) defined within the public class called public.The function start at line 4606 and ends at 4723. It contains 59 lines of code and it has a cyclomatic complexity of 11. It takes 3 parameters, represented as [4606.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | sortArray | def sortArray(data,pos,reverse=False):'''data is a list of itemssort by pos in list; reverse if True'''T = []for i,M in enumerate(data):try:T.append((M[pos],i))except IndexError:return dataD = dict(zip(T,data))T.sort()if reverse:T.reverse()X = []for key in T:X.append(D[key])return X | 5 | 15 | 3 | 90 | 3 | 4,725 | 4,742 | 4,725 | null | ['T', 'D', 'X'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (sortArray) defined within the public class called public.The function start at line 4725 and ends at 4742. It contains 15 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [4725.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | PeaksEquiv.Duplicate | def Duplicate(xyz,peaks,Amat):if True in [np.allclose(np.inner(Amat,xyz),np.inner(Amat,peak),atol=0.5) for peak in peaks]:return Truereturn False | 3 | 4 | 3 | 51 | 0 | 4,754 | 4,757 | 4,754 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (PeaksEquiv.Duplicate) defined within the public class called public.The function start at line 4754 and ends at 4757. It contains 4 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [4754.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | PeaksEquiv | def PeaksEquiv(data,Ind):'''Find the equivalent map peaks for those selected. Works on thecontents of data['Map Peaks'].:param data: the phase data structure:param list Ind: list of selected peak indices:returns: augmented list of peaks including those related by symmetry to theones in Ind'''def Duplicate(xyz,peaks,Ama... | 7 | 18 | 2 | 164 | 8 | 4,744 | 4,774 | 4,744 | null | ['mapPeaks', 'Indx', 'xyzs', 'xyz', 'Ind', 'generalData', 'XYZ', 'SGData'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (PeaksEquiv) defined within the public class called public.The function start at line 4744 and ends at 4774. It contains 18 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [4744.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | PeaksUnique.noDuplicate | def noDuplicate(xyz,peaks,Amat):if True in [np.allclose(np.inner(Amat,xyz),np.inner(Amat,peak),atol=0.5) for peak in peaks]:return Falsereturn True | 3 | 4 | 3 | 51 | 0 | 4,791 | 4,794 | 4,791 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (PeaksUnique.noDuplicate) defined within the public class called public.The function start at line 4791 and ends at 4794. It contains 4 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [4791.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | PeaksUnique | def PeaksUnique(data,Ind,Sel,dlg):'''Finds the symmetry unique set of peaks from those selected. Selectsthe one closest to the center of the unit cell.Works on the contents of data['Map Peaks']. Called from OnPeaksUnique inGSASIIphsGUI.py,:param data: the phase data structure:param list Ind: list of selected peak indic... | 12 | 29 | 4 | 243 | 12 | 4,776 | 4,825 | 4,776 | null | ['mapPeaks', 'Equiv', 'Indx', 'xyzs', 'icntr', 'xyz', 'dups', 'Unique', 'generalData', 'XYZ', 'SGData', 'cntr'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (PeaksUnique) defined within the public class called public.The function start at line 4776 and ends at 4825. It contains 29 lines of code and it has a cyclomatic complexity of 12. It takes 4 parameters, represented as [4776.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | AtomsCollect | def AtomsCollect(data,Ind,Sel):'''Finds the symmetry set of atoms for those selected. Selectsthe one closest to the selected part of the unit cell for theselected atoms:param data: the phase data structure:param list Ind: list of selected atom indices:param int Sel: an index with the selected plane or location in theun... | 7 | 26 | 3 | 340 | 12 | 4,827 | 4,864 | 4,827 | null | ['uij', 'Equiv', 'Uijs', 'cind', 'xyzs', 'dcent', 'xyz', 'Atoms', 'generalData', 'cent', 'SGData', 'dzeros'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (AtomsCollect) defined within the public class called public.The function start at line 4827 and ends at 4864. It contains 26 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [4827.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | DoWilsonStat | def DoWilsonStat(refList,Super,normEle,Inst):ns = 0if Super:ns=1Eldata = G2el.GetElInfo(normEle,Inst)RefList = np.array(refList).Tdsp = RefList[4+ns]if'P' in Inst['Type'][0]:Fosq = RefList[8+ns]else:Fosq = RefList[5+ns]SQ = 1./(2.*dsp)if 'X' in Inst['Type'][0]:Esq = Fosq/G2el.ScatFac(Eldata,SQ)**2else:Esq = FosqSQ2 = S... | 5 | 37 | 4 | 385 | 20 | 4,866 | 4,902 | 4,866 | null | ['SQ2', 'i', 'Fosq', 'SQ2max', 'step', 'nE2bins', 'scale', 'normE', 'ns', 'SQbins', 'dsp', 'SQ', 'E2bins', 'result', 'Eldata', 'Esq', 'A', 'RefList', 'SQ2min', 'E2calc'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (DoWilsonStat) defined within the public class called public.The function start at line 4866 and ends at 4902. It contains 37 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [4866.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | getCWsig | def getCWsig(ins,pos):'''get CW peak profile sigma^2:param dict ins: instrument parameters with at least 'U', 'V', & 'W'as values only:param float pos: 2-theta of peak:returns: float getCWsig: peak sigma^2'''tp = tand(pos/2.0)return ins['U']*tp**2+ins['V']*tp+ins['W'] | 1 | 3 | 2 | 39 | 1 | 4,908 | 4,918 | 4,908 | null | ['tp'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getCWsig) defined within the public class called public.The function start at line 4908 and ends at 4918. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [4908.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | getCWsigDeriv | def getCWsigDeriv(pos):'''get derivatives of CW peak profile sigma^2 wrt U,V, & W:param float pos: 2-theta of peak:returns: list getCWsigDeriv: d(sig^2)/dU, d(sig)/dV & d(sig)/dW'''tp = tand(pos/2.0)return tp**2,tp,1.0 | 1 | 3 | 1 | 26 | 1 | 4,920 | 4,929 | 4,920 | null | ['tp'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getCWsigDeriv) defined within the public class called public.The function start at line 4920 and ends at 4929. 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 | getCWgam | def getCWgam(ins,pos):'''get CW peak profile gamma:param dict ins: instrument parameters with at least 'X', 'Y' & 'Z'as values only:param float pos: 2-theta of peak:returns: float getCWgam: peak gamma'''return ins['X']/cosd(pos/2.0)+ins['Y']*tand(pos/2.0)+ins.get('Z',0.0) | 1 | 2 | 2 | 47 | 0 | 4,931 | 4,940 | 4,931 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getCWgam) defined within the public class called public.The function start at line 4931 and ends at 4940. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [4931.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | getCWgamDeriv | def getCWgamDeriv(pos):'''get derivatives of CW peak profile gamma wrt X, Y & Z:param float pos: 2-theta of peak:returns: list getCWgamDeriv: d(gam)/dX & d(gam)/dY'''return 1./cosd(pos/2.0),tand(pos/2.0),1.0 | 1 | 2 | 1 | 31 | 0 | 4,942 | 4,950 | 4,942 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getCWgamDeriv) defined within the public class called public.The function start at line 4942 and ends at 4950. 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 | getEDsig | def getEDsig(ins,pos):'''get ED peak profile sig:param dict ins: instrument parameters with at least 'A', 'B' & 'C'as values only:param float pos: energy of peak as keV:returns: float getEDsig: peak sigma^2 im keV**2'''return ins['A']*pos**2+ins['B']*pos+ins['C'] | 1 | 2 | 2 | 29 | 0 | 4,952 | 4,961 | 4,952 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getEDsig) defined within the public class called public.The function start at line 4952 and ends at 4961. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [4952.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | getEDsigDeriv | def getEDsigDeriv(ins,pos):'''get derivatives of ED peak profile sig wrt A, B & C:param float pos: energy of peak in keV:returns: list getEDsigDeriv: d(sig)/dA, d(sig)/dB & d(sig)/dC,'''return pos**2,pos,1.0 | 1 | 2 | 2 | 18 | 0 | 4,963 | 4,971 | 4,963 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getEDsigDeriv) defined within the public class called public.The function start at line 4963 and ends at 4971. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [4963.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | getEDgam | def getEDgam(ins,pos):'''get ED peak profile gam:param dict ins: instrument parameters with at least X, Y & Zas values only:param float pos: energy of peak as keV:returns: float getEDsig: peak gam im keV'''return ins['X']*pos**2+ins['Y']*pos+ins['Z'] | 1 | 2 | 2 | 29 | 0 | 4,973 | 4,982 | 4,973 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getEDgam) defined within the public class called public.The function start at line 4973 and ends at 4982. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [4973.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | getEDgamDeriv | def getEDgamDeriv(ins,pos):'''get derivatives of ED peak profile gam wrt X, Y & Z:param float pos: energy of peak in keV:returns: list getEDsigDeriv: d(gam)/dX, d(gam)/dY & d(gam)/dZ,'''return pos**2,pos,1.0 | 1 | 2 | 2 | 18 | 0 | 4,984 | 4,992 | 4,984 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getEDgamDeriv) defined within the public class called public.The function start at line 4984 and ends at 4992. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [4984.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | getTOFsig | def getTOFsig(ins,dsp):'''get TOF peak profile sigma^2:param dict ins: instrument parameters with at least 'sig-0', 'sig-1' & 'sig-q'as values only:param float dsp: d-spacing of peak:returns: float getTOFsig: peak sigma^2'''return ins['sig-0']+ins['sig-1']*dsp**2+ins['sig-2']*dsp**4+ins['sig-q']*dsp | 1 | 2 | 2 | 38 | 0 | 4,994 | 5,004 | 4,994 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getTOFsig) defined within the public class called public.The function start at line 4994 and ends at 5004. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [4994.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | getTOFsigDeriv | def getTOFsigDeriv(dsp):'''get derivatives of TOF peak profile sigma^2 wrt sig-0, sig-1, & sig-q:param float dsp: d-spacing of peak:returns: list getTOFsigDeriv: d(sig0/d(sig-0), d(sig)/d(sig-1) & d(sig)/d(sig-q)'''return 1.0,dsp**2,dsp**4,dsp | 1 | 2 | 1 | 20 | 0 | 5,006 | 5,014 | 5,006 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getTOFsigDeriv) defined within the public class called public.The function start at line 5006 and ends at 5014. 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 | getTOFgamma | def getTOFgamma(ins,dsp):'''get TOF peak profile gamma:param dict ins: instrument parameters with at least 'X', 'Y' & 'Z'as values only:param float dsp: d-spacing of peak:returns: float getTOFgamma: peak gamma'''return ins['Z']+ins['X']*dsp+ins['Y']*dsp**2 | 1 | 2 | 2 | 29 | 0 | 5,016 | 5,026 | 5,016 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getTOFgamma) defined within the public class called public.The function start at line 5016 and ends at 5026. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5016.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | getTOFgammaDeriv | def getTOFgammaDeriv(dsp):'''get derivatives of TOF peak profile gamma wrt X, Y & Z:param float dsp: d-spacing of peak:returns: list getTOFgammaDeriv: d(gam)/dX & d(gam)/dY'''return dsp,dsp**2,1.0 | 1 | 2 | 1 | 16 | 0 | 5,028 | 5,036 | 5,028 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getTOFgammaDeriv) defined within the public class called public.The function start at line 5028 and ends at 5036. 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 | getTOFbeta | def getTOFbeta(ins,dsp):'''get TOF peak profile beta:param dict ins: instrument parameters with at least 'beat-0', 'beta-1' & 'beta-q'as values only:param float dsp: d-spacing of peak:returns: float getTOFbeta: peak beat'''return ins['beta-0']+ins['beta-1']/dsp**4+ins['beta-q']/dsp**2 | 1 | 2 | 2 | 31 | 0 | 5,038 | 5,048 | 5,038 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getTOFbeta) defined within the public class called public.The function start at line 5038 and ends at 5048. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5038.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | getTOFbetaDeriv | def getTOFbetaDeriv(dsp):'''get derivatives of TOF peak profile beta wrt beta-0, beta-1, & beat-q:param float dsp: d-spacing of peak:returns: list getTOFbetaDeriv: d(beta)/d(beat-0), d(beta)/d(beta-1) & d(beta)/d(beta-q)'''return 1.0,1./dsp**4,1./dsp**2 | 1 | 2 | 1 | 24 | 0 | 5,050 | 5,058 | 5,050 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getTOFbetaDeriv) defined within the public class called public.The function start at line 5050 and ends at 5058. 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 | getTOFalpha | def getTOFalpha(ins,dsp):'''get TOF peak profile alpha:param dict ins: instrument parameters with at least 'alpha'as values only:param float dsp: d-spacing of peak:returns: float getTOFalpha: peak alpha'''return ins['alpha']/dsp | 1 | 2 | 2 | 15 | 0 | 5,060 | 5,070 | 5,060 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getTOFalpha) defined within the public class called public.The function start at line 5060 and ends at 5070. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5060.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | getTOFalphaDeriv | def getTOFalphaDeriv(dsp):'''get alpha derivatives of TOF peak profile:param float dsp: d-spacing of peak:returns: float getTOFalphaDeriv: d(alp)/d(alpha)'''return 1./dsp | 1 | 2 | 1 | 11 | 0 | 5,072 | 5,080 | 5,072 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getTOFalphaDeriv) defined within the public class called public.The function start at line 5072 and ends at 5080. 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 | getPinkAlpha | def getPinkAlpha(ins,tth):'''get pink neutron peak alpha profile:param dict ins: instrument parameters with at least 'alpha'as values only:param float tth: 2-theta of peak:returns: float getPinkNalpha: peak alpha'''return ins['alpha-0']+ ins['alpha-1']*sind(tth/2.) | 1 | 2 | 2 | 26 | 0 | 5,082 | 5,092 | 5,082 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getPinkAlpha) defined within the public class called public.The function start at line 5082 and ends at 5092. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5082.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | getPinkAlphaDeriv | def getPinkAlphaDeriv(tth):'''get alpha derivatives of pink neutron peak profile:param float tth: 2-theta of peak:returns: float getPinkNalphaDeriv: d(alp)/d(alpha-0), d(alp)/d(alpha-1)'''return 1.0,sind(tth/2.) | 1 | 2 | 1 | 18 | 0 | 5,094 | 5,102 | 5,094 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getPinkAlphaDeriv) defined within the public class called public.The function start at line 5094 and ends at 5102. 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 | getPinkBeta | def getPinkBeta(ins,tth):'''get pink neutron peak profile beta:param dict ins: instrument parameters with at least 'beta-0' & 'beta-1'as values only:param float tth: 2-theta of peak:returns: float getPinkbeta: peak beta'''return ins['beta-0']+ins['beta-1']*sind(tth/2.) | 1 | 2 | 2 | 26 | 0 | 5,104 | 5,114 | 5,104 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getPinkBeta) defined within the public class called public.The function start at line 5104 and ends at 5114. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5104.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | getPinkBetaDeriv | def getPinkBetaDeriv(tth):'''get beta derivatives of pink neutron peak profile:param float tth: 2-theta of peak:returns: list getPinkNbetaDeriv: d(beta)/d(beta-0) & d(beta)/d(beta-1)'''return 1.0,sind(tth/2.) | 1 | 2 | 1 | 18 | 0 | 5,116 | 5,124 | 5,116 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getPinkBetaDeriv) defined within the public class called public.The function start at line 5116 and ends at 5124. 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 | setPeakparms | def setPeakparms(Parms,Parms2,pos,mag,ifQ=False,useFit=False):'''set starting peak parameters for single peak fits from plot selection or auto selection:param dict Parms: instrument parameters dictionary:param dict Parms2: table lookup for TOF profile coefficients:param float pos: peak position in 2-theta, TOF or Q (if... | 16 | 48 | 6 | 574 | 10 | 5,126 | 5,189 | 5,126 | null | ['pos', 'XY', 'bet', 'ins', 'dsp', 'sig', 'gam', 'singlevalue', 'ind', 'alp'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (setPeakparms) defined within the public class called public.The function start at line 5126 and ends at 5189. It contains 48 lines of code and it has a cyclomatic complexity of 16. It takes 6 parameters, represented as [5126.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | __init__ | def __init__(self):self.dwell = 20self.lower = 0.self.upper = 1.self.Ninit = 50self.accepted = 0self.tests = 0self.feval = 0self.k = 0self.T = None | 1 | 10 | 1 | 52 | 0 | 5,208 | 5,217 | 5,208 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__init__) defined within the public class called public.The function start at line 5208 and ends at 5217. 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 | init | def init(self, **options):self.__dict__.update(options)self.lower = asarray(self.lower)self.lower = where(self.lower == numpy.NINF, -_double_max, self.lower)self.upper = asarray(self.upper)self.upper = where(self.upper == numpy.PINF, _double_max, self.upper)self.k = 0self.accepted = 0self.feval = 0self.tests = 0 | 1 | 10 | 2 | 97 | 0 | 5,219 | 5,228 | 5,219 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (init) defined within the public class called public.The function start at line 5219 and ends at 5228. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5219.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | getstart_temp | def getstart_temp(self, best_state):''' Find a matching starting temperature and starting parameters vectori.e. find x0 such that func(x0) = T0.:param best_state: _stateA _state object to store the function value and x0 found.:returns: x0 : arrayThe starting parameters vector.'''assert(not self.dims is None)lrange = se... | 4 | 18 | 2 | 127 | 0 | 5,230 | 5,258 | 5,230 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (getstart_temp) defined within the public class called public.The function start at line 5230 and ends at 5258. It contains 18 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [5230.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | set_range | def set_range(self,x0,frac):delrange = frac*(self.upper-self.lower)self.upper = x0+delrangeself.lower = x0-delrange | 1 | 4 | 3 | 36 | 0 | 5,260 | 5,263 | 5,260 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (set_range) defined within the public class called public.The function start at line 5260 and ends at 5263. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [5260.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | accept_test | def accept_test(self, dE):T = self.Tself.tests += 1if dE < 0:self.accepted += 1return 1p = exp(-dE*1.0/T)if (p > random.uniform(0.0, 1.0)):self.accepted += 1return 1return 0 | 3 | 11 | 2 | 69 | 0 | 5,265 | 5,275 | 5,265 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (accept_test) defined within the public class called public.The function start at line 5265 and ends at 5275. It contains 11 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [5265.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | update_guess | def update_guess(self, x0):return np.squeeze(np.random.uniform(0.,1.,size=self.dims))*(self.upper-self.lower)+self.lower | 1 | 2 | 2 | 45 | 0 | 5,277 | 5,278 | 5,277 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (update_guess) defined within the public class called public.The function start at line 5277 and ends at 5278. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5277.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | update_temp | def update_temp(self, x0):pass | 1 | 2 | 2 | 8 | 0 | 5,280 | 5,281 | 5,280 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (update_temp) defined within the public class called public.The function start at line 5280 and ends at 5281. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5280.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | init | def init(self, **options):self.__dict__.update(options) | 1 | 2 | 2 | 16 | 0 | 5,284 | 5,285 | 5,284 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (init) defined within the public class called public.The function start at line 5284 and ends at 5285. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5284.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | update_guess | def update_guess(self, x0):x0 = asarray(x0)u = squeeze(random.uniform(0.0, 1.0, size=self.dims))T = self.Txc = (sign(u-0.5)*T*((1+1.0/T)**abs(2*u-1)-1.0)+1.0)/2.0xnew = xc*(self.upper - self.lower)+self.lowerreturn xnew | 1 | 7 | 2 | 107 | 0 | 5,287 | 5,293 | 5,287 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (update_guess) defined within the public class called public.The function start at line 5287 and ends at 5293. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5287.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | update_temp | def update_temp(self):self.T = self.T0*exp(-self.c * self.k**(self.quench))self.k += 1return | 1 | 4 | 1 | 36 | 0 | 5,295 | 5,298 | 5,295 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (update_temp) defined within the public class called public.The function start at line 5295 and ends at 5298. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | init | def init(self, **options):self.__dict__.update(options) | 1 | 2 | 2 | 16 | 0 | 5,302 | 5,303 | 5,284 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (init) defined within the public class called public.The function start at line 5302 and ends at 5303. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5284.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | update_guess | def update_guess(self,x0): #same as default #TODO - is this a reasonable update procedure?u = squeeze(random.uniform(0.0, 1.0, size=self.dims))T = self.Txc = (sign(u-0.5)*T*((1+1.0/T)**abs(2*u-1)-1.0)+1.0)/2.0xnew = xc*(self.upper - self.lower)+self.lowerreturn xnew | 1 | 6 | 2 | 101 | 0 | 5,305 | 5,310 | 5,305 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (update_guess) defined within the public class called public.The function start at line 5305 and ends at 5310. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5305.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | update_temp | def update_temp(self):self.k += 1self.T = self.T0*self.slope**self.k | 1 | 3 | 1 | 25 | 0 | 5,312 | 5,314 | 5,312 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (update_temp) defined within the public class called public.The function start at line 5312 and ends at 5314. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | __init__ | def __init__(self):self.x = Noneself.cost = None | 1 | 3 | 1 | 15 | 0 | 5,317 | 5,319 | 5,317 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__init__) defined within the public class called public.The function start at line 5317 and ends at 5319. 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 | makeTsched | def makeTsched(data):if data['Algorithm'] == 'fast':sched = fast_sa()sched.quench = data['fast parms'][0]sched.c = data['fast parms'][1]elif data['Algorithm'] == 'log':sched = log_sa()sched.slope = data['log slope']sched.T0 = data['Annealing'][0]if not sched.T0:sched.T0 = 50.Tf = data['Annealing'][1]if not Tf:Tf = 0.00... | 6 | 19 | 1 | 138 | 3 | 5,321 | 5,339 | 5,321 | null | ['sched', 'Tf', 'Tsched'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (makeTsched) defined within the public class called public.The function start at line 5321 and ends at 5339. It contains 19 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | anneal | def anneal(func, x0, args=(), schedule='fast', T0=None, Tf=1e-12, maxeval=None, maxaccept=None, maxiter=400, feps=1e-6, quench=1.0, c=1.0, lower=-100, upper=100, dwell=50, slope=0.9,ranStart=False, ranRange=0.10,autoRan=False,dlg=None): | 1 | 5 | 3 | 93 | 0 | 5,341 | 5,345 | 5,341 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (anneal) defined within the public class called public.The function start at line 5341 and ends at 5345. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [5341.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | worker | def worker(iCyc,data,RBdata,reflType,reflData,covData,out_q,out_t,out_n,nprocess=-1):outlist = []timelist = []nsflist = []random.seed(int(time.time())%100000+nprocess) #make sure each process has a different random startfor n in range(iCyc):result = mcsaSearch(data,RBdata,reflType,reflData,covData,None,False) #mcsa res... | 2 | 14 | 10 | 149 | 4 | 5,558 | 5,571 | 5,558 | null | ['result', 'timelist', 'outlist', 'nsflist'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (worker) defined within the public class called public.The function start at line 5558 and ends at 5571. It contains 14 lines of code and it has a cyclomatic complexity of 2. It takes 10 parameters, represented as [5558.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | MPmcsaSearch | def MPmcsaSearch(nCyc,data,RBdata,reflType,reflData,covData,nprocs):import multiprocessing as mpout_q = mp.Queue()out_t = mp.Queue()out_n = mp.Queue()procs = []totsftime = 0.totnsf = 0iCyc = np.zeros(nprocs)for i in range(nCyc):iCyc[i%nprocs] += 1for i in range(nprocs):p = mp.Process(target=worker,args=(int(iCyc[i]),da... | 5 | 23 | 7 | 195 | 9 | 5,573 | 5,596 | 5,573 | null | ['totsftime', 'out_q', 'totnsf', 'resultlist', 'procs', 'out_n', 'out_t', 'iCyc', 'p'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (MPmcsaSearch) defined within the public class called public.The function start at line 5573 and ends at 5596. It contains 23 lines of code and it has a cyclomatic complexity of 5. It takes 7 parameters, represented as [5573.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | mcsaSearch.__init__ | def __init__(self, xmin, xmax, stepsize=0.5):self.xmin = xminself.xmax = xmaxself.stepsize = stepsize | 1 | 4 | 4 | 30 | 0 | 5,608 | 5,611 | 5,608 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (mcsaSearch.__init__) defined within the public class called public.The function start at line 5608 and ends at 5611. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [5608.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | mcsaSearch.__call__ | def __call__(self, x):'''take a random step but ensure the new position is within the bounds'''while True:# this could be done in a much more clever way, but it will work for example purposessteps = self.xmax-self.xminxnew = x + np.random.uniform(-self.stepsize*steps, self.stepsize*steps, np.shape(x))if np.all(xnew < s... | 4 | 7 | 2 | 76 | 0 | 5,613 | 5,621 | 5,613 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (mcsaSearch.__call__) defined within the public class called public.The function start at line 5613 and ends at 5621. It contains 7 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [5613.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | mcsaSearch.getMDparms | def getMDparms(item,pfx,parmDict,varyList):parmDict[pfx+'MDaxis'] = item['axis']parmDict[pfx+'MDval'] = item['Coef'][0]if item['Coef'][1]:varyList += [pfx+'MDval',]limits = item['Coef'][2]lower.append(limits[0])upper.append(limits[1]) | 2 | 8 | 4 | 80 | 0 | 5,627 | 5,634 | 5,627 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (mcsaSearch.getMDparms) defined within the public class called public.The function start at line 5627 and ends at 5634. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [5627.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | mcsaSearch.getAtomparms | def getAtomparms(item,pfx,aTypes,SGData,parmDict,varyList):parmDict[pfx+'Atype'] = item['atType']aTypes |= set([item['atType'],])pstr = ['Ax','Ay','Az']XYZ = [0,0,0]for i in range(3):name = pfx+pstr[i]parmDict[name] = item['Pos'][0][i]XYZ[i] = parmDict[name]if item['Pos'][1][i]:varyList += [name,]limits = item['Pos'][2... | 3 | 15 | 6 | 165 | 0 | 5,636 | 5,650 | 5,636 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (mcsaSearch.getAtomparms) defined within the public class called public.The function start at line 5636 and ends at 5650. It contains 15 lines of code and it has a cyclomatic complexity of 3. It takes 6 parameters, represented as [5636.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | mcsaSearch.getRBparms | def getRBparms(item,mfx,aTypes,RBdata,SGData,atNo,parmDict,varyList):parmDict[mfx+'MolCent'] = item['MolCent']parmDict[mfx+'RBId'] = item['RBId']pstr = ['Px','Py','Pz']ostr = ['Qa','Qi','Qj','Qk']#angle,vector not quaternionfor i in range(3):name = mfx+pstr[i]parmDict[name] = item['Pos'][0][i]if item['Pos'][1][i]:varyL... | 11 | 45 | 8 | 418 | 0 | 5,652 | 5,696 | 5,652 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (mcsaSearch.getRBparms) defined within the public class called public.The function start at line 5652 and ends at 5696. It contains 45 lines of code and it has a cyclomatic complexity of 11. It takes 8 parameters, represented as [5652.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | mcsaSearch.GetAtomM | def GetAtomM(Xdata,SGData):Mdata = []for xyz in Xdata:Mdata.append(float(len(list(G2spc.GenAtom(xyz,SGData)))))return np.array(Mdata) | 2 | 5 | 2 | 45 | 0 | 5,698 | 5,702 | 5,698 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (mcsaSearch.GetAtomM) defined within the public class called public.The function start at line 5698 and ends at 5702. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [5698.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | mcsaSearch.GetAtomT | def GetAtomT(RBdata,parmDict):'Needs a doc string'atNo = parmDict['atNo']nfixAt = parmDict['nfixAt']Tdata = atNo*[' ',]for iatm in range(nfixAt):parm = ':'+str(iatm)+':Atype'if parm in parmDict:Tdata[iatm] = aTypes.index(parmDict[parm])iatm = nfixAtfor iObj in range(parmDict['nObj']):pfx = str(iObj)+':'if parmDict[pfx+... | 9 | 31 | 2 | 240 | 0 | 5,704 | 5,734 | 5,704 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (mcsaSearch.GetAtomT) defined within the public class called public.The function start at line 5704 and ends at 5734. It contains 31 lines of code and it has a cyclomatic complexity of 9. It takes 2 parameters, represented as [5704.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | mcsaSearch.GetAtomX | def GetAtomX(RBdata,parmDict):'Needs a doc string'Bmat = parmDict['Bmat']atNo = parmDict['atNo']nfixAt = parmDict['nfixAt']Xdata = np.zeros((3,atNo))keys = {':Ax':Xdata[0],':Ay':Xdata[1],':Az':Xdata[2]}for iatm in range(nfixAt):for key in keys:parm = ':'+str(iatm)+keyif parm in parmDict:keys[key][iatm] = parmDict[parm]... | 14 | 45 | 2 | 499 | 0 | 5,736 | 5,780 | 5,736 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (mcsaSearch.GetAtomX) defined within the public class called public.The function start at line 5736 and ends at 5780. It contains 45 lines of code and it has a cyclomatic complexity of 14. It takes 2 parameters, represented as [5736.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | mcsaSearch.getAllTX | def getAllTX(Tdata,Mdata,Xdata,SGM,SGT):allX = np.inner(Xdata,SGM)+SGTallT = np.repeat(Tdata,allX.shape[1])allM = np.repeat(Mdata,allX.shape[1])allX = np.reshape(allX,(-1,3))return allT,allM,allX | 1 | 6 | 5 | 76 | 0 | 5,782 | 5,787 | 5,782 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (mcsaSearch.getAllTX) defined within the public class called public.The function start at line 5782 and ends at 5787. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [5782.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | mcsaSearch.getAllX | def getAllX(Xdata,SGM,SGT):allX = np.inner(Xdata,SGM)+SGTallX = np.reshape(allX,(-1,3))return allX | 1 | 4 | 3 | 38 | 0 | 5,789 | 5,792 | 5,789 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (mcsaSearch.getAllX) defined within the public class called public.The function start at line 5789 and ends at 5792. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [5789.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | mcsaSearch.normQuaternions | def normQuaternions(RBdata,parmDict,varyList,values):for iObj in range(parmDict['nObj']):pfx = str(iObj)+':'if parmDict[pfx+'Type'] in ['Vector','Residue']:Qori = AVdeg2Q(parmDict[pfx+'Qa'],[parmDict[pfx+'Qi'],parmDict[pfx+'Qj'],parmDict[pfx+'Qk']])A,V = Q2AVdeg(Qori)for i,name in enumerate(['Qa','Qi','Qj','Qk']):if i:... | 5 | 11 | 4 | 130 | 0 | 5,794 | 5,804 | 5,794 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (mcsaSearch.normQuaternions) defined within the public class called public.The function start at line 5794 and ends at 5804. It contains 11 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [5794.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | mcsaSearch.mcsaCalc | def mcsaCalc(values,refList,rcov,cosTable,ifInv,allFF,RBdata,varyList,parmDict):''' Compute structure factors for all h,k,l for phaseinput:refList: [ref] where each ref = h,k,l,m,d,...rcov: array[nref,nref] covariance terms between Fo^2 valuesifInv:bool True if centrosymmetricallFF: array[nref,natoms] each value is mul... | 3 | 22 | 9 | 309 | 0 | 5,806 | 5,841 | 5,806 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (mcsaSearch.mcsaCalc) defined within the public class called public.The function start at line 5806 and ends at 5841. It contains 22 lines of code and it has a cyclomatic complexity of 3. It takes 9 parameters, represented as [5806.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | mcsaSearch.MCSAcallback | def MCSAcallback(x, f,accept):return not pgbar.Update(int(min(100,f*100)),newmsg='%s%8.4f%s'%('MC/SA Residual:',int(f*100),'%'))[0] | 1 | 3 | 3 | 47 | 0 | 5,843 | 5,845 | 5,843 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (mcsaSearch.MCSAcallback) defined within the public class called public.The function start at line 5843 and ends at 5845. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [5843.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | mcsaSearch | def mcsaSearch(data,RBdata,reflType,reflData,covData,pgbar,start=True):'''default doc string:param type name: description:returns: type name: description'''class RandomDisplacementBounds(object):'''random displacement with bounds'''def __init__(self, xmin, xmax, stepsize=0.5):self.xmin = xminself.xmax = xmaxself.stepsi... | 33 | 178 | 7 | 1,963 | 85 | 5,598 | 6,008 | 5,598 | null | ['T0', 't1', 'QuatA', 'XYZ', 'Cart', 'SGT', 'sumFcsq', 'Bmat', 'lower', 'steps', 'sumFosq', 'SGData', 'Tdata', 'nsum', 'MCSA', 't2', 'mfx', 'allT', 'sig', 'Aterm', 'nAtm', 'Qori', 'Result', 't0', 'limits', 'pstr', 'atNo', 'scale', 'SGMT', 'x0', 'ifInv', 'ostr', 'sq2pi', 'varyList', 'allFF', 'SQ', 'FFtables', 'start', '... | None | null | 0 | 0 | 0 | null | 0 | null | The function (mcsaSearch) defined within the public class called public.The function start at line 5598 and ends at 6008. It contains 178 lines of code and it has a cyclomatic complexity of 33. It takes 7 parameters, represented as [5598.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | Cart2Polar | def Cart2Polar(X,Y,Z):''' convert Cartesian to polar coordinates in deg'''R = np.sqrt(X**2+Y**2+Z**2)Pl = acosd(Z/R)Az = atan2d(Y,X)return R,Az,Pl | 1 | 5 | 3 | 50 | 3 | 6,022 | 6,029 | 6,022 | null | ['Az', 'Pl', 'R'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (Cart2Polar) defined within the public class called public.The function start at line 6022 and ends at 6029. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [6022.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | Polar2Cart | def Polar2Cart(R,Az,Pl):'''Convert polar angles in deg to Cartesian coordinates'''X = R*sind(Pl)*cosd(Az)Y = R*sind(Pl)*sind(Az)Z = R*cosd(Pl)return X,Y,Z | 1 | 5 | 3 | 50 | 3 | 6,031 | 6,038 | 6,031 | null | ['Y', 'Z', 'X'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (Polar2Cart) defined within the public class called public.The function start at line 6031 and ends at 6038. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [6031.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | RotPolbyM | def RotPolbyM(R,Az,Pl,M):'''Rotate polar coordinates by rotation matrix'''X,Y,Z = Polar2Cart(R,Az,Pl)XYZ = np.vstack((X,Y,Z)).TnXYZ = np.inner(XYZ,M).Treturn(Cart2Polar(nXYZ[0],nXYZ[1],nXYZ[2])) | 1 | 5 | 4 | 74 | 2 | 6,040 | 6,046 | 6,040 | null | ['XYZ', 'nXYZ'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (RotPolbyM) defined within the public class called public.The function start at line 6040 and ends at 6046. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [6040.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | RotPolbyQ | def RotPolbyQ(R,Az,Pl,Q):'''Rotate polar coordinates by quaternion'''X,Y,Z = Polar2Cart(R,Az,Pl)XYZ = np.vstack((X,Y,Z)).TnXYZ = prodQVQ(Q,XYZ).Treturn(Cart2Polar(nXYZ[0],nXYZ[1],nXYZ[2])) | 1 | 5 | 4 | 72 | 2 | 6,049 | 6,055 | 6,049 | null | ['XYZ', 'nXYZ'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (RotPolbyQ) defined within the public class called public.The function start at line 6049 and ends at 6055. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [6049.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | prodQQ | def prodQQ(QA,QB):''' Grassman quaternion productQA,QB quaternions; q=r+ai+bj+ck'''D = np.zeros(4)D[0] = QA[0]*QB[0]-QA[1]*QB[1]-QA[2]*QB[2]-QA[3]*QB[3]D[1] = QA[0]*QB[1]+QA[1]*QB[0]+QA[2]*QB[3]-QA[3]*QB[2]D[2] = QA[0]*QB[2]-QA[1]*QB[3]+QA[2]*QB[0]+QA[3]*QB[1]D[3] = QA[0]*QB[3]+QA[1]*QB[2]-QA[2]*QB[1]+QA[3]*QB[0]#D[0] ... | 1 | 7 | 2 | 194 | 1 | 6,057 | 6,070 | 6,057 | null | ['D'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (prodQQ) defined within the public class called public.The function start at line 6057 and ends at 6070. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [6057.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | normQ | def normQ(QA):''' get length of quaternion & normalize itq=r+ai+bj+ck'''n = np.sqrt(np.sum(np.array(QA)**2))return QA/n | 1 | 3 | 1 | 30 | 1 | 6,072 | 6,077 | 6,072 | null | ['n'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (normQ) defined within the public class called public.The function start at line 6072 and ends at 6077. 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 | invQ | def invQ(Q):'''get inverse of quaternionq=r+ai+bj+ck; q* = r-ai-bj-ck'''return Q*np.array([1,-1,-1,-1]) | 1 | 2 | 1 | 26 | 0 | 6,079 | 6,084 | 6,079 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (invQ) defined within the public class called public.The function start at line 6079 and ends at 6084. 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 | prodQVQ | def prodQVQ(Q,V):'''compute the quaternion vector rotation qvq-1 = v'q=r+ai+bj+ck'''T2 = Q[0]*Q[1]T3 = Q[0]*Q[2]T4 = Q[0]*Q[3]T5 = -Q[1]*Q[1]T6 = Q[1]*Q[2]T7 = Q[1]*Q[3]T8 = -Q[2]*Q[2]T9 = Q[2]*Q[3]T10 = -Q[3]*Q[3]M = np.array([[T8+T10,T6-T4,T3+T7],[T4+T6,T5+T10,T9-T2],[T7-T3,T2+T9,T5+T8]])VP = 2.*np.inner(V,M)return V... | 1 | 13 | 2 | 177 | 11 | 6,086 | 6,102 | 6,086 | null | ['T7', 'VP', 'T6', 'T4', 'T8', 'T3', 'T5', 'M', 'T9', 'T10', 'T2'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (prodQVQ) defined within the public class called public.The function start at line 6086 and ends at 6102. It contains 13 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [6086.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | Q2Mat | def Q2Mat(Q):''' make rotation matrix from quaternionq=r+ai+bj+ck'''QN = normQ(Q)aa = QN[0]**2ab = QN[0]*QN[1]ac = QN[0]*QN[2]ad = QN[0]*QN[3]bb = QN[1]**2bc = QN[1]*QN[2]bd = QN[1]*QN[3]cc = QN[2]**2cd = QN[2]*QN[3]dd = QN[3]**2M = [[aa+bb-cc-dd, 2.*(bc-ad),2.*(ac+bd)],[2*(ad+bc), aa-bb+cc-dd,2.*(cd-ab)],[2*(bd-ac),2.... | 1 | 16 | 1 | 209 | 12 | 6,104 | 6,122 | 6,104 | null | ['ad', 'ab', 'dd', 'M', 'cc', 'aa', 'bd', 'bb', 'bc', 'cd', 'QN', 'ac'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (Q2Mat) defined within the public class called public.The function start at line 6104 and ends at 6122. It contains 16 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 | AV2Q | def AV2Q(A,V):''' convert angle (radians) & vector to quaternionq=r+ai+bj+ck'''Q = np.zeros(4)d = nl.norm(np.array(V))if d:V = V/dif not A: #==0.A = 2.*np.pip = A/2.Q[0] = np.cos(p)Q[1:4] = V*np.sin(p)else:Q[3] = 1.return Q | 3 | 13 | 2 | 92 | 5 | 6,124 | 6,139 | 6,124 | null | ['Q', 'A', 'V', 'p', 'd'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (AV2Q) defined within the public class called public.The function start at line 6124 and ends at 6139. It contains 13 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [6124.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | AVdeg2Q | def AVdeg2Q(A,V):''' convert angle (degrees) & vector to quaternionq=r+ai+bj+ck'''Q = np.zeros(4)d = nl.norm(np.array(V))if not A: #== 0.!A = 360.if d:V = V/dp = A/2.Q[0] = cosd(p)Q[1:4] = V*sind(p)else:Q[3] = 1.return Q | 3 | 13 | 2 | 84 | 5 | 6,141 | 6,156 | 6,141 | null | ['Q', 'A', 'V', 'p', 'd'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (AVdeg2Q) defined within the public class called public.The function start at line 6141 and ends at 6156. It contains 13 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [6141.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | Q2AVdeg | def Q2AVdeg(Q):''' convert quaternion to angle (degrees 0-360) & normalized vectorq=r+ai+bj+ck'''A = 2.*acosd(Q[0])V = np.array(Q[1:])V = V/sind(A/2.)return A,V | 1 | 5 | 1 | 45 | 2 | 6,158 | 6,165 | 6,158 | null | ['V', 'A'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (Q2AVdeg) defined within the public class called public.The function start at line 6158 and ends at 6165. 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 | Q2AV | def Q2AV(Q):''' convert quaternion to angle (radians 0-2pi) & normalized vectorq=r+ai+bj+ck'''A = 2.*np.arccos(Q[0])V = np.array(Q[1:])V = V/np.sin(A/2.)return A,V | 1 | 5 | 1 | 49 | 2 | 6,167 | 6,174 | 6,167 | null | ['V', 'A'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (Q2AV) defined within the public class called public.The function start at line 6167 and ends at 6174. 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 | randomQ | def randomQ(r0,r1,r2,r3):''' create random quaternion from 4 random numbers in range (-1,1)'''sum = 0Q = np.array(4)Q[0] = r0sum += Q[0]**2Q[1] = np.sqrt(1.-sum)*r1sum += Q[1]**2Q[2] = np.sqrt(1.-sum)*r2sum += Q[2]**2Q[3] = np.sqrt(1.-sum)*np.where(r3<0.,-1.,1.)return Q | 1 | 11 | 4 | 118 | 2 | 6,176 | 6,188 | 6,176 | null | ['Q', 'sum'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (randomQ) defined within the public class called public.The function start at line 6176 and ends at 6188. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [6176.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | randomAVdeg | def randomAVdeg(r0,r1,r2,r3):''' create random angle (deg),vector from 4 random number in range (-1,1)'''return Q2AVdeg(randomQ(r0,r1,r2,r3)) | 1 | 2 | 4 | 26 | 0 | 6,190 | 6,193 | 6,190 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (randomAVdeg) defined within the public class called public.The function start at line 6190 and ends at 6193. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [6190.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | makeQuat | def makeQuat(A,B,C):''' Make quaternion from rotation of A vector to B vector about C axis:param np.array A,B,C: Cartesian 3-vectors:returns: quaternion & rotation angle in radians q=r+ai+bj+ck'''V1 = np.cross(A,C)V2 = np.cross(B,C)if nl.norm(V1)*nl.norm(V2):V1 = V1/nl.norm(V1)V2 = V2/nl.norm(V2)V3 = np.cross(V1,V2)els... | 4 | 26 | 3 | 247 | 9 | 6,195 | 6,226 | 6,195 | null | ['V1', 'Q', 'V3', 'DP', 'D1', 'S', 'DM', 'D', 'V2'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (makeQuat) defined within the public class called public.The function start at line 6195 and ends at 6226. It contains 26 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [6195.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | make2Quat | def make2Quat(A,B):''' Make quaternion from rotation of A vector to B vector:param np.array A,B: Cartesian 3-vectors:returns: quaternion & rotation angle in radians q=r+ai+bj+ck'''V1 = np.cross(A,B)if nl.norm(V1) > 1.e-5:V1 = V1/nl.norm(V1)else:V1 = np.zeros(3)Q = np.array([1.,0.,0.,1.]/np.sqrt(2.0))D = 180.if nl.norm(... | 3 | 18 | 2 | 193 | 7 | 6,228 | 6,251 | 6,228 | null | ['A1', 'V1', 'Q', 'D1', 'D', 'S', 'B1'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (make2Quat) defined within the public class called public.The function start at line 6228 and ends at 6251. It contains 18 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [6228.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | annealtests | def annealtests():from numpy import cos# minimum expected at ~-0.195func = lambda x: cos(14.5*x-0.3) + (x+0.2)*xprint (anneal(func,1.0,full_output=1,upper=3.0,lower=-3.0,feps=1e-4,maxiter=2000,schedule='cauchy'))print (anneal(func,1.0,full_output=1,upper=3.0,lower=-3.0,feps=1e-4,maxiter=2000,schedule='fast'))print (ann... | 1 | 10 | 0 | 396 | 1 | 6,253 | 6,265 | 6,253 | null | ['func'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (annealtests) defined within the public class called public.The function start at line 6253 and ends at 6265. 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 | SetDefaultDData | def SetDefaultDData(dType,histoName,NShkl=0,NDij=0):''' Sets default values for various histogram parametersparam: str dType: 3 letter histogram type, e.g. 'PNT'param: str histoName: histogram name as it aoears in treeparam: NShkl int: number of generalized mustrain coefficients - depends on symmetryparam: NDij int: nu... | 4 | 21 | 4 | 469 | 0 | 6,270 | 6,298 | 6,270 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (SetDefaultDData) defined within the public class called public.The function start at line 6270 and ends at 6298. It contains 21 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [6270.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateHKLFvals | def UpdateHKLFvals(histoName, phaseData, reflData):'''Update the flag field and the d-space field in HKLF reflection table.Data tree contents are passed into this routine as data objects (strings,dicts,...) rather than data tree references so that this can calledboth from GUI routines as well as used in scripting.This ... | 10 | 47 | 3 | 541 | 8 | 6,300 | 6,361 | 6,300 | null | ['hkl', 'SuperVec', 'iabsnt', 'generalData', 'Super', 'Cell', 'H', 'SGData'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateHKLFvals) defined within the public class called public.The function start at line 6300 and ends at 6361. It contains 47 lines of code and it has a cyclomatic complexity of 10. It takes 3 parameters, represented as [6300.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | FindTrue | def FindTrue(t):'''Returns ranges of indices of array t where t is True or False:param list t: a list or 1-D array of bool values:param bool Condition: select if True values oa list of indices :returns: two list of indices, one where all values in the range are True and the second where all the values are False.'''prev... | 8 | 15 | 1 | 158 | 2 | 6,363 | 6,385 | 6,363 | null | ['ranges', 'prev'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (FindTrue) defined within the public class called public.The function start at line 6363 and ends at 6385. It contains 15 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 | FileDlgFixExt | def FileDlgFixExt(dlg,file):'this is needed to fix a problem in linux wx.FileDialog'ext = dlg.GetWildcard().split('|')[2*dlg.GetFilterIndex()+1].strip('*')if ext not in file:file += extreturn file | 2 | 6 | 2 | 47 | 1 | 55 | 60 | 55 | null | ['ext'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (FileDlgFixExt) defined within the public class called public.The function start at line 55 and ends at 60. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [55.0] and does not return any value.. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.