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
TLS2Uij
def TLS2Uij(xyz,g,Amat,rbObj):#not used anywhere, but could be?'''default doc string:param type name: description:returns: type name: description'''TLStype,TLS = rbObj['ThermalMotion'][:2]Tmat = np.zeros((3,3))Lmat = np.zeros((3,3))Smat = np.zeros((3,3))gvec = np.sqrt(np.array([g[0][0]**2,g[1][1]**2,g[2][2]**2,g[0][0]*...
4
18
4
379
8
1,230
1,254
1,230
null
['Axyz', 'Umat', 'Smat', 'Tmat', 'XYZ', 'Lmat', 'beta', 'gvec']
None
null
0
0
0
null
0
null
The function (TLS2Uij) defined within the public class called public.The function start at line 1230 and ends at 1254. It contains 18 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [1230.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
AtomTLS2UIJ
def AtomTLS2UIJ(atomData,atPtrs,Amat,rbObj):#not used anywhere, but could be?'''default doc string:param type name: description:returns: type name: description'''cx,ct,cs,cia = atPtrsTLStype,TLS = rbObj['ThermalMotion'][:2]Tmat = np.zeros((3,3))Lmat = np.zeros((3,3))Smat = np.zeros((3,3))G,g = G2lat.A2Gmat(Amat)gvec = ...
6
25
4
421
8
1,256
1,287
1,256
null
['Axyz', 'Umat', 'Smat', 'Tmat', 'XYZ', 'Lmat', 'beta', 'gvec']
None
null
0
0
0
null
0
null
The function (AtomTLS2UIJ) defined within the public class called public.The function start at line 1256 and ends at 1287. It contains 25 lines of code and it has a cyclomatic complexity of 6. It takes 4 parameters, represented as [1256.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetXYZDist
def GetXYZDist(xyz,XYZ,Amat):'''gets distance from position xyz to all XYZ, xyz & XYZ are np.arrayand are in crystal coordinates; Amat is crystal to Cart matrix:param type name: description:returns: type name: description'''return np.sqrt(np.sum(np.inner(Amat,XYZ-xyz)**2,axis=0))
1
2
3
37
0
1,289
1,298
1,289
null
[]
None
null
0
0
0
null
0
null
The function (GetXYZDist) defined within the public class called public.The function start at line 1289 and ends at 1298. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [1289.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getAtomXYZ
def getAtomXYZ(atoms,cx):'''Create an array of fractional coordinates from the atoms list:param list atoms: atoms object as found in tree:param int cx: offset to where coordinates are found:returns: np.array with shape (n,3)'''XYZ = []for atom in atoms:XYZ.append(atom[cx:cx+3])return np.array(XYZ)
2
5
2
37
1
1,300
1,311
1,300
null
['XYZ']
None
null
0
0
0
null
0
null
The function (getAtomXYZ) defined within the public class called public.The function start at line 1300 and ends at 1311. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [1300.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getRBTransMat
def getRBTransMat(X,Y):'''Get transformation for Cartesian axes given 2 vectorsX willbe parallel to new X-axis; X cross Y will be new Z-axis &(X cross Y) cross Y will be new Y-axisUseful for rigid body axes definintion:param array X: normalized vector:param array Y: normalized vector:returns: array M: transformation ma...
1
6
2
73
2
1,313
1,331
1,313
null
['Mat3', 'Mat2']
None
null
0
0
0
null
0
null
The function (getRBTransMat) defined within the public class called public.The function start at line 1313 and ends at 1331. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1313.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
RotateRBXYZ
def RotateRBXYZ(Bmat,Cart,oriQ,symAxis=None):'''rotate & transform cartesian coordinates to crystallographic onesno translation applied. To be used for numerical derivatives:param array Bmat: Orthogonalization matrix, see :func:`GSASIIlattice.cell2AB`:param array Cart: 2D array of coordinates:param array Q: quaternion ...
3
14
4
134
6
1,333
1,356
1,333
null
['symaxis', 'vdotsym', 'Q', 'xformVec', 'XYZ', 'xformAng']
None
null
0
0
0
null
0
null
The function (RotateRBXYZ) defined within the public class called public.The function start at line 1333 and ends at 1356. It contains 14 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [1333.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateRBXYZ
def UpdateRBXYZ(Bmat,RBObj,RBData,RBType):'''returns crystal coordinates for atoms described by RBObj.Note that RBObj['symAxis'], if present, determines the symmetryaxis of the rigid body, which will be aligned to thequaternion direction.:param np.array Bmat: see :func:`GSASIIlattice.cell2AB`:param dict rbObj: rigid bo...
8
31
4
370
11
1,358
1,402
1,358
null
['symaxis', 'vdotsym', 'RBRes', 'vecs', 'mags', 'Q', 'xformVec', 'QuatA', 'XYZ', 'Cart', 'xformAng']
None
null
0
0
0
null
0
null
The function (UpdateRBXYZ) defined within the public class called public.The function start at line 1358 and ends at 1402. It contains 31 lines of code and it has a cyclomatic complexity of 8. It takes 4 parameters, represented as [1358.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetSpnRBData
def GetSpnRBData(SpnRB,atId):for SpnData in SpnRB:if atId in SpnData['Ids']:return SpnData
3
4
2
22
0
1,404
1,407
1,404
null
[]
None
null
0
0
0
null
0
null
The function (GetSpnRBData) defined within the public class called public.The function start at line 1404 and ends at 1407. It contains 4 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [1404.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateMCSAxyz
def UpdateMCSAxyz(Bmat,MCSA):'''default doc string:param type name: description:returns: type name: description'''xyz = []atTypes = []iatm = 0for model in MCSA['Models'][1:]:#skip the MD modelif model['Type'] == 'Atom':xyz.append(model['Pos'][0])atTypes.append(model['atType'])iatm += 1else:RBRes = MCSA['rbData'][model[...
9
33
2
350
12
1,409
1,448
1,409
null
['RBRes', 'atTypes', 'vecs', 'mags', 'Ori', 'xyz', 'QuatA', 'Pos', 'Cart', 'atType', 'Qori', 'iatm']
None
null
0
0
0
null
0
null
The function (UpdateMCSAxyz) defined within the public class called public.The function start at line 1409 and ends at 1448. It contains 33 lines of code and it has a cyclomatic complexity of 9. It takes 2 parameters, represented as [1409.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SetMolCent
def SetMolCent(model,RBData):'''default doc string:param type name: description:returns: type name: description'''rideList = []RBRes = RBData[model['Type']][model['RBId']]if model['Type'] == 'Vector':vecs = RBRes['rbVect']mags = RBRes['VectMag']Cart = np.zeros_like(vecs[0])for vec,mag in zip(vecs,mags):Cart += vec*mage...
6
18
2
158
7
1,450
1,474
1,450
null
['rideList', 'RBRes', 'vecs', 'mags', 'centList', 'cent', 'Cart']
None
null
0
0
0
null
0
null
The function (SetMolCent) defined within the public class called public.The function start at line 1450 and ends at 1474. It contains 18 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [1450.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdateRBUIJ
def UpdateRBUIJ(Bmat,Cart,RBObj):'''default doc string:param type name: description:returns: type name: description'''''' returns atom I/A, Uiso or UIJ for atoms at XYZ as described by RBObj'''TLStype,TLS = RBObj['ThermalMotion'][:2]T = np.zeros(6)L = np.zeros(6)S = np.zeros(8)if 'T' in TLStype:T = TLS[:6]if 'L' in TLS...
7
37
3
894
11
1,480
1,525
1,480
null
['g', 'U', 'beta', 'Uout', 'Umat', 'L', 'Q', 'T', 'S', 'gvec', 'X']
None
null
0
0
0
null
0
null
The function (UpdateRBUIJ) defined within the public class called public.The function start at line 1480 and ends at 1525. It contains 37 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [1480.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetSHCoeff
def GetSHCoeff(pId,parmDict,SHkeys):'''default doc string:param type name: description:returns: type name: description'''SHCoeff = {}for shkey in SHkeys:shname = str(pId)+'::'+shkeySHCoeff[shkey] = parmDict[shname]return SHCoeff
2
6
3
40
2
1,527
1,539
1,527
null
['shname', 'SHCoeff']
None
null
0
0
0
null
0
null
The function (GetSHCoeff) defined within the public class called public.The function start at line 1527 and ends at 1539. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [1527.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getMass
def getMass(generalData):'''Computes mass of unit cell contents:param dict generalData: The General dictionary in Phase:returns: float mass: Crystal unit cell mass in AMU.'''mass = 0.for i,elem in enumerate(generalData['AtomTypes']):mass += generalData['NoAtoms'][elem]*generalData['AtomMass'][i]return max(mass,1.0)
2
5
1
49
1
1,541
1,552
1,541
null
['mass']
None
null
0
0
0
null
0
null
The function (getMass) defined within the public class called public.The function start at line 1541 and ends at 1552. It contains 5 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
getDensity
def getDensity(generalData,hist=None,data=None):'''Calculate crystal structure density. Uses cell values only,unless hist & data are supplied. In that case it uses the Dij terms as well. :param dict generalData: The General dictionary in Phase:param str hist: optional name of a histogram. When not None, the volume adju...
3
13
3
129
6
1,554
1,580
1,554
null
['Volume', 'DijVals', 'density', 'newA', 'mass', 'A']
None
null
0
0
0
null
0
null
The function (getDensity) defined within the public class called public.The function start at line 1554 and ends at 1580. It contains 13 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [1554.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
phaseContents
def phaseContents(phase):'''Compute the unit cell and asymmetric unit contents for a phase.This has been tested only on type='nuclear' phases andmight need adaptation for phases of other types, if thephase type does not have an occupancy defined.:param dict phase: the dict for a phase, as found in thedata tree:returns:...
3
12
1
106
3
1,582
1,604
1,582
null
['generalData', 'acomp', 'ccomp']
None
null
0
0
0
null
0
null
The function (phaseContents) defined within the public class called public.The function start at line 1582 and ends at 1604. It contains 12 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
fmtPhaseContents
def fmtPhaseContents(compdict):'''Format results from :func:`phaseContents`'''n = ', '.join([f'{i}({compdict[i]})' for i in sorted(compdict)])return f"contents: {n}"
2
3
1
27
1
1,606
1,610
1,606
null
['n']
None
null
0
0
0
null
0
null
The function (fmtPhaseContents) defined within the public class called public.The function start at line 1606 and ends at 1610. It contains 3 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getWave
def getWave(Parms):'''returns wavelength from Instrument parameters dictionary:param dict Parms: Instrument parameters;must contain:Lam: single wavelengthorLam1: Ka1 radiation wavelength:returns: float wave: wavelength'''try:return Parms['Lam'][1]except KeyError:return Parms['Lam1'][1]
2
5
1
27
0
1,612
1,627
1,612
null
[]
None
null
0
0
0
null
0
null
The function (getWave) defined within the public class called public.The function start at line 1612 and ends at 1627. It contains 5 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
getMeanWave
def getMeanWave(Parms):'''returns mean wavelength from Instrument parameters dictionary:param dict Parms: Instrument parameters;must contain:Lam: single wavelengthorLam1,Lam2: Ka1,Ka2 radiation wavelengthI(L2)/I(L1): Ka2/Ka1 ratio:returns: float wave: mean wavelength'''try:return Parms['Lam'][1]except KeyError:meanLam ...
2
7
1
62
1
1,629
1,647
1,629
null
['meanLam']
None
null
0
0
0
null
0
null
The function (getMeanWave) defined within the public class called public.The function start at line 1629 and ends at 1647. 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
El2Mass
def El2Mass(Elements):'''compute molecular weight from Elements:param dict Elements: elements in molecular formula;each must containNum: number of atoms in formulaMass: at. wt.:returns: float mass: molecular weight.'''mass = 0for El in Elements:mass += Elements[El]['Num']*Elements[El]['Mass']return mass
2
5
1
33
1
1,650
1,664
1,650
null
['mass']
None
null
0
0
0
null
0
null
The function (El2Mass) defined within the public class called public.The function start at line 1650 and ends at 1664. It contains 5 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
Den2Vol
def Den2Vol(Elements,density):'''converts density to molecular volume:param dict Elements: elements in molecular formula;each must containNum: number of atoms in formulaMass: at. wt.:param float density: material density in gm/cm^3:returns: float volume: molecular volume in A^3'''return El2Mass(Elements)/(density*0.602...
1
2
2
21
0
1,666
1,678
1,666
null
[]
None
null
0
0
0
null
0
null
The function (Den2Vol) defined within the public class called public.The function start at line 1666 and ends at 1678. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1666.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Vol2Den
def Vol2Den(Elements,volume):'''converts volume to density:param dict Elements: elements in molecular formula;each must containNum: number of atoms in formulaMass: at. wt.:param float volume: molecular volume in A^3:returns: float density: material density in gm/cm^3'''return El2Mass(Elements)/(volume*0.6022137)
1
2
2
21
0
1,680
1,692
1,680
null
[]
None
null
0
0
0
null
0
null
The function (Vol2Den) defined within the public class called public.The function start at line 1680 and ends at 1692. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [1680.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
El2EstVol
def El2EstVol(Elements):'''Estimate volume from molecular formula; assumes atom volume = 10A^3:param dict Elements: elements in molecular formula;each must containNum: number of atoms in formula:returns: float volume: estimate of molecular volume in A^3'''vol = 0for El in Elements:vol += 10.*Elements[El]['Num']return v...
2
5
1
28
1
1,694
1,707
1,694
null
['vol']
None
null
0
0
0
null
0
null
The function (El2EstVol) defined within the public class called public.The function start at line 1694 and ends at 1707. It contains 5 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
XScattDen
def XScattDen(Elements,vol,wave=0.):'''Estimate X-ray scattering density from molecular formula & volume;ignores valence, but includes anomalous effects:param dict Elements: elements in molecular formula;each element must containNum: number of atoms in formulaZ: atomic number:param float vol: molecular volume in A^3:pa...
4
14
3
124
5
1,709
1,738
1,709
null
['rho', 'f0', 'fpp', 'Xanom', 'mu']
None
null
0
0
0
null
0
null
The function (XScattDen) defined within the public class called public.The function start at line 1709 and ends at 1738. It contains 14 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [1709.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
NCScattDen
def NCScattDen(Elements,vol,wave=0.):'''Estimate neutron scattering density from molecular formula & volume;ignores valence, but includes anomalous effects:param dict Elements: elements in molecular formula;each element must containNum: number of atoms in formulaZ: atomic number:param float vol: molecular volume in A^3...
5
24
3
276
12
1,740
1,779
1,740
null
['rho', 'T0', 'b0', 'bpp', 'isotope', 'Emev', 'T1', 'D1', 'D2', 'mu', 'D0', 'T2']
None
null
0
0
0
null
0
null
The function (NCScattDen) defined within the public class called public.The function start at line 1740 and ends at 1779. It contains 24 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [1740.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
wavekE
def wavekE(wavekE):'''Convert wavelength to energy & vise versa:param float waveKe:wavelength in A or energy in kE:returns float waveKe:the other one'''return 12.397639/wavekE
1
2
1
12
0
1,781
1,789
1,781
null
[]
None
null
0
0
0
null
0
null
The function (wavekE) defined within the public class called public.The function start at line 1781 and ends at 1789. 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
XAnomAbs
def XAnomAbs(Elements,wave):kE = wavekE(wave)Xanom = {}for El in Elements:Orbs = G2el.GetXsectionCoeff(El)Xanom[El] = G2el.FPcalc(Orbs, kE)return Xanom#f',f", mu
2
7
2
45
3
1,791
1,797
1,791
null
['Xanom', 'Orbs', 'kE']
None
null
0
0
0
null
0
null
The function (XAnomAbs) defined within the public class called public.The function start at line 1791 and ends at 1797. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [1791.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
makeWaves
def makeWaves(waveTypes,FSSdata,XSSdata,USSdata,MSSdata,Mast):'''waveTypes: array nAtoms: 'Fourier','ZigZag' or 'Block'FSSdata: array 2 x atoms x waves(sin,cos terms)XSSdata: array 2x3 x atoms X waves (sin,cos terms)USSdata: array 2x6 x atoms X waves (sin,cos terms)MSSdata: array 2x3 x atoms X waves (sin,cos terms)Mast...
8
59
6
1,025
30
1,803
1,870
1,803
null
['Xmod', 'tauU', 'FmodB', 'Au', 'XmodB', 'XmodZ', 'MmodA', 'tauF', 'Am', 'FmodA', 'Mmod', 'nx', 'tauM', 'nWaves', 'Bf', 'XmodA', 'Tmm', 'Ax', 'Bx', 'Af', 'tauX', 'UmodA', 'XYZmax', 'Fmod', 'Bu', 'Umod', 'UmodB', 'ngl', 'MmodB', 'Bm']
None
null
0
0
0
null
0
null
The function (makeWaves) defined within the public class called public.The function start at line 1803 and ends at 1870. It contains 59 lines of code and it has a cyclomatic complexity of 8. It takes 6 parameters, represented as [1803.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
MagMod
def MagMod(glTau,xyz,modQ,MSSdata,SGData,SSGData):'''this needs to make magnetic moment modulations & magnitudes asfxn of gTau points; NB: this allows only 1 mag. wave fxn.'''Am = np.array(MSSdata[3:]).T[:,0,:] #atoms x cos mag mods; only 1 wave usedBm = np.array(MSSdata[:3]).T[:,0,:] #...sin mag modsSGMT = np.array([o...
10
28
6
536
15
1,872
1,903
1,872
null
['SGT', 'MmodAR', 'AMR', 'BMR', 'psin', 'SGMT', 'Sinv', 'XYZ', 'MmodBI', 'MmodAI', 'pcos', 'phi', 'Am', 'MmodBR', 'Bm']
None
null
0
0
0
null
0
null
The function (MagMod) defined within the public class called public.The function start at line 1872 and ends at 1903. It contains 28 lines of code and it has a cyclomatic complexity of 10. It takes 6 parameters, represented as [1872.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Modulation
def Modulation(H,HP,nWaves,Fmod,Xmod,Umod,glTau,glWt):'''H: array nRefBlk x ops X hkltHP: array nRefBlk x ops X hklt proj to hklnWaves: list number of waves for frac, pos, uij & magFmod: array 2 x atoms x waves(sin,cos terms)Xmod: array atoms X 3 X nglUmod: array atoms x 3x3 x nglglTau,glWt: arrays Gauss-Lorentzian pos...
4
18
8
272
6
1,905
1,932
1,905
null
['HdotXD', 'HdotX', 'cosHA', 'sinHA', 'HbH', 'D']
None
null
0
0
0
null
0
null
The function (Modulation) defined within the public class called public.The function start at line 1905 and ends at 1932. It contains 18 lines of code and it has a cyclomatic complexity of 4. It takes 8 parameters, represented as [1905.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ModulationTw
def ModulationTw(H,HP,nWaves,Fmod,Xmod,Umod,glTau,glWt):'''H: array nRefBlk x tw x ops X hkltHP: array nRefBlk x tw x ops X hklt proj to hklFmod: array 2 x atoms x waves(sin,cos terms)Xmod: array atoms X ngl X 3Umod: array atoms x ngl x 3x3glTau,glWt: arrays Gauss-Lorentzian pos & wts'''if nWaves[2]:if len(HP.shape) > ...
4
18
8
265
6
1,934
1,960
1,934
null
['HdotXD', 'HdotX', 'cosHA', 'sinHA', 'HbH', 'D']
None
null
0
0
0
null
0
null
The function (ModulationTw) defined within the public class called public.The function start at line 1934 and ends at 1960. It contains 18 lines of code and it has a cyclomatic complexity of 4. It takes 8 parameters, represented as [1934.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
makeWavesDerv
def makeWavesDerv(ngl,waveTypes,FSSdata,XSSdata,USSdata,Mast):'''Only for Fourier waves for fraction, position & adp (probably not used for magnetism)FSSdata: array 2 x atoms x waves(sin,cos terms)XSSdata: array 2x3 x atoms X waves (sin,cos terms)USSdata: array 2x6 x atoms X waves (sin,cos terms)Mast: array orthogonali...
7
48
6
841
22
1,962
2,017
1,962
null
['CtauU', 'StauX', 'CtauF', 'tauU', 'Au', 'CtauX', 'tauF', 'nx', 'nWaves', 'Bf', 'StauU', 'ZtauXt', 'StauF', 'Ax', 'Bx', 'Af', 'tauX', 'UmodA', 'Bu', 'UmodB', 'ZtauXx', 'waveShapes']
None
null
0
0
0
null
0
null
The function (makeWavesDerv) defined within the public class called public.The function start at line 1962 and ends at 2017. It contains 48 lines of code and it has a cyclomatic complexity of 7. It takes 6 parameters, represented as [1962.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ModulationDerv
def ModulationDerv(H,HP,Hij,nWaves,waveShapes,Fmod,Xmod,UmodAB,SCtauF,SCtauX,SCtauU,glTau,glWt):'''Compute Fourier modulation derivativesH: array ops X hklt proj to hklHP: array ops X hklt proj to hklHij: array 2pi^2[a*^2h^2 b*^2k^2 c*^2l^2 a*b*hk a*c*hl b*c*kl] of projected hklm to hkl space'''Mf = [H.shape[0],]+list(...
2
38
13
1,046
28
2,019
2,071
2,019
null
['dGdMxC', 'dGdMxSa', 'dGdMuSa', 'Mf', 'dGdMxS', 'dGdMuC', 'dGdMxSb', 'HbH', 'HdotX', 'dGdMxCb', 'dHdXA', 'D', 'dGdMfC', 'dGdMuCb', 'HdotXD', 'dGdMxCa', 'dGdMuS', 'HuH', 'dGdMuCa', 'part1', 'dGdMuSb', 'dGdMfS', 'Umod', 'dHdXB', 'dUdAu', 'Mx', 'Mu', 'dUdBu']
None
null
0
0
0
null
0
null
The function (ModulationDerv) defined within the public class called public.The function start at line 2019 and ends at 2071. It contains 38 lines of code and it has a cyclomatic complexity of 2. It takes 13 parameters, represented as [2019.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
posFourier
def posFourier(tau,psin,pcos):A = np.array([ps[:,nxs]*np.sin(2*np.pi*(i+1)*tau) for i,ps in enumerate(psin)])B = np.array([pc[:,nxs]*np.cos(2*np.pi*(i+1)*tau) for i,pc in enumerate(pcos)])return np.sum(A,axis=0)+np.sum(B,axis=0)
3
4
3
117
2
2,073
2,076
2,073
null
['B', 'A']
None
null
0
0
0
null
0
null
The function (posFourier) defined within the public class called public.The function start at line 2073 and ends at 2076. It contains 4 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [2073.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
posZigZag
def posZigZag(T,Tmm,Xmax):DT = Tmm[1]-Tmm[0]Su = 2.*Xmax/DTSd = 2.*Xmax/(1.-DT)A = np.array([np.where(0.< (t-Tmm[0])%1. <= DT, -Xmax+Su*((t-Tmm[0])%1.), Xmax-Sd*((t-Tmm[1])%1.)) for t in T])return A
2
6
3
114
4
2,078
2,083
2,078
null
['Sd', 'Su', 'A', 'DT']
None
null
0
0
0
null
0
null
The function (posZigZag) defined within the public class called public.The function start at line 2078 and ends at 2083. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [2078.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
posBlock
def posBlock(T,Tmm,Xmax):A = np.array([np.where(Tmm[0] < t%1. <= Tmm[1],-Xmax,Xmax) for t in T])return A
2
3
3
48
1
2,095
2,097
2,095
null
['A']
None
null
0
0
0
null
0
null
The function (posBlock) defined within the public class called public.The function start at line 2095 and ends at 2097. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [2095.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
fracCrenel
def fracCrenel(tau,Toff,Twid):Tau = (tau-Toff)%1.A = np.where(Tau<Twid,1.,0.)return A
1
4
3
37
2
2,107
2,110
2,107
null
['A', 'Tau']
None
null
0
0
0
null
0
null
The function (fracCrenel) defined within the public class called public.The function start at line 2107 and ends at 2110. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [2107.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
fracFourier
def fracFourier(tau,fsin,fcos):if len(fsin) == 1:A = np.array([fsin[0]*np.sin(2.*np.pi*tau)])B = np.array([fcos[0]*np.cos(2.*np.pi*tau)])else:A = np.array([fs[:,nxs]*np.sin(2.*np.pi*(i+1)*tau) for i,fs in enumerate(fsin)])B = np.array([fc[:,nxs]*np.cos(2.*np.pi*(i+1)*tau) for i,fc in enumerate(fcos)])return np.sum(A,ax...
4
8
3
183
2
2,112
2,119
2,112
null
['B', 'A']
None
null
0
0
0
null
0
null
The function (fracFourier) defined within the public class called public.The function start at line 2112 and ends at 2119. It contains 8 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [2112.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ApplyModulation
def ApplyModulation(data,tau):'''Applies modulation to drawing atom positions & Uijs for given tau'''generalData = data['General']cell = generalData['Cell'][1:7]G,g = G2lat.cell2Gmat(cell)SGData = generalData['SGData']SSGData = generalData['SSGData']cx,ct,cs,cia = getAtomPtrs(data)drawingData = data['Drawing']modul = g...
25
92
2
983
32
2,121
2,215
2,121
null
['opr', 'drawAtoms', 'atmom', 'ures', 'cell', 'wave', 'tauT', 'Sadp', 'Fade', 'drxyz', 'Smag', 'M', 'SGData', 'Sfrac', 'Spos', 'ccof', 'drawatom', 'modul', 'uwave', 'XYZmax', 'SSGData', 'drawingData', 'scof', 'waveType', 'generalData', 'atxyz', 'indx', 'atuij', 'mom', 'atoms', 'Tminmax', 'X']
None
null
0
0
0
null
0
null
The function (ApplyModulation) defined within the public class called public.The function start at line 2121 and ends at 2215. It contains 92 lines of code and it has a cyclomatic complexity of 25. It takes 2 parameters, represented as [2121.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
patchIsoDisp
def patchIsoDisp(ISO):'''patch: look for older ISODISTORT imports (<Nov 2021)'''print('''======================================================================Warning: The ISODISTORT modes were read before the importerwas corrected to save displacement offsets. Will attempt to correctfrom ParentStructure (correct only ...
2
16
1
80
2
2,217
2,233
2,217
null
['v', 'albl']
None
null
0
0
0
null
0
null
The function (patchIsoDisp) defined within the public class called public.The function start at line 2217 and ends at 2233. It contains 16 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CalcIsoDisp
def CalcIsoDisp(Phase,parmDict={},covdata={}):'''Compute the ISODISTORT displacement variable values from theatomic coordinates, applying the p::dA?:n displacements if parmDictis supplied. Uncertainties are computed if covdata is supplied.'''ISO = Phase['ISODISTORT']if 'G2coordOffset' not in ISO: patchIsoDisp(ISO) # pa...
9
28
3
403
15
2,235
2,271
2,235
null
['covDict', 'modes', 'dispValues', 'pos', 'ISO', 'sigMat', 'coordOffset', 'var', 'atmIndex', 'modeEsds', 'atm', 'modeValues', 'vcov', 'dispEsds', 'normMode2Var']
None
null
0
0
0
null
0
null
The function (CalcIsoDisp) defined within the public class called public.The function start at line 2235 and ends at 2271. It contains 28 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [2235.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CalcIsoCoords
def CalcIsoCoords(Phase,parmDict,covdata={}):'''Compute the coordinate positions from ISODISTORT displacement mode valuesUncertainties are computed if covdata is supplied.:param dict Phase: contents of tree entry for selected phase:param dict parmDict: a dict with values for the modes; note that in the parmDict from re...
10
30
3
363
13
2,273
2,315
2,273
null
['modeDict', 'covDict', 'modes', 'dispValues', 'vcov', 'ISO', 'sigMat', 'var', 'modeEsds', 'modeVals', 'dispEsds', 'normMode2Var', 'posDict']
None
null
0
0
0
null
0
null
The function (CalcIsoCoords) defined within the public class called public.The function start at line 2273 and ends at 2315. It contains 30 lines of code and it has a cyclomatic complexity of 10. It takes 3 parameters, represented as [2273.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ApplyModeDisp
def ApplyModeDisp(data):''' Applies ISODISTORT mode displacements to atom lists.This changes the contents of the Draw Atoms positions andthe Atoms positions.:param dict data: the contents of the Phase data tree item for aparticular phase'''generalData = data['General']Atoms= data['Atoms']ISOdata = data['ISODISTORT']coo...
8
39
1
368
23
2,317
2,362
2,317
null
['opr', 'drawAtoms', 'modeDisp', 'ISOdata', 'displ', 'cell', 'mode2var', 'CSIX', 'varDisp', 'parNames', 'SGData', 'coords', 'drawatom', 'atNames', 'Atoms', 'vardict', 'drawingData', 'SytSym', 'generalData', 'atxyz', 'indx', 'atoms', 'X']
None
null
0
0
0
null
0
null
The function (ApplyModeDisp) defined within the public class called public.The function start at line 2317 and ends at 2362. It contains 39 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
gaulegf
def gaulegf(a, b, n):x = range(n+1) # x[0] unusedw = range(n+1) # w[0] unusedeps = 3.0E-14m = (n+1)/2xm = 0.5*(b+a)xl = 0.5*(b-a)for i in range(1,m+1):z = math.cos(3.141592654*(i-0.25)/(n+0.5))while True:p1 = 1.0p2 = 0.0for j in range(1,n+1):p3 = p2p2 = p1p1 = ((2.0*j-1.0)*z*p2-(j-1.0)*p3)/jpp = n*(z*p1-p2)/(z*z-1.0)z1...
5
26
3
282
12
2,373
2,400
2,373
null
['xm', 'z1', 'xl', 'm', 'pp', 'p1', 'eps', 'x', 'p2', 'w', 'z', 'p3']
None
null
0
0
0
null
0
null
The function (gaulegf) defined within the public class called public.The function start at line 2373 and ends at 2400. It contains 26 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [2373.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
BessJn
def BessJn(nmax,x):''' compute Bessel function J(n,x) from scipy routine & recurrance relationreturns sequence of J(n,x) for n in range [-nmax...0...nmax]:paraminteger nmax: maximul order for Jn(x):paramfloat x: argument for Jn(x):returns numpy array: [J(-nmax,x)...J(0,x)...J(nmax,x)]'''import scipy.special as spbessJn...
2
10
2
132
1
2,404
2,422
2,404
null
['bessJn']
None
null
0
0
0
null
0
null
The function (BessJn) defined within the public class called public.The function start at line 2404 and ends at 2422. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [2404.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
BessIn
def BessIn(nmax,x):''' compute modified Bessel function I(n,x) from scipy routines & recurrance relationreturns sequence of I(n,x) for n in range [-nmax...0...nmax]:paraminteger nmax: maximul order for In(x):paramfloat x: argument for In(x):returns numpy array: [I(-nmax,x)...I(0,x)...I(nmax,x)]'''import scipy.special a...
2
10
2
124
1
2,424
2,442
2,424
null
['bessIn']
None
null
0
0
0
null
0
null
The function (BessIn) defined within the public class called public.The function start at line 2424 and ends at 2442. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [2424.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CalcDist
def CalcDist(distance_dict, distance_atoms, parmDict):'''Used in class:`GSASIIobj.ExpressionCalcObj` to compute bond distanceswhen defined in an expression.'''if not len(parmDict):return 0.pId = distance_dict['pId']A = [parmDict['%s::A%d'%(pId,i)] for i in range(6)]Amat = G2lat.cell2AB(G2lat.A2cell(A))[0]Oxyz = [parmDi...
6
21
3
233
11
2,449
2,473
2,449
null
['Oxyz', 'dist', 'cen', 'op', 'pId', 'symNo', 'Amat', 'Txyz', 'inv', 'D', 'A']
None
null
0
0
0
null
0
null
The function (CalcDist) defined within the public class called public.The function start at line 2449 and ends at 2473. It contains 21 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [2449.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CalcDistDeriv
def CalcDistDeriv(distance_dict, distance_atoms, parmDict):'''Used to compute s.u. values on distances tracked in the sequentialresults table'''if not len(parmDict):return NonepId = distance_dict['pId']A = [parmDict['%s::A%d'%(pId,i)] for i in range(6)]Amat = G2lat.cell2AB(G2lat.A2cell(A))[0]Oxyz = [parmDict['%s::A%s:%...
5
13
3
156
9
2,475
2,490
2,475
null
['Oxyz', 'deriv', 'pId', 'symNo', 'Amat', 'Tunit', 'Txyz', 'SGData', 'A']
None
null
0
0
0
null
0
null
The function (CalcDistDeriv) defined within the public class called public.The function start at line 2475 and ends at 2490. It contains 13 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [2475.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CalcAngle
def CalcAngle(angle_dict, angle_atoms, parmDict):'''Used in class:`GSASIIobj.ExpressionCalcObj` to compute bond angleswhen defined in an expression.'''if not len(parmDict):return 0.pId = angle_dict['pId']A = [parmDict['%s::A%d'%(pId,i)] for i in range(6)]Amat = G2lat.cell2AB(G2lat.A2cell(A))[0]Oxyz = [parmDict['%s::A%s...
9
29
3
357
15
2,492
2,523
2,492
null
['Axyz', 'Oxyz', 'dist', 'angle', 'cen', 'op', 'pId', 'Bxyz', 'symNo', 'Amat', 'ABxyz', 'inv', 'D', 'A', 'vec']
None
null
0
0
0
null
0
null
The function (CalcAngle) defined within the public class called public.The function start at line 2492 and ends at 2523. It contains 29 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [2492.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CalcAngleDeriv
def CalcAngleDeriv(angle_dict, angle_atoms, parmDict):'''Used to compute s.u. values on angles tracked in the sequentialresults table'''if not len(parmDict):return NonepId = angle_dict['pId']A = [parmDict['%s::A%d'%(pId,i)] for i in range(6)]Amat = G2lat.cell2AB(G2lat.A2cell(A))[0]Oxyz = [parmDict['%s::A%s:%d'%(pId,x,a...
6
14
3
193
10
2,525
2,541
2,525
null
['Axyz', 'Oxyz', 'deriv', 'pId', 'Bxyz', 'symNo', 'Amat', 'Tunit', 'SGData', 'A']
None
null
0
0
0
null
0
null
The function (CalcAngleDeriv) defined within the public class called public.The function start at line 2525 and ends at 2541. It contains 14 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [2525.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getSyXYZ
def getSyXYZ(XYZ,ops,SGData):'''default doc:param type name: description:returns: type name: description'''XYZout = np.zeros_like(XYZ)for i,[xyz,op] in enumerate(zip(XYZ,ops)):if op == '1':XYZout[i] = xyzelse:oprs = op.split('+')unit = [0,0,0]if len(oprs)>1:unit = np.array(list(eval(oprs[1])))syop =int(oprs[0])inv = sy...
4
19
3
162
6
2,543
2,568
2,543
null
['syop', 'oprs', 'unit', 'XYZout', 'cent', 'inv']
None
null
0
0
0
null
0
null
The function (getSyXYZ) defined within the public class called public.The function start at line 2543 and ends at 2568. It contains 19 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [2543.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getRestDist
def getRestDist(XYZ,Amat):'''Compute interatomic distance(s) for use in restraints:param type name: description:returns: type name: description'''return np.sqrt(np.sum(np.inner(Amat,(XYZ[1]-XYZ[0]))**2))
1
2
2
39
0
2,570
2,578
2,570
null
[]
None
null
0
0
0
null
0
null
The function (getRestDist) defined within the public class called public.The function start at line 2570 and ends at 2578. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [2570.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getRestDeriv
def getRestDeriv(Func,XYZ,Amat,ops,SGData):'''Compute numerical derivatives of restraints for use in minimization:param type name: description:returns: type name: description'''deriv = np.zeros((len(XYZ),3))dx = 0.00001for j,xyz in enumerate(XYZ):for i,x in enumerate(np.array([[dx,0,0],[0,dx,0],[0,0,dx]])):XYZ[j] -= xd...
3
12
5
158
4
2,580
2,598
2,580
null
['dx', 'd1', 'deriv', 'd2']
None
null
0
0
0
null
0
null
The function (getRestDeriv) defined within the public class called public.The function start at line 2580 and ends at 2598. It contains 12 lines of code and it has a cyclomatic complexity of 3. It takes 5 parameters, represented as [2580.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getRestAngle.calcVec
def calcVec(Ox,Tx,Amat):return np.inner(Amat,(Tx-Ox))
1
2
3
22
0
2,609
2,610
2,609
null
[]
None
null
0
0
0
null
0
null
The function (getRestAngle.calcVec) defined within the public class called public.The function start at line 2609 and ends at 2610. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [2609.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getRestAngle
def getRestAngle(XYZ,Amat):'''Compute interatomic angle(s) for use in restraints:param type name: description:returns: type name: description'''def calcVec(Ox,Tx,Amat):return np.inner(Amat,(Tx-Ox))VecA = calcVec(XYZ[1],XYZ[0],Amat)VecA /= np.sqrt(np.sum(VecA**2))VecB = calcVec(XYZ[1],XYZ[2],Amat)VecB /= np.sqrt(np.sum(...
1
11
2
115
4
2,600
2,620
2,600
null
['VecA', 'angle', 'VecB', 'edge']
None
null
0
0
0
null
0
null
The function (getRestAngle) defined within the public class called public.The function start at line 2600 and ends at 2620. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [2600.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getRestPlane
def getRestPlane(XYZ,Amat):'''Compute deviations from a best plane through atoms for use in restraints:param type name: description:returns: type name: description'''sumXYZ = np.zeros(3)for xyz in XYZ:sumXYZ += xyzsumXYZ /= len(XYZ)XYZ = np.array(XYZ)-sumXYZXYZ = np.inner(Amat,XYZ).TZmat = np.zeros((3,3))for i,xyz in e...
3
14
2
130
5
2,622
2,642
2,622
null
['Evec', 'sumXYZ', 'Order', 'Zmat', 'XYZ']
None
null
0
0
0
null
0
null
The function (getRestPlane) defined within the public class called public.The function start at line 2622 and ends at 2642. It contains 14 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [2622.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getRestChiral
def getRestChiral(XYZ,Amat):'''compute a chiral restraint:param type name: description:returns: type name: description'''VecA = np.empty((3,3))VecA[0] = np.inner(XYZ[1]-XYZ[0],Amat)VecA[1] = np.inner(XYZ[2]-XYZ[0],Amat)VecA[2] = np.inner(XYZ[3]-XYZ[0],Amat)return nl.det(VecA)
1
6
2
90
1
2,644
2,656
2,644
null
['VecA']
None
null
0
0
0
null
0
null
The function (getRestChiral) defined within the public class called public.The function start at line 2644 and ends at 2656. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [2644.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getRestTorsion
def getRestTorsion(XYZ,Amat):'''compute a torsion restraint:param type name: description:returns: type name: description'''VecA = np.empty((3,3))VecA[0] = np.inner(XYZ[1]-XYZ[0],Amat)VecA[1] = np.inner(XYZ[2]-XYZ[1],Amat)VecA[2] = np.inner(XYZ[3]-XYZ[2],Amat)D = nl.det(VecA)Mag = np.sqrt(np.sum(VecA*VecA,axis=1))P12 = ...
3
15
2
276
8
2,658
2,679
2,658
null
['TOR', 'P13', 'VecA', 'P23', 'Ang', 'P12', 'Mag', 'D']
None
null
0
0
0
null
0
null
The function (getRestTorsion) defined within the public class called public.The function start at line 2658 and ends at 2679. It contains 15 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [2658.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
calcTorsionEnergy
def calcTorsionEnergy(TOR,Coeff=[]):'''default doc string:param type name: description:returns: type name: description'''sum = 0.if len(Coeff):cof = np.reshape(Coeff,(3,3)).Tdelt = TOR-cof[1]delt = np.where(delt<-180.,delt+360.,delt)delt = np.where(delt>180.,delt-360.,delt)term = -cof[2]*delt**2val = cof[0]*np.exp(term...
2
13
2
141
7
2,681
2,700
2,681
null
['pMax', 'Eval', 'term', 'delt', 'val', 'cof', 'sum']
None
null
0
0
0
null
0
null
The function (calcTorsionEnergy) defined within the public class called public.The function start at line 2681 and ends at 2700. It contains 13 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [2681.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getTorsionDeriv
def getTorsionDeriv(XYZ,Amat,Coeff):'''default doc string:param type name: description:returns: type name: description'''deriv = np.zeros((len(XYZ),3))dx = 0.00001for j,xyz in enumerate(XYZ):for i,x in enumerate(np.array([[dx,0,0],[0,dx,0],[0,0,dx]])):XYZ[j] -= xtor = getRestTorsion(XYZ,Amat)p1,d1 = calcTorsionEnergy(t...
3
14
3
160
3
2,702
2,722
2,702
null
['dx', 'tor', 'deriv']
None
null
0
0
0
null
0
null
The function (getTorsionDeriv) defined within the public class called public.The function start at line 2702 and ends at 2722. It contains 14 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [2702.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getRestRama
def getRestRama(XYZ,Amat):'''Computes a pair of torsion angles in a 5 atom string:param nparray XYZ: crystallographic coordinates of 5 atoms:param nparray Amat: crystal to cartesian transformation matrix:returns: list (phi,psi) two torsion angles in degrees'''phi = getRestTorsion(XYZ[:5],Amat)psi = getRestTorsion(XYZ[1...
1
4
2
36
2
2,724
2,735
2,724
null
['phi', 'psi']
None
null
0
0
0
null
0
null
The function (getRestRama) defined within the public class called public.The function start at line 2724 and ends at 2735. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [2724.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
calcRamaEnergy
def calcRamaEnergy(phi,psi,Coeff=[]):'''Computes pseudo potential energy from a pair of torsion angles and anumerical description of the potential energy surface. Used to createpenalty function in LS refinement::math:`Eval(\\phi,\\psi) = C[0]*exp(-V/1000)`where :math:`V = -C[3] * (\\phi-C[1])^2 - C[4]*(\\psi-C[2])^2 - ...
2
17
3
202
7
2,737
2,768
2,737
null
['pMax', 'dPsi', 'Eval', 'dPhi', 'val', 'cof', 'sum']
None
null
0
0
0
null
0
null
The function (calcRamaEnergy) defined within the public class called public.The function start at line 2737 and ends at 2768. It contains 17 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [2737.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getRamaDeriv
def getRamaDeriv(XYZ,Amat,Coeff):'''Computes numerical derivatives of torsion angle pair pseudo potentialwith respect of crystallographic atom coordinates of the 5 atom sequence:param nparray XYZ: crystallographic coordinates of 5 atoms:param nparray Amat: crystal to cartesian transformation matrix:param list Coeff: ps...
3
14
3
168
2
2,770
2,794
2,770
null
['dx', 'deriv']
None
null
0
0
0
null
0
null
The function (getRamaDeriv) defined within the public class called public.The function start at line 2770 and ends at 2794. It contains 14 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [2770.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getRestPolefig
def getRestPolefig(ODFln,SamSym,Grid):'''default doc string:param type name: description:returns: type name: description'''X,Y = np.meshgrid(np.linspace(1.,-1.,Grid),np.linspace(-1.,1.,Grid))R,P = np.sqrt(X**2+Y**2).flatten(),atan2d(Y,X).flatten()R = np.where(R <= 1.,2.*atand(R),0.0)Z = np.zeros_like(R)Z = G2lat.polfca...
1
8
3
164
2
2,796
2,810
2,796
null
['Z', 'R']
None
null
0
0
0
null
0
null
The function (getRestPolefig) defined within the public class called public.The function start at line 2796 and ends at 2810. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [2796.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getRestPolefigDerv
def getRestPolefigDerv(HKL,Grid,SHCoeff):'''default doc string:param type name: description:returns: type name: description'''pass
1
2
3
11
0
2,812
2,820
2,812
null
[]
None
null
0
0
0
null
0
null
The function (getRestPolefigDerv) defined within the public class called public.The function start at line 2812 and ends at 2820. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [2812.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getDistDerv.calcDist
def calcDist(Ox,Tx,U,inv,C,M,T,Amat):TxT = inv*(np.inner(M,Tx)+T)+C+Ureturn np.sqrt(np.sum(np.inner(Amat,(TxT-Ox))**2))
1
3
8
64
0
2,836
2,838
2,836
null
[]
None
null
0
0
0
null
0
null
The function (getDistDerv.calcDist) defined within the public class called public.The function start at line 2836 and ends at 2838. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 8 parameters, represented as [2836.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getDistDerv
def getDistDerv(Oxyz,Txyz,Amat,Tunit,Top,SGData):'''computes the numerical derivative of the distance between two atoms.Used in :func:`CalcDistDeriv` (seq. table) and in:func:`GSASIIstrMain.RetDistAngle` to compute the s.u. on the distance:param list Oxyz: list of x, y, & z values for the Origin atom:param list Txyz: l...
2
21
6
238
8
2,822
2,858
2,822
null
['deriv', 'op', 'd0', 'dx', 'TxT', 'cent', 'C', 'inv']
None
null
0
0
0
null
0
null
The function (getDistDerv) defined within the public class called public.The function start at line 2822 and ends at 2858. It contains 21 lines of code and it has a cyclomatic complexity of 2. It takes 6 parameters, represented as [2822.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
setupRBDistDerv.extendChanges
def extendChanges(prms):'''Propagate changes due to constraint and rigid bodiesfrom varied parameters to dependent parameters'''# apply constraintsG2mv.Dict2Map(prms)# apply rigid body constraintsG2stMth.ApplyRBModels(prms,Phases,RBData)# apply shifts to atomsfor dk in prms:if not '::dA' in dk: continueif prms[dk] == 0...
4
9
1
68
0
2,876
2,890
2,876
null
[]
None
null
0
0
0
null
0
null
The function (setupRBDistDerv.extendChanges) defined within the public class called public.The function start at line 2876 and ends at 2890. It contains 9 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
setupRBDistDerv
def setupRBDistDerv(parmDict,varyList,sigList,rigidbodyDict,Phases):'''Compute a copy of the parameter dict (parmDict) with each variedparameter incremented by 1 s.u. value and with those values extended toother parameters due to rigid bodies or constraints. This gets calledonce to prepare for s.u. computations in func...
8
24
5
169
4
2,860
2,910
2,860
null
['multiParmDict', 'RBData', 'k', 'changedParmDict']
None
null
0
0
0
null
0
null
The function (setupRBDistDerv) defined within the public class called public.The function start at line 2860 and ends at 2910. It contains 24 lines of code and it has a cyclomatic complexity of 8. It takes 5 parameters, represented as [2860.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getRBDistDerv.calcDist
def calcDist(Ox,Tx,U,inv,C,M,T,Amat):TxT = inv*(np.inner(M,Tx)+T)+C+Ureturn np.sqrt(np.sum(np.inner(Amat,(TxT-Ox))**2))
1
3
8
64
0
2,938
2,940
2,938
null
[]
None
null
0
0
0
null
0
null
The function (getRBDistDerv.calcDist) defined within the public class called public.The function start at line 2938 and ends at 2940. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 8 parameters, represented as [2938.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getRBDistDerv
def getRBDistDerv(OdxyzNames,TdxyzNames,Amat,Tunit,Top,SGData,multiParmDict,changedParmDict,varyList,sigList):'''computes the numerical derivative of the distance between twoatoms. Used where one or both is in a rigid body.Used in :func:`GSASIIstrMain.RetDistAngle` to compute the s.u. onthe distance:param list OxyzName...
13
22
10
276
11
2,912
2,963
2,912
null
['Oxyz', 'deriv', 'op', 'd0', 'TxT', 'OxyzNames', 'TxyzNames', 'cent', 'Txyz', 'C', 'inv']
None
null
0
0
0
null
0
null
The function (getRBDistDerv) defined within the public class called public.The function start at line 2912 and ends at 2963. It contains 22 lines of code and it has a cyclomatic complexity of 13. It takes 10 parameters, represented as [2912.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getAngleDerv.calcAngle
def calcAngle(Oxyz,ABxyz,Amat,Tunit,symNo,SGData):vec = np.zeros((2,3))for i in range(2):inv = 1if symNo[i] < 0:inv = -1cen = inv*symNo[i]//100op = inv*symNo[i]%100-1M,T = SGData['SGOps'][op]D = T*inv+SGData['SGCen'][cen]D += Tunit[i]ABxyz[i] = np.inner(M*inv,ABxyz[i])+Dvec[i] = np.inner(Amat,(ABxyz[i]-Oxyz))dist = np....
4
18
6
191
0
2,969
2,986
2,969
null
[]
None
null
0
0
0
null
0
null
The function (getAngleDerv.calcAngle) defined within the public class called public.The function start at line 2969 and ends at 2986. It contains 18 lines of code and it has a cyclomatic complexity of 4. It takes 6 parameters, represented as [2969.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getAngleDerv
def getAngleDerv(Oxyz,Axyz,Bxyz,Amat,Tunit,symNo,SGData):'''computes the numerical derivative of the angle between two vectors(generated from pairs of atoms) used here in :func:`getAngSig`.'''def calcAngle(Oxyz,ABxyz,Amat,Tunit,symNo,SGData):vec = np.zeros((2,3))for i in range(2):inv = 1if symNo[i] < 0:inv = -1cen = in...
2
21
7
271
9
2,965
3,006
2,965
null
['dist', 'cen', 'op', 'deriv', 'a0', 'dx', 'inv', 'D', 'vec']
None
null
0
0
0
null
0
null
The function (getAngleDerv) defined within the public class called public.The function start at line 2965 and ends at 3006. It contains 21 lines of code and it has a cyclomatic complexity of 2. It takes 7 parameters, represented as [2965.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getAngSig.calcVec
def calcVec(Ox,Tx,U,inv,C,M,T,Amat):TxT = inv*(np.inner(M,Tx)+T)+C+Ureturn np.inner(Amat,(TxT-Ox))
1
3
8
52
0
3,022
3,024
3,022
null
[]
None
null
0
0
0
null
0
null
The function (getAngSig.calcVec) defined within the public class called public.The function start at line 3022 and ends at 3024. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 8 parameters, represented as [3022.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getAngSig.calcAngle
def calcAngle(Ox,TxA,TxB,unitA,unitB,invA,CA,MA,TA,invB,CB,MB,TB,Amat):VecA = calcVec(Ox,TxA,unitA,invA,CA,MA,TA,Amat)VecA /= np.sqrt(np.sum(VecA**2))VecB = calcVec(Ox,TxB,unitB,invB,CB,MB,TB,Amat)VecB /= np.sqrt(np.sum(VecB**2))edge = VecB-VecAedge = np.sum(edge**2)angle = (2.-edge)/2.angle = max(angle,-1.)return acos...
1
10
14
144
0
3,026
3,035
3,026
null
[]
None
null
0
0
0
null
0
null
The function (getAngSig.calcAngle) defined within the public class called public.The function start at line 3026 and ends at 3035. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 14 parameters, represented as [3026.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getAngSig
def getAngSig(VA,VB,Amat,SGData,covData={}):'''Compute an interatomic angle and its uncertainty from two vectorseach between an orgin atom and either of a pair of nearby atoms.:param np.array VA: an interatomic vector as a structure:param np.array VB: an interatomic vector also as a structure:param np.array Amat: unit ...
4
45
5
590
21
3,008
3,081
3,008
null
['invB', 'angle', 'a0', 'covMatrix', 'sigAng', 'opA', 'edge', 'centB', 'dadx', 'Ang', 'CA', 'varyList', 'AngVcov', 'VecA', 'CB', 'invA', 'dx', 'TxT', 'VecB', 'opB', 'centA']
None
null
0
0
0
null
0
null
The function (getAngSig) defined within the public class called public.The function start at line 3008 and ends at 3081. It contains 45 lines of code and it has a cyclomatic complexity of 4. It takes 5 parameters, represented as [3008.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getRBAngSig.calcVec
def calcVec(Ox,Tx,U,inv,C,M,T,Amat):TxT = inv*(np.inner(M,Tx)+T)+C+Ureturn np.inner(Amat,(TxT-Ox))
1
3
8
52
0
3,099
3,101
3,099
null
[]
None
null
0
0
0
null
0
null
The function (getRBAngSig.calcVec) defined within the public class called public.The function start at line 3099 and ends at 3101. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 8 parameters, represented as [3099.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getRBAngSig.calcAngle
def calcAngle(Ox,TxA,TxB,unitA,unitB,invA,CA,MA,TA,invB,CB,MB,TB,Amat):VecA = calcVec(Ox,TxA,unitA,invA,CA,MA,TA,Amat)VecA /= np.sqrt(np.sum(VecA**2))VecB = calcVec(Ox,TxB,unitB,invB,CB,MB,TB,Amat)VecB /= np.sqrt(np.sum(VecB**2))edge = VecB-VecAedge = np.sum(edge**2)angle = (2.-edge)/2.angle = max(angle,-1.)return acos...
1
10
14
144
0
3,103
3,112
3,103
null
[]
None
null
0
0
0
null
0
null
The function (getRBAngSig.calcAngle) defined within the public class called public.The function start at line 3103 and ends at 3112. It contains 10 lines of code and it has a cyclomatic complexity of 1. It takes 14 parameters, represented as [3103.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getRBAngSig
def getRBAngSig(VA,VB,Amat,SGData,covData,multiParmDict,changedParmDict):'''Compute an interatomic angle and its uncertainty from two vectorseach between an orgin atom and either of a pair of nearby atoms.Uncertainties are computed taling into account rigid bodies andconstraints.:param np.array VA: an interatomic vecto...
14
36
7
423
26
3,083
3,147
3,083
null
['invB', 'deriv', 'sigList', 'TxA', 'angle', 'OxA', 'covMatrix', 'sigAng', 'TxAN', 'opA', 'edge', 'centB', 'Ang', 'CA', 'TxBN', 'OxAN', 'varyList', 'VecA', 'CB', 'TxB', 'invA', 'Ang0', 'TxT', 'VecB', 'opB', 'centA']
None
null
0
0
0
null
0
null
The function (getRBAngSig) defined within the public class called public.The function start at line 3083 and ends at 3147. It contains 36 lines of code and it has a cyclomatic complexity of 14. It takes 7 parameters, represented as [3083.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetDistSig.calcDist
def calcDist(Atoms,SyOps,Amat):XYZ = []for i,atom in enumerate(Atoms):Inv,M,T,C,U = SyOps[i]XYZ.append(np.array(atom[1:4]))XYZ[-1] = Inv*(np.inner(M,np.array(XYZ[-1]))+T)+C+UXYZ[-1] = np.inner(Amat,XYZ[-1]).TV1 = XYZ[1]-XYZ[0]return np.sqrt(np.sum(V1**2))
2
9
3
131
0
3,157
3,165
3,157
null
[]
None
null
0
0
0
null
0
null
The function (GetDistSig.calcDist) defined within the public class called public.The function start at line 3157 and ends at 3165. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [3157.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetDistSig
def GetDistSig(Oatoms,Atoms,Amat,SGData,covData={}):'''not used:param type name: description:returns: type name: description'''def calcDist(Atoms,SyOps,Amat):XYZ = []for i,atom in enumerate(Atoms):Inv,M,T,C,U = SyOps[i]XYZ.append(np.array(atom[1:4]))XYZ[-1] = Inv*(np.inner(M,np.array(XYZ[-1]))+T)+C+UXYZ[-1] = np.inner(...
5
30
5
275
16
3,149
3,196
3,149
null
['Dist', 'V1', 'a0', 'covMatrix', 'varyList', 'dx', 'ix', 'names', 'sig', 'c', 'XYZ', 'SyOps', 'dadx', 'inv', 'ia', 'DistVcov']
None
null
0
0
0
null
0
null
The function (GetDistSig) defined within the public class called public.The function start at line 3149 and ends at 3196. It contains 30 lines of code and it has a cyclomatic complexity of 5. It takes 5 parameters, represented as [3149.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetAngleSig.calcAngle
def calcAngle(Atoms,SyOps,Amat):XYZ = []for i,atom in enumerate(Atoms):Inv,M,T,C,U = SyOps[i]XYZ.append(np.array(atom[1:4]))XYZ[-1] = Inv*(np.inner(M,np.array(XYZ[-1]))+T)+C+UXYZ[-1] = np.inner(Amat,XYZ[-1]).TV1 = XYZ[1]-XYZ[0]V1 /= np.sqrt(np.sum(V1**2))V2 = XYZ[1]-XYZ[2]V2 /= np.sqrt(np.sum(V2**2))V3 = V2-V1cang = mi...
2
14
3
201
0
3,207
3,220
3,207
null
[]
None
null
0
0
0
null
0
null
The function (GetAngleSig.calcAngle) defined within the public class called public.The function start at line 3207 and ends at 3220. It contains 14 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [3207.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetAngleSig
def GetAngleSig(Oatoms,Atoms,Amat,SGData,covData={}):'''Not used:param type name: description:returns: type name: description'''def calcAngle(Atoms,SyOps,Amat):XYZ = []for i,atom in enumerate(Atoms):Inv,M,T,C,U = SyOps[i]XYZ.append(np.array(atom[1:4]))XYZ[-1] = Inv*(np.inner(M,np.array(XYZ[-1]))+T)+C+UXYZ[-1] = np.inne...
5
30
5
275
19
3,198
3,251
3,198
null
['names', 'XYZ', 'inv', 'a0', 'covMatrix', 'V3', 'ix', 'dadx', 'varyList', 'AngVcov', 'V2', 'V1', 'cang', 'dx', 'sig', 'c', 'SyOps', 'Angle', 'ia']
None
null
0
0
0
null
0
null
The function (GetAngleSig) defined within the public class called public.The function start at line 3198 and ends at 3251. It contains 30 lines of code and it has a cyclomatic complexity of 5. It takes 5 parameters, represented as [3198.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetTorsionSig.calcTorsion
def calcTorsion(Atoms,SyOps,Amat):XYZ = []for i,atom in enumerate(Atoms):Inv,M,T,C,U = SyOps[i]XYZ.append(np.array(atom[1:4]))XYZ[-1] = Inv*(np.inner(M,np.array(XYZ[-1]))+T)+C+UXYZ[-1] = np.inner(Amat,XYZ[-1]).TV1 = XYZ[1]-XYZ[0]V2 = XYZ[2]-XYZ[1]V3 = XYZ[3]-XYZ[2]V1 /= np.sqrt(np.sum(V1**2))V2 /= np.sqrt(np.sum(V2**2)...
2
20
3
286
0
3,262
3,282
3,262
null
[]
None
null
0
0
0
null
0
null
The function (GetTorsionSig.calcTorsion) defined within the public class called public.The function start at line 3262 and ends at 3282. It contains 20 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [3262.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetTorsionSig
def GetTorsionSig(Oatoms,Atoms,Amat,SGData,covData={}):'''default doc string:param type name: description:returns: type name: description'''def calcTorsion(Atoms,SyOps,Amat):XYZ = []for i,atom in enumerate(Atoms):Inv,M,T,C,U = SyOps[i]XYZ.append(np.array(atom[1:4]))XYZ[-1] = Inv*(np.inner(M,np.array(XYZ[-1]))+T)+C+UXYZ...
5
31
5
286
23
3,253
3,314
3,253
null
['names', 'P23', 'XYZ', 'Tors', 'inv', 'a0', 'covMatrix', 'V3', 'ix', 'P12', 'M', 'dadx', 'D', 'P13', 'varyList', 'V2', 'V1', 'dx', 'sig', 'c', 'TorVcov', 'SyOps', 'ia']
None
null
0
0
0
null
0
null
The function (GetTorsionSig) defined within the public class called public.The function start at line 3253 and ends at 3314. It contains 31 lines of code and it has a cyclomatic complexity of 5. It takes 5 parameters, represented as [3253.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetDATSig.calcDist
def calcDist(Atoms,SyOps,Amat):XYZ = []for i,atom in enumerate(Atoms):Inv,M,T,C,U = SyOps[i]XYZ.append(np.array(atom[1:4]))XYZ[-1] = Inv*(np.inner(M,np.array(XYZ[-1]))+T)+C+UXYZ[-1] = np.inner(Amat,XYZ[-1]).TV1 = XYZ[1]-XYZ[0]return np.sqrt(np.sum(V1**2))
2
9
3
131
0
3,325
3,333
3,325
null
[]
None
null
0
0
0
null
0
null
The function (GetDATSig.calcDist) defined within the public class called public.The function start at line 3325 and ends at 3333. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [3325.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetDATSig.calcAngle
def calcAngle(Atoms,SyOps,Amat):XYZ = []for i,atom in enumerate(Atoms):Inv,M,T,C,U = SyOps[i]XYZ.append(np.array(atom[1:4]))XYZ[-1] = Inv*(np.inner(M,np.array(XYZ[-1]))+T)+C+UXYZ[-1] = np.inner(Amat,XYZ[-1]).TV1 = XYZ[1]-XYZ[0]V1 /= np.sqrt(np.sum(V1**2))V2 = XYZ[1]-XYZ[2]V2 /= np.sqrt(np.sum(V2**2))V3 = V2-V1cang = mi...
2
14
3
201
0
3,335
3,348
3,335
null
[]
None
null
0
0
0
null
0
null
The function (GetDATSig.calcAngle) defined within the public class called public.The function start at line 3335 and ends at 3348. It contains 14 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [3335.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetDATSig.calcTorsion
def calcTorsion(Atoms,SyOps,Amat):XYZ = []for i,atom in enumerate(Atoms):Inv,M,T,C,U = SyOps[i]XYZ.append(np.array(atom[1:4]))XYZ[-1] = Inv*(np.inner(M,np.array(XYZ[-1]))+T)+C+UXYZ[-1] = np.inner(Amat,XYZ[-1]).TV1 = XYZ[1]-XYZ[0]V2 = XYZ[2]-XYZ[1]V3 = XYZ[3]-XYZ[2]V1 /= np.sqrt(np.sum(V1**2))V2 /= np.sqrt(np.sum(V2**2)...
2
20
3
286
0
3,350
3,370
3,350
null
[]
None
null
0
0
0
null
0
null
The function (GetDATSig.calcTorsion) defined within the public class called public.The function start at line 3350 and ends at 3370. It contains 20 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [3350.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetDATSig
def GetDATSig(Oatoms,Atoms,Amat,SGData,covData={}):'''default doc string:param type name: description:returns: type name: description'''def calcDist(Atoms,SyOps,Amat):XYZ = []for i,atom in enumerate(Atoms):Inv,M,T,C,U = SyOps[i]XYZ.append(np.array(atom[1:4]))XYZ[-1] = Inv*(np.inner(M,np.array(XYZ[-1]))+T)+C+UXYZ[-1] = ...
11
50
5
439
27
3,316
3,419
3,316
null
['names', 'P23', 'XYZ', 'Tors', 'N', 'inv', 'a0', 'covMatrix', 'V3', 'ix', 'P12', 'M', 'dadx', 'D', 'P13', 'varyList', 'Val', 'V2', 'sigVals', 'Vcov', 'V1', 'cang', 'dx', 'sig', 'c', 'SyOps', 'ia']
None
null
0
0
0
null
0
null
The function (GetDATSig) defined within the public class called public.The function start at line 3316 and ends at 3419. It contains 50 lines of code and it has a cyclomatic complexity of 11. It takes 5 parameters, represented as [3316.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetMag
def GetMag(mag,Cell):'''Compute magnetic moment magnitude.:param list mag: atom magnetic moment parms (must be magnetic!):param list Cell: lattice parameters:returns: moment magnitude as float'''G = G2lat.fillgmat(Cell)ast = np.sqrt(np.diag(G))GS = G/np.outer(ast,ast)mag = np.array(mag)Mag = np.sqrt(np.inner(mag,np.inn...
1
7
2
73
5
3,421
3,435
3,421
null
['GS', 'Mag', 'G', 'ast', 'mag']
None
null
0
0
0
null
0
null
The function (GetMag) defined within the public class called public.The function start at line 3421 and ends at 3435. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [3421.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetMagDerv.getMag
def getMag(m):return np.sqrt(np.inner(m,np.inner(m,GS)))
1
2
1
26
0
3,446
3,447
3,446
null
[]
None
null
0
0
0
null
0
null
The function (GetMagDerv.getMag) defined within the public class called public.The function start at line 3446 and ends at 3447. 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
GetMagDerv
def GetMagDerv(mag,Cell):'''Compute magnetic moment derivatives numerically:param list mag: atom magnetic moment parms (must be magnetic!):param list Cell: lattice parameters:returns: moment derivatives as floats'''def getMag(m):return np.sqrt(np.inner(m,np.inner(m,GS)))derv = np.zeros(3)dm = 0.0001twodm = 2.*dmG = G2l...
2
16
2
124
8
3,437
3,462
3,437
null
['Magp', 'twodm', 'GS', 'dm', 'G', 'ast', 'mag', 'derv']
None
null
0
0
0
null
0
null
The function (GetMagDerv) defined within the public class called public.The function start at line 3437 and ends at 3462. It contains 16 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [3437.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
searchBondRestr
def searchBondRestr(origAtoms,targAtoms,bond,Factor,GType,SGData,Amat,defESD=0.01,dlg=None):'''Search for bond distance restraints.'''foundBonds = []indices = (-2,-1,0,1,2)Units = np.array([[h,k,l] for h in indices for k in indices for l in indices])Norig = 0for Oid,Otype,Ocoord in origAtoms:Norig += 1if dlg: dlg.Updat...
13
29
9
329
11
3,464
3,494
3,464
null
['dist', 'Topstr', 'Units', 'Dx', 'unit', 'IndB', 'dx', 'indices', 'Norig', 'result', 'foundBonds']
None
null
0
0
0
null
0
null
The function (searchBondRestr) defined within the public class called public.The function start at line 3464 and ends at 3494. It contains 29 lines of code and it has a cyclomatic complexity of 13. It takes 9 parameters, represented as [3464.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ValEsd
def ValEsd(value,esd=0,nTZ=False):'''Format a floating point number with a given level of precision orwith in crystallographic format with a "esd", as value(esd). If esd isnegative the number is formatted with the level of significant figuresappropriate if abs(esd) were the esd, but the esd is not included.if the esd i...
20
45
3
390
8
3,496
3,571
3,496
null
['esdoff', 'out', 'l', 'intesd', 'extra', 'valoff', 'esd', 'cutoff']
None
null
0
0
0
null
0
null
The function (ValEsd) defined within the public class called public.The function start at line 3496 and ends at 3571. It contains 45 lines of code and it has a cyclomatic complexity of 20. It takes 3 parameters, represented as [3496.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
validProtein.sumintact
def sumintact(intact):return {'CC':intact['CC'],'NN':intact['NN'],'OO':intact['OO'],'CN':(intact['CN']+intact['NC']),'CO':(intact['CO']+intact['OC']),'NO':(intact['NO']+intact['ON'])}
1
4
1
70
0
3,579
3,582
3,579
null
[]
None
null
0
0
0
null
0
null
The function (validProtein.sumintact) defined within the public class called public.The function start at line 3579 and ends at 3582. 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
validProtein
def validProtein(Phase,old):def sumintact(intact):return {'CC':intact['CC'],'NN':intact['NN'],'OO':intact['OO'],'CN':(intact['CN']+intact['NC']),'CO':(intact['CO']+intact['OC']),'NO':(intact['NO']+intact['ON'])}resNames = ['ALA','ARG','ASN','ASP','CYS','GLN','GLU','GLY','HIS','ILE','LEU','LYS','MET','PHE','PRO','SER','...
63
167
2
2,213
42
3,577
3,754
3,577
null
['res', 'avg_old', 'jntact', 'IntAct', 'resID', 'XYZ', 'intact', 'Boxes', 'dsqt', 'Units', 'dsmax', 'prob', 'resname', 'xyzmin', 'summ', 'jbox', 'nbox', 'Probs', 'ibox', 'tgts', 'resIDs', 'Atoms', 'chainIntAct', 'name', 'b1_old', 'chainProb', 'ires', 'intype', 'newChain', 'nRes', 'resNames', 'xyzmax', 'mtrx', 'indices'...
None
null
0
0
0
null
0
null
The function (validProtein) defined within the public class called public.The function start at line 3577 and ends at 3754. It contains 167 lines of code and it has a cyclomatic complexity of 63. It takes 2 parameters, represented as [3577.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FitTexture.printSpHarm
def printSpHarm(textureData,SHtextureSig):Tindx = 1.0Tvar = 0.0print ('\n Spherical harmonics texture: Order:' + str(textureData['Order']))names = ['omega','chi','phi']namstr = 'names :'ptstr ='values:'sigstr = 'esds:'for name in names:namstr += '%12s'%('Sample '+name)ptstr += '%12.3f'%(textureData['Sample '+name][1])i...
7
46
2
326
0
3,768
3,813
3,768
null
[]
None
null
0
0
0
null
0
null
The function (FitTexture.printSpHarm) defined within the public class called public.The function start at line 3768 and ends at 3813. It contains 46 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [3768.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FitTexture.Dict2Values
def Dict2Values(parmdict, varylist):'''Use before call to leastsq to setup list of values for the parametersin parmdict, as selected by key in varylist'''return [parmdict[key] for key in varylist]
2
2
2
19
0
3,815
3,818
3,815
null
[]
None
null
0
0
0
null
0
null
The function (FitTexture.Dict2Values) defined within the public class called public.The function start at line 3815 and ends at 3818. It contains 2 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [3815.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FitTexture.Values2Dict
def Values2Dict(parmdict, varylist, values):''' Use after call to leastsq to update the parameter dictionary withvalues corresponding to keys in varylist'''parmdict.update(list(zip(varylist,values)))
1
2
3
24
0
3,820
3,823
3,820
null
[]
None
null
0
0
0
null
0
null
The function (FitTexture.Values2Dict) defined within the public class called public.The function start at line 3820 and ends at 3823. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [3820.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FitTexture.errSpHarm
def errSpHarm(values,SGData,cell,Gangls,shModel,refData,parmDict,varyList,pgbar):parmDict.update(list(zip(varyList,values)))Mat = np.empty(0)sumObs = 0Sangls = [parmDict['Sample '+'omega'],parmDict['Sample '+'chi'],parmDict['Sample '+'phi']]for hist in Gangls.keys():Refs = refData[hist]Refs[:,5] = np.where(Refs[:,5]>0....
4
29
9
397
0
3,825
3,854
3,825
null
[]
None
null
0
0
0
null
0
null
The function (FitTexture.errSpHarm) defined within the public class called public.The function start at line 3825 and ends at 3854. It contains 29 lines of code and it has a cyclomatic complexity of 4. It takes 9 parameters, represented as [3825.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
FitTexture.dervSpHarm
def dervSpHarm(values,SGData,cell,Gangls,shModel,refData,parmDict,varyList,pgbar):Mat = np.empty(0)Sangls = [parmDict['Sample omega'],parmDict['Sample chi'],parmDict['Sample phi']]for hist in Gangls.keys():mat = np.zeros((len(varyList),len(refData[hist])))Refs = refData[hist]H = Refs[:,:3]wt = 1./np.sqrt(np.fmax(Refs[:...
7
29
9
345
0
3,856
3,885
3,856
null
[]
None
null
0
0
0
null
0
null
The function (FitTexture.dervSpHarm) defined within the public class called public.The function start at line 3856 and ends at 3885. It contains 29 lines of code and it has a cyclomatic complexity of 7. It takes 9 parameters, represented as [3856.0] and does not return any value..