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
Absorb
def Absorb(Geometry,MuR,Tth,Phi=0,Psi=0):'''Calculate sample absorption:param str Geometry: one of 'Cylinder','Bragg-Brentano','Tilting Flat Plate in transmission','Fixed flat plate':param float MuR: absorption coeff * sample thickness/2 or radius:param Tth: 2-theta scattering angle - can be numpy array:param float Phi...
7
26
5
224
12
155
208
155
null
['Tb', 'T0', 'cth', 'T4', 'Trns', 'T1', 'T3', 'AbsCr', 'MuT', 'Sth2', 'MuRSTh2', 'T2']
None
null
0
0
0
null
0
null
The function (Absorb) defined within the public class called public.The function start at line 155 and ends at 208. It contains 26 lines of code and it has a cyclomatic complexity of 7. It takes 5 parameters, represented as [155.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
AbsorbDerv
def AbsorbDerv(Geometry,MuR,Tth,Phi=0,Psi=0):'needs a doc string'dA = 0.001AbsP = Absorb(Geometry,MuR+dA,Tth,Phi,Psi)if MuR:AbsM = Absorb(Geometry,MuR-dA,Tth,Phi,Psi)return (AbsP-AbsM)/(2.0*dA)else:return (AbsP-1.)/dA
2
9
5
83
3
210
218
210
null
['AbsP', 'AbsM', 'dA']
None
null
0
0
0
null
0
null
The function (AbsorbDerv) defined within the public class called public.The function start at line 210 and ends at 218. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 5 parameters, represented as [210.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Polarization
def Polarization(Pola,Tth,Azm=0.0):""" Calculate angle dependent x-ray polarization correction (not scaled correctly!):param Pola: polarization coefficient e.g 1.0 fully polarized, 0.5 unpolarized:param Azm: azimuthal angle e.g. 0.0 in plane of polarization - can be numpy array:param Tth: 2-theta scattering angle - can...
1
6
3
87
4
220
237
220
null
['dpdPola', 'sazm', 'pola', 'cazm']
None
null
0
0
0
null
0
null
The function (Polarization) defined within the public class called public.The function start at line 220 and ends at 237. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [220.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Oblique
def Oblique(ObCoeff,Tth):'currently assumes detector is normal to beam'if ObCoeff:K = (1.-ObCoeff)/(1.0-np.exp(np.log(ObCoeff)/npcosd(Tth)))return Kelse:return 1.0
2
7
2
50
1
239
245
239
null
['K']
None
null
0
0
0
null
0
null
The function (Oblique) defined within the public class called public.The function start at line 239 and ends at 245. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [239.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Ruland
def Ruland(RulCoff,wave,Q,Compton):'needs a doc string'C = 2.9978e8D = 1.5e-3hmc = 0.024262734687#Compton wavelength in Asinth2 = (Q*wave/(4.0*np.pi))**2dlam = (wave**2)*Compton*Q/Cdlam_c = 2.0*hmc*sinth2-D*wave**2return 1.0/((1.0+dlam/RulCoff)*(1.0+(np.pi*dlam_c/(dlam+RulCoff))**2))
1
9
4
114
6
247
255
247
null
['dlam', 'sinth2', 'hmc', 'C', 'dlam_c', 'D']
None
null
0
0
0
null
0
null
The function (Ruland) defined within the public class called public.The function start at line 247 and ends at 255. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [247.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
KleinNishina
def KleinNishina(wave,Q):hmc = 0.024262734687#Compton wavelength in ATTh = npq2T(Q,wave)P = 1./(1.+(1.-npcosd(TTh)*(hmc/wave)))KN = (P**3-(P*npsind(TTh))**2+P)/(1.+npcosd(TTh)**2)return KN
1
6
2
79
4
257
262
257
null
['P', 'KN', 'TTh', 'hmc']
None
null
0
0
0
null
0
null
The function (KleinNishina) defined within the public class called public.The function start at line 257 and ends at 262. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [257.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
LorchWeight
def LorchWeight(Q):'needs a doc string'return np.sin(np.pi*(Q[-1]-Q)/(2.0*Q[-1]))
1
3
1
37
0
264
266
264
null
[]
None
null
0
0
0
null
0
null
The function (LorchWeight) defined within the public class called public.The function start at line 264 and ends at 266. 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
GetAsfMean
def GetAsfMean(ElList,Sthl2):'''Calculate various scattering factor terms for PDF calcs:param dict ElList: element dictionary contains scattering factor coefficients, etc.:param np.array Sthl2: numpy array of sin theta/lambda squared values:returns: mean(f^2), mean(f)^2, mean(compton)'''sumNoAtoms = 0.0FF = np.zeros_li...
3
15
2
141
7
268
288
268
null
['el', 'FF', 'FF2', 'sumNoAtoms', 'ff2', 'CF', 'cf']
None
null
0
0
0
null
0
null
The function (GetAsfMean) defined within the public class called public.The function start at line 268 and ends at 288. It contains 15 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [268.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetNumDensity
def GetNumDensity(ElList,Vol):'needs a doc string'sumNoAtoms = 0.0for El in ElList:sumNoAtoms += ElList[El]['FormulaNo']return sumNoAtoms/Vol
2
6
2
31
1
290
295
290
null
['sumNoAtoms']
None
null
0
0
0
null
0
null
The function (GetNumDensity) defined within the public class called public.The function start at line 290 and ends at 295. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [290.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
CalcPDF
def CalcPDF(data,inst,limits,xydata):'''Computes I(Q), S(Q) & G(r) from Sample, Bkg, etc. diffraction patterns loaded intodict xydata; results are placed in xydata.Calculation parameters are found in dicts data and inst and list limits.The return value is at present an empty list.'''auxPlot = []if 'T' in inst['Type'][0...
24
131
4
1,917
41
297
451
297
null
['Abs', 'XY', 'GR', 'Rmax', 'wave', 'qLimits', 'Els', 'FFSq', 'newdata', 'IofQ', 'minQ', 'Ifin', 'R', 'Rmin', 'nR', 'scale', 'nQpoints', 'gr', 'ruland', 'Qpoints', 'Ibeg', 'interpF', 'Qdata', 'difC', 'Q', 'mul', 'CF', 'SqFF', 'BLtables', 'dq', 'maxQ', 'Tth', 'numbDen', 'MuR', 'auxPlot', 'BL', 'GD', 'Isotope', 'ElList',...
None
null
0
0
0
null
0
null
The function (CalcPDF) defined within the public class called public.The function start at line 297 and ends at 451. It contains 131 lines of code and it has a cyclomatic complexity of 24. It takes 4 parameters, represented as [297.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PDFPeakFit.MakeParms
def MakeParms(peaks):varyList = []parmDict = {'slope':peaks['Background'][1][1]}if peaks['Background'][2]:varyList.append('slope')for i,peak in enumerate(peaks['Peaks']):parmDict['PDFpos;'+str(i)] = peak[0]parmDict['PDFmag;'+str(i)] = peak[1]parmDict['PDFsig;'+str(i)] = peak[2]if 'P' in peak[3]:varyList.append('PDFpos;...
6
16
1
156
0
456
471
456
null
[]
None
null
0
0
0
null
0
null
The function (PDFPeakFit.MakeParms) defined within the public class called public.The function start at line 456 and ends at 471. It contains 16 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
PDFPeakFit.SetParms
def SetParms(peaks,parmDict,varyList):if 'slope' in varyList:peaks['Background'][1][1] = parmDict['slope']for i,peak in enumerate(peaks['Peaks']):if 'PDFpos;'+str(i) in varyList:peak[0] = parmDict['PDFpos;'+str(i)]if 'PDFmag;'+str(i) in varyList:peak[1] = parmDict['PDFmag;'+str(i)]if 'PDFsig;'+str(i) in varyList:peak[2...
6
10
3
114
0
473
482
473
null
[]
None
null
0
0
0
null
0
null
The function (PDFPeakFit.SetParms) defined within the public class called public.The function start at line 473 and ends at 482. It contains 10 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [473.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PDFPeakFit.CalcPDFpeaks
def CalcPDFpeaks(parmdict,Xdata):Z = parmDict['slope']*Xdataipeak = 0while True:try:pos = parmdict['PDFpos;'+str(ipeak)]mag = parmdict['PDFmag;'+str(ipeak)]wid = parmdict['PDFsig;'+str(ipeak)]wid2 = 2.*wid**2Z += mag*rs2pi*np.exp(-(Xdata-pos)**2/wid2)/widipeak += 1except KeyError:#no more peaks to processreturn Z
3
13
2
95
0
485
497
485
null
[]
None
null
0
0
0
null
0
null
The function (PDFPeakFit.CalcPDFpeaks) defined within the public class called public.The function start at line 485 and ends at 497. It contains 13 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [485.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PDFPeakFit.errPDFProfile
def errPDFProfile(values,xdata,ydata,parmdict,varylist):parmdict.update(zip(varylist,values))M = CalcPDFpeaks(parmdict,xdata)-ydatareturn M
1
4
5
36
0
499
502
499
null
[]
None
null
0
0
0
null
0
null
The function (PDFPeakFit.errPDFProfile) defined within the public class called public.The function start at line 499 and ends at 502. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [499.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
PDFPeakFit
def PDFPeakFit(peaks,data):rs2pi = 1./np.sqrt(2*np.pi)def MakeParms(peaks):varyList = []parmDict = {'slope':peaks['Background'][1][1]}if peaks['Background'][2]:varyList.append('slope')for i,peak in enumerate(peaks['Peaks']):parmDict['PDFpos;'+str(i)] = peak[0]parmDict['PDFmag;'+str(i)] = peak[1]parmDict['PDFsig;'+str(i...
2
28
2
334
20
453
526
453
null
['iBeg', 'iFin', 'wid2', 'values', 'sigList', 'mag', 'Rvals', 'ipeak', 'M', 'Z', 'parmDict', 'varyList', 'rs2pi', 'result', 'chisq', 'pos', 'Y', 'wid', 'newpeaks', 'X']
None
null
0
0
0
null
0
null
The function (PDFPeakFit) defined within the public class called public.The function start at line 453 and ends at 526. It contains 28 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [453.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
MakeRDF
def MakeRDF(RDFcontrols,background,inst,pwddata):auxPlot = []if 'C' in inst['Type'][0] or 'B' in inst['Type'][0]:Tth = pwddata[0]wave = G2mth.getWave(inst)minQ = npT2q(Tth[0],wave)maxQ = npT2q(Tth[-1],wave)powQ = npT2q(Tth,wave)elif 'T' in inst['Type'][0]:TOF = pwddata[0]difC = inst['difC'][1]minQ = 2.*np.pi*difC/TOF[-...
8
36
4
529
18
528
565
528
null
['auto', 'Qpoints', 'difC', 'minQ', 'auxPlot', 'Qdata', 'R', 'piDQ', 'iFin', 'Qsmooth', 'powQ', 'nR', 'DofR', 'dq', 'wave', 'maxQ', 'Tth', 'TOF']
None
null
0
0
0
null
0
null
The function (MakeRDF) defined within the public class called public.The function start at line 528 and ends at 565. It contains 36 lines of code and it has a cyclomatic complexity of 8. It takes 4 parameters, represented as [528.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
OptimizePDF
def OptimizePDF(data,xydata,limits,inst,showFit=True,maxCycles=25):import scipy.optimize as optnumbDen = GetNumDensity(data['ElList'],data['Form Vol'])Min,Init,Done = SetupPDFEval(data,xydata,limits,inst,numbDen)xstart = Init()bakMul = data['Sample Bkg.']['Mult']if showFit:rms = Min(xstart)G2fil.G2Print('Optimizing cor...
7
34
6
376
6
568
602
568
null
['res', 'rms', 'xstart', 'bakMul', 'numbDen', 'msg']
None
null
0
0
0
null
0
null
The function (OptimizePDF) defined within the public class called public.The function start at line 568 and ends at 602. It contains 34 lines of code and it has a cyclomatic complexity of 7. It takes 6 parameters, represented as [568.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SetupPDFEval.EvalLowPDF
def EvalLowPDF(arg):'''Objective routine -- evaluates the RMS deviations in G(r)from -4(pi)*#density*r for for r<Rminarguments are ['Flat Bkg','BackRatio','Ruland'] scaled so thatthe min & max values are between 0 and 1.'''if Data['Sample Bkg.'].get('Refine',False):R,S = argData['Sample Bkg.']['Mult'] = Selse:F,B,R = a...
2
15
1
148
0
607
627
607
null
[]
None
null
0
0
0
null
0
null
The function (SetupPDFEval.EvalLowPDF) defined within the public class called public.The function start at line 607 and ends at 627. It contains 15 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
SetupPDFEval.GetCurrentVals
def GetCurrentVals():'''Get the current ['Flat Bkg','BackRatio','Ruland'] with scaling'''if data['Sample Bkg.'].get('Refine',False):return [max(data['Ruland'],.05),data['Sample']['Mult']]try:F = 0.5+0.5*data['Flat Bkg']/BkgMaxexcept:F = 0return [F,data['BackRatio'],max(data['Ruland'],.05)]
3
8
0
82
0
628
637
628
null
[]
None
null
0
0
0
null
0
null
The function (SetupPDFEval.GetCurrentVals) defined within the public class called public.The function start at line 628 and ends at 637. It contains 8 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
SetupPDFEval.SetFinalVals
def SetFinalVals(arg):'''Set the 'Flat Bkg', 'BackRatio' & 'Ruland' values from thescaled, refined values and plot corrected region of G(r)'''if data['Sample Bkg.'].get('Refine',False):R,S = argdata['Sample Bkg.']['Mult'] = Selse:F,B,R = argdata['Flat Bkg'] = BkgMax*(2.*F-1.)data['BackRatio'] = Bdata['Ruland'] = RCalcP...
2
10
1
80
0
638
650
638
null
[]
None
null
0
0
0
null
0
null
The function (SetupPDFEval.SetFinalVals) defined within the public class called public.The function start at line 638 and ends at 650. It contains 10 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
SetupPDFEval
def SetupPDFEval(data,xydata,limits,inst,numbDen):Data = copy.deepcopy(data)BkgMax = 1.def EvalLowPDF(arg):'''Objective routine -- evaluates the RMS deviations in G(r)from -4(pi)*#density*r for for r<Rminarguments are ['Flat Bkg','BackRatio','Ruland'] scaled so thatthe min & max values are between 0 and 1.'''if Data['S...
1
9
5
61
7
604
653
604
null
['g', 'r', 'g0', 'BkgMax', 'Data', 'F', 'M']
None
null
0
0
0
null
0
null
The function (SetupPDFEval) defined within the public class called public.The function start at line 604 and ends at 653. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [604.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
factorize
def factorize(num):''' Provide prime number factors for integer num:returns: dictionary of prime factors (keys) & power for each (data)'''factors = {}orig = num# we take advantage of the fact that (i +1)**2 = i**2 + 2*i +1i, sqi = 2, 4while sqi <= num:while not num%i:num /= ifactors[i] = factors.get(i, 0) + 1sqi += 2*i...
6
16
1
97
2
656
679
656
null
['orig', 'factors']
None
null
0
0
0
null
0
null
The function (factorize) defined within the public class called public.The function start at line 656 and ends at 679. It contains 16 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
makeFFTsizeList
def makeFFTsizeList(nmin=1,nmax=1023,thresh=15):''' Provide list of optimal data sizes for FFT calculations:param int nmin: minimum data size >= 1:param int nmax: maximum data size > nmin:param int thresh: maximum prime factor allowed:Returns: list of data sizes where the maximum prime factor is < thresh'''plist = []nm...
3
8
3
74
3
681
695
681
null
['nmin', 'nmax', 'plist']
None
null
0
0
0
null
0
null
The function (makeFFTsizeList) defined within the public class called public.The function start at line 681 and ends at 695. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [681.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
pdf
def pdf(self,x,*args,**kwds):loc,scale=kwds['loc'],kwds['scale']x = (x-loc)/scalereturn np.exp(-x**2/2.0) * _norm_pdf_C / scale
1
4
4
53
0
715
718
715
null
[]
None
null
0
0
0
null
0
null
The function (pdf) defined within the public class called public.The function start at line 715 and ends at 718. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [715.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
pdf
def pdf(self,x,*args,**kwds):loc,scale=kwds['loc'],kwds['scale']x = (x-loc)/scalereturn 1.0/np.pi/(1.0+x*x) / scale
1
4
4
55
0
735
738
735
null
[]
None
null
0
0
0
null
0
null
The function (pdf) defined within the public class called public.The function start at line 735 and ends at 738. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [735.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
_pdf
def _pdf(self,x,t,s,dx):T = dx*x+tax2 = abs(npcosd(T))ax = ax2**2bx = npcosd(t)**2bx = np.where(ax>bx,bx,ax)fx = np.where(ax>bx,(np.sqrt(bx/(ax-bx))-1./s)/ax2,0.0)fx = np.where(fx > 0.,fx,0.0)return fx
1
9
5
111
0
765
773
765
null
[]
None
null
0
0
0
null
0
null
The function (_pdf) defined within the public class called public.The function start at line 765 and ends at 773. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [765.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
pdf
def pdf(self,x,*args,**kwds):loc=kwds['loc']return self._pdf(x-loc,*args)
1
3
4
31
0
775
777
775
null
[]
None
null
0
0
0
null
0
null
The function (pdf) defined within the public class called public.The function start at line 775 and ends at 777. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [775.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getFCJVoigt
def getFCJVoigt(pos,intens,sig,gam,shl,xdata):'''Compute the Finger-Cox-Jepcoat modified Voigt function for aCW powder peak by direct convolution. This version is not used.'''DX = xdata[1]-xdata[0]widths,fmin,fmax = getWidthsCW(pos,sig,gam,shl)x = np.linspace(pos-fmin,pos+fmin,256)dx = x[1]-x[0]Norm = norm.pdf(x,loc=po...
2
20
6
280
10
781
803
781
null
['arg', 'Z', 'dx', 'Df', 'FCJ', 'x', 'Cauchy', 'Norm', 'DX', 'z']
None
null
0
0
0
null
0
null
The function (getFCJVoigt) defined within the public class called public.The function start at line 781 and ends at 803. It contains 20 lines of code and it has a cyclomatic complexity of 2. It takes 6 parameters, represented as [781.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getWidthsCW
def getWidthsCW(pos,sig,gam,shl):'''Compute the peak widths used for computing the range of a peakfor constant wavelength data. On low-angle side, 50 FWHM are used,on high-angle side 75 are used, low angle side extended for axial divergence(for peaks above 90 deg, these are reversed.):param pos: peak position; 2-theta ...
2
8
4
98
4
807
828
807
null
['fmin', 'fmax', 'fwhm', 'widths']
None
null
0
0
0
null
0
null
The function (getWidthsCW) defined within the public class called public.The function start at line 807 and ends at 828. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [807.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getWidthsED
def getWidthsED(pos,sig,gam):'''Compute the peak widths used for computing the range of a peakfor energy dispersive data. On low-energy side, 20 FWHM are used,on high-energy side 20 are used:param pos: peak position; energy in keV (not used):param sig: Gaussian peak variance in keV^2:param gam: Lorentzian peak width in...
1
6
3
55
4
830
846
830
null
['fmin', 'fmax', 'fwhm', 'widths']
None
null
0
0
0
null
0
null
The function (getWidthsED) defined within the public class called public.The function start at line 830 and ends at 846. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [830.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getWidthsTOF
def getWidthsTOF(pos,alp,bet,sig,gam):'''Compute the peak widths used for computing the range of a peakfor TOF data. 50 FWHM are used on both sides eachextended by exponential coeff.param pos: peak position; TOF in musec (not used)param alp,bet: TOF peak exponential rise & decay parametersparam sig: Gaussian peak varia...
1
6
5
82
4
848
865
848
null
['fmin', 'fmax', 'fwhm', 'widths']
None
null
0
0
0
null
0
null
The function (getWidthsTOF) defined within the public class called public.The function start at line 848 and ends at 865. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [848.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getWidthsCWA
def getWidthsCWA(pos,alp,bet,sig,gam,shl):'''Compute the peak widths used for computing the range of a peakfor constant wavelength data with axial divergence. 50 & 75 FWHM are used oneach side each extended by exponential coeff.:param pos: peak position; 2-theta in degrees:param alp,bet: TOF peak exponential rise & dec...
2
10
6
158
4
867
890
867
null
['fmin', 'fmax', 'fwhm', 'widths']
None
null
0
0
0
null
0
null
The function (getWidthsCWA) defined within the public class called public.The function start at line 867 and ends at 890. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 6 parameters, represented as [867.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getWidthsCWB
def getWidthsCWB(pos,alp,bet,sig,gam):'''Compute the peak widths used for computing the range of a peakfor constant wavelength data without axial divergence. 50 FWHM are used onboth sides each extended by exponential coeff.:param pos: peak position; 2-theta in degrees:param alp,bet: TOF peak exponential rise & decay pa...
1
6
5
88
4
892
909
892
null
['fmin', 'fmax', 'fwhm', 'widths']
None
null
0
0
0
null
0
null
The function (getWidthsCWB) defined within the public class called public.The function start at line 892 and ends at 909. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [892.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getFWHM
def getFWHM(pos,Inst,N=1):'''Compute total FWHM from Thompson, Cox & Hastings (1987) , J. Appl. Cryst. 20, 79-83via getgamFW(g,s).:param pos: float peak position in deg 2-theta or tof in musec:param Inst: dict instrument parameters:param N: int Inst index (0 for input, 1 for fitted):returns float: total FWHM of pseudoV...
6
40
3
852
17
911
960
911
null
['sigED', 'g', 'sigTOF', 'bet', 'gamED', 'alpTOF', 'betPinkX', 'betTOF', 'sig', 'dsp', 'gam', 'alpPinkX', 'alpPinkN', 'betPinkN', 'gamTOF', 's', 'alp']
None
null
0
0
0
null
0
null
The function (getFWHM) defined within the public class called public.The function start at line 911 and ends at 960. It contains 40 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [911.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getgamFW
def getgamFW(g,s):'''Compute total FWHM from Thompson, Cox & Hastings (1987), J. Appl. Cryst. 20, 79-83lambda fxn needs FWHM for both Gaussian & Lorentzian components:param g: float Lorentzian gamma = FWHM(L):param s: float Gaussian sig:returns float: total FWHM of pseudoVoigt'''gamFW = lambda s,g: np.exp(np.log(s**5+2...
1
3
2
90
1
962
972
962
null
['gamFW']
None
null
0
0
0
null
0
null
The function (getgamFW) defined within the public class called public.The function start at line 962 and ends at 972. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [962.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getBackground
def getBackground(pfx,parmDict,bakType,dataType,xdata,fixback=None):'''Computes the background based on parameters that may be taken froma gpx file or the data tree.:param str pfx: histogram prefix (:h:):param dict parmDict: Refinement parameter values:param str bakType: defines background function to be used. Should b...
40
147
6
1,516
36
974
1,143
974
null
['iBeg', 'iFin', 'ff', 'dbU', 'dt', 'bakPos', 'wave', 'dbR', 'pkP', 'FF', 'ybi', 'bet', 'T1', 'dbA', 'const', 'yb', 'pkG', 'shl', 'lenX', 'iD', 'pkS', 'q', 'sumBk', 'nBak', 'key', 'SQ', 'pkI', 'xpos', 'sinPos', 'dX', 'xnomask', 'QT', 'bakVals', 'alp', 'T2', 'bakInt']
None
null
0
0
0
null
0
null
The function (getBackground) defined within the public class called public.The function start at line 974 and ends at 1143. It contains 147 lines of code and it has a cyclomatic complexity of 40. It takes 6 parameters, represented as [974.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getBackgroundDerv
def getBackgroundDerv(hfx,parmDict,bakType,dataType,xdata,fixback=None):'''Computes the derivatives of the backgroundParameters passed to this may be pulled from gpx file or data tree.See :func:`getBackground` for parameter definitions.:returns: dydb,dyddb,dydpk,dydfb where the first three are 2-D arraysof derivatives ...
40
153
6
1,782
38
1,145
1,309
1,145
null
['iBeg', 'iFin', 'dydb', 'ff', 'dbU', 'cqr', 'dt', 'bakPos', 'wave', 'dbR', 'temp', 'pkP', 'dydfb', 'FF', 'sqr', 'bet', 'dydpk', 'T1', 'dbA', 'const', 'pkG', 'shl', 'lenX', 'iD', 'pkS', 'q', 'key', 'nBak', 'SQ', 'pkI', 'xpos', 'sinPos', 'dX', 'xnomask', 'QT', 'dyddb', 'T2', 'alp']
None
null
0
0
0
null
0
null
The function (getBackgroundDerv) defined within the public class called public.The function start at line 1145 and ends at 1309. It contains 153 lines of code and it has a cyclomatic complexity of 40. It takes 6 parameters, represented as [1145.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getFCJVoigt3
def getFCJVoigt3(pos,sig,gam,shl,xdata):'''Compute the Finger-Cox-Jepcoat modified Pseudo-Voigt function for aCW powder peak in external Fortran routineparam pos: peak position in degreesparam sig: Gaussian variance in centideg^2param gam: Lorentzian width in centidegparam shl: axial divergence parameter (S+H)/Lparam x...
2
8
5
87
2
1,312
1,331
1,312
null
['cw', 'Df']
None
null
0
0
0
null
0
null
The function (getFCJVoigt3) defined within the public class called public.The function start at line 1312 and ends at 1331. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 5 parameters, represented as [1312.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getdFCJVoigt3
def getdFCJVoigt3(pos,sig,gam,shl,xdata):'''Compute analytic derivatives the Finger-Cox-Jepcoat modified Pseudo-Voigtfunction for a CW powder peakparam pos: peak position in degreesparam sig: Gaussian variance in centideg^2param gam: Lorentzian width in centidegparam shl: axial divergence parameter (S+H)/Lparam xdata: ...
1
3
5
55
0
1,333
1,346
1,333
null
[]
None
null
0
0
0
null
0
null
The function (getdFCJVoigt3) defined within the public class called public.The function start at line 1333 and ends at 1346. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [1333.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getExpFCJVoigt3
def getExpFCJVoigt3(pos,alp,bet,sig,gam,shl,xdata):'''Compute the Finger-Cox-Jepcoat modified double exponential Pseudo-Voigtconvolution function for a CW powder peak in external Fortran routineparam pos: peak position in degreesparam sig: Gaussian variance in centideg^2param alp: Rise exponential coefficientparam bet:...
2
8
7
95
2
1,348
1,369
1,348
null
['cw', 'Df']
None
null
0
0
0
null
0
null
The function (getExpFCJVoigt3) defined within the public class called public.The function start at line 1348 and ends at 1369. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 7 parameters, represented as [1348.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getdExpFCJVoigt3
def getdExpFCJVoigt3(pos,alp,bet,sig,gam,shl,xdata):'''Compute analytic derivatives the Finger-Cox-Jepcoat modified doubleexponential Pseudo-Voigt convolution function for a CW powder peakparam pos: peak position in degreesparam alp: Rise exponential coefficientparam bet: Decay exponential coefficientparam sig: Gaussia...
1
3
7
71
0
1,371
1,386
1,371
null
[]
None
null
0
0
0
null
0
null
The function (getdExpFCJVoigt3) defined within the public class called public.The function start at line 1371 and ends at 1386. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 7 parameters, represented as [1371.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getPsVoigt
def getPsVoigt(pos,sig,gam,xdata):'''Compute the simple Pseudo-Voigt function for asmall angle Bragg peak in external Fortran routineparam pos: peak position in degreesparam sig: Gaussian variance in centideg^2param gam: Lorentzian width in centidegparam xdata: array; profile points for peak to be calculatedreturns: ar...
1
5
4
67
2
1,388
1,404
1,388
null
['cw', 'Df']
None
null
0
0
0
null
0
null
The function (getPsVoigt) defined within the public class called public.The function start at line 1388 and ends at 1404. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [1388.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getdPsVoigt
def getdPsVoigt(pos,sig,gam,xdata):'''Compute the simple Pseudo-Voigt function derivatives for asmall angle Bragg peak peak in external Fortran routineparam pos: peak position in degreesparam sig: Gaussian variance in centideg^2param gam: Lorentzian width in centidegparam xdata: array; profile points for peak to be cal...
1
3
4
45
0
1,406
1,420
1,406
null
[]
None
null
0
0
0
null
0
null
The function (getdPsVoigt) defined within the public class called public.The function start at line 1406 and ends at 1420. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [1406.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getEpsVoigt
def getEpsVoigt(pos,alp,bet,sig,gam,xdata):'''Compute the double exponential Pseudo-Voigt convolution function for aneutron TOF & CW pink peak in external Fortran routine'''cw = np.diff(xdata)cw = np.append(cw,cw[-1])Df = pyd.pyepsvoigt(len(xdata),xdata-pos,alp,bet,sig,gam)return Df,np.sum(Df*cw)
1
5
6
72
2
1,422
1,430
1,422
null
['cw', 'Df']
None
null
0
0
0
null
0
null
The function (getEpsVoigt) defined within the public class called public.The function start at line 1422 and ends at 1430. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [1422.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getdEpsVoigt
def getdEpsVoigt(pos,alp,bet,sig,gam,xdata):'''Compute the double exponential Pseudo-Voigt convolution function derivatives for aneutron TOF & CW pink peak in external Fortran routine'''Df,dFdp,dFda,dFdb,dFds,dFdg = pyd.pydepsvoigt(len(xdata),xdata-pos,alp,bet,sig,gam)return Df,dFdp,dFda,dFdb,dFds,dFdg
1
3
6
61
0
1,432
1,438
1,432
null
[]
None
null
0
0
0
null
0
null
The function (getdEpsVoigt) defined within the public class called public.The function start at line 1432 and ends at 1438. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [1432.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ellipseSize
def ellipseSize(H,Sij,GB):'''Implements r=1/sqrt(sum((1/S)*(q.v)^2) per note from Alexander Brady'''HX = np.inner(H.T,GB)lenHX = np.sqrt(np.sum(HX**2))Esize,Rsize = nl.eigh(G2lat.U6toUij(Sij))R = np.inner(HX/lenHX,Rsize)**2*Esize #want column length for hkl in crystallenR = 1./np.sqrt(np.sum(R))return lenR
1
7
3
86
4
1,440
1,449
1,440
null
['lenR', 'HX', 'R', 'lenHX']
None
null
0
0
0
null
0
null
The function (ellipseSize) defined within the public class called public.The function start at line 1440 and ends at 1449. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [1440.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ellipseSizeDerv
def ellipseSizeDerv(H,Sij,GB):'''Implements r=1/sqrt(sum((1/S)*(q.v)^2) derivative per note from Alexander Brady'''lenR = ellipseSize(H,Sij,GB)delt = 0.001dRdS = np.zeros(6)for i in range(6):Sij[i] -= deltlenM = ellipseSize(H,Sij,GB)Sij[i] += 2.*deltlenP = ellipseSize(H,Sij,GB)Sij[i] -= deltdRdS[i] = (lenP-lenM)/(2.*de...
2
12
3
103
5
1,451
1,465
1,451
null
['lenM', 'lenP', 'dRdS', 'delt', 'lenR']
None
null
0
0
0
null
0
null
The function (ellipseSizeDerv) defined within the public class called public.The function start at line 1451 and ends at 1465. It contains 12 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [1451.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getMustrain
def getMustrain(HKL,G,SGData,muStrData):if muStrData[0] == 'isotropic':return np.ones(HKL.shape[1])*muStrData[1][0]elif muStrData[0] == 'uniaxial':H = np.array(HKL)P = np.array(muStrData[3])cosP,sinP = np.array([G2lat.CosSinAngle(h,P,G) for h in H.T]).TSi = muStrData[1][0]Sa = muStrData[1][1]return Si*Sa/(np.sqrt((Si*c...
5
16
4
224
7
1,467
1,482
1,467
null
['Sum', 'Strms', 'Sa', 'rdsq', 'Si', 'H', 'P']
None
null
0
0
0
null
0
null
The function (getMustrain) defined within the public class called public.The function start at line 1467 and ends at 1482. It contains 16 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [1467.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getCrSize
def getCrSize(HKL,G,GB,sizeData):if sizeData[0] == 'isotropic':return np.ones(HKL.shape[1])*sizeData[1][0]elif sizeData[0] == 'uniaxial':H = np.array(HKL)P = np.array(sizeData[3])cosP,sinP = np.array([G2lat.CosSinAngle(h,P,G) for h in H.T]).TSi = sizeData[1][0]Sa = sizeData[1][1]return Si*Sa/(np.sqrt((Si*cosP)**2+(Sa*s...
6
14
4
195
5
1,484
1,497
1,484
null
['Sij', 'Sa', 'Si', 'H', 'P']
None
null
0
0
0
null
0
null
The function (getCrSize) defined within the public class called public.The function start at line 1484 and ends at 1497. It contains 14 lines of code and it has a cyclomatic complexity of 6. It takes 4 parameters, represented as [1484.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getHKLpeak
def getHKLpeak(dmin,SGData,A,Inst=None,nodup=False):'''Generates allowed by symmetry reflections with d >= dminNB: GenHKLf & checkMagextc return True for extinct reflections:param dmin:minimum d-spacing:param SGData: space group data obtained from SpcGroup:param A: lattice parameter terms A1-A6:param Inst: instrument p...
8
17
5
178
4
1,499
1,526
1,499
null
['ext', 'HKLs', 'HKL', 'ds']
None
null
0
0
0
null
0
null
The function (getHKLpeak) defined within the public class called public.The function start at line 1499 and ends at 1526. It contains 17 lines of code and it has a cyclomatic complexity of 8. It takes 5 parameters, represented as [1499.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getHKLMpeak
def getHKLMpeak(dmin,Inst,SGData,SSGData,Vec,maxH,A):'needs a doc string'HKLs = []vec = np.array(Vec)vstar = np.sqrt(G2lat.calc_rDsq(vec,A)) #find extra needed for -n SS reflectionsdvec = 1./(maxH*vstar+1./dmin)HKL = G2lat.GenHLaue(dvec,SGData,A)SSdH = [vec*h for h in range(-maxH,maxH+1)]SSdH = dict(zip(range(-maxH,max...
11
26
7
319
12
1,528
1,553
1,528
null
['d', 'HKLs', 'vstar', 'HKLM', 'dvec', 'DH', 'ifMag', 'HKL', 'SSdH', 'ext', 'H', 'vec']
None
null
0
0
0
null
0
null
The function (getHKLMpeak) defined within the public class called public.The function start at line 1528 and ends at 1553. It contains 26 lines of code and it has a cyclomatic complexity of 11. It takes 7 parameters, represented as [1528.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
setPeakInstPrmMode
def setPeakInstPrmMode(normal=True):'''Determines the mode used for peak fitting. If normal=True (default)peak width parameters are computed from the instrument parametersunless the individual parameter is refined. If normal=False,peak widths are used as supplied for each peak.Note that normal=True unless this routine ...
1
3
1
13
1
1,566
1,579
1,566
null
['peakInstPrmMode']
None
null
0
0
0
null
0
null
The function (setPeakInstPrmMode) defined within the public class called public.The function start at line 1566 and ends at 1579. 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
getPeakProfile
def getPeakProfile(dataType,parmDict,xdata,fixback,varyList,bakType):'''Computes the profiles from multiple peaks for individual peak fittingfor powder patterns.NB: not used for Rietveld refinement'''yb = getBackground('',parmDict,bakType,dataType,xdata,fixback)[0]yc = np.zeros_like(yb)if 'LF' in dataType:if 'Lam1' in ...
50
188
6
1,614
38
1,581
1,775
1,581
null
['l', 'iBeg', 'iFin', 'gam', 'kRatio', 'clat', 'Ka2', 'bet', 'fp', 'lam2', 'yb', 'shl', 'lenX', 'iPeak', 'lamRatio', 'difC', 'dampP', 'ncells', 'dsp', 'tth', 'sigName', 'fitPowerP', 'alpName', 'gamName', 'betName', 'pos', 'fmin', 'lam', 'yc', 'tof', 'intens', 'sig', 'pos2', 'fp2', 'alp', 'fitPowerM', 'shol', 'dampM']
None
null
0
0
0
null
0
null
The function (getPeakProfile) defined within the public class called public.The function start at line 1581 and ends at 1775. It contains 188 lines of code and it has a cyclomatic complexity of 50. It takes 6 parameters, represented as [1581.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getTOFwids
def getTOFwids(dsp,varyList,iPeak,parmDict,applyMax=True):'''For TOF peaks: determine the values for the four peak width parametersfrom either the lookup table (in parmDict['pdabc']) or from the instrument parameters, unless the peak is varied or peakInstPrmMode is set, in which case the value is taken from the paramet...
21
36
5
325
9
1,777
1,820
1,777
null
['betName', 'Pdabc', 'bet', 'sig', 'sigName', 'gam', 'alpName', 'gamName', 'alp']
None
null
0
0
0
null
0
null
The function (getTOFwids) defined within the public class called public.The function start at line 1777 and ends at 1820. It contains 36 lines of code and it has a cyclomatic complexity of 21. It takes 5 parameters, represented as [1777.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getPeakProfileDerv
def getPeakProfileDerv(dataType,parmDict,xdata,fixback,varyList,bakType):'''Computes the profile derivatives for a powder pattern for single peak fittingreturn: np.array([dMdx1,dMdx2,...]) in same order as varylist = backVary,insVary,peakVary orderNB: not used for Rietveld refinement'''dMdv = np.zeros(shape=(len(varyLi...
104
318
6
3,274
58
1,822
2,148
1,822
null
['dMdpk', 'dgdZ', 'iBeg', 'iFin', 'ip', 'dervDict', 'names', 'gam', 'delta', 'dsdV', 'kRatio', 'dsdW', 'dgdY', 'dsds1', 'Ka2', 'bet', 'Pdabc', 'intArrM', 'dMdv', 'dsds0', 'shl', 'dsds2', 'lenX', 'deltaParmDict', 'dbdb1', 'dsdB', 'dada0', 'iPeak', 'lamRatio', 'difC', 'dsdU', 'dMdipk', 'dsp', 'dbdb0', 'dada1', 'sigName',...
None
null
0
0
0
null
0
null
The function (getPeakProfileDerv) defined within the public class called public.The function start at line 1822 and ends at 2148. It contains 318 lines of code and it has a cyclomatic complexity of 104. It takes 6 parameters, represented as [1822.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
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
2,150
2,153
2,150
null
[]
None
null
0
0
0
null
0
null
The function (Dict2Values) defined within the public class called public.The function start at line 2150 and ends at 2153. It contains 2 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [2150.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
Values2Dict
def Values2Dict(parmdict, varylist, values):''' Use after call to leastsq to update the parameter dictionary withvalues corresponding to keys in varylist'''parmdict.update(zip(varylist,values))
1
2
3
21
0
2,155
2,158
2,155
null
[]
None
null
0
0
0
null
0
null
The function (Values2Dict) defined within the public class called public.The function start at line 2155 and ends at 2158. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [2155.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
SetBackgroundParms
def SetBackgroundParms(Background):'Loads background parameters into dicts/lists to create varylist & parmdict'if len(Background) == 1:# fix up old backgroundsBackground.append({'nDebye':0,'debyeTerms':[]})bakType,bakFlag = Background[0][:2]backVals = Background[0][3:]backNames = ['Back;'+str(i) for i in range(len(back...
13
45
1
437
13
2,160
2,206
2,160
null
['peaksList', 'backVals', 'backVary', 'debyeNames', 'peaksNames', 'debyeVary', 'peaksDict', 'peaksVary', 'backDict', 'debyeList', 'backNames', 'debyeDict', 'Debye']
None
null
0
0
0
null
0
null
The function (SetBackgroundParms) defined within the public class called public.The function start at line 2160 and ends at 2206. It contains 45 lines of code and it has a cyclomatic complexity of 13. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
autoBkgCalc
def autoBkgCalc(bkgdict,ydata):'''Compute the autobackground using the selected pybaselines function:param dict bkgdict: background parameters:param np.array ydata: array of Y values:returns: points for background intensity at each Y position'''try:import pybaselines.whittakerexcept:raise Exception("import of pybaselin...
3
11
2
78
2
2,208
2,224
2,208
null
['lamb', 'func']
None
null
0
0
0
null
0
null
The function (autoBkgCalc) defined within the public class called public.The function start at line 2208 and ends at 2224. It contains 11 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [2208.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
DoCalibInst.SetInstParms
def SetInstParms():dataType = Inst['Type'][0]insVary = []insNames = []insVals = []for parm in Inst:insNames.append(parm)insVals.append(Inst[parm][1])if parm in ['Lam','difC','difA','difB','Zero','2-theta','XE','YE','ZE']:if Inst[parm][2]:insVary.append(parm)if 'C' in dataType or 'B' in dataType and 'Debye' in Sample['T...
9
24
0
200
0
2,228
2,251
2,228
null
[]
None
null
0
0
0
null
0
null
The function (DoCalibInst.SetInstParms) defined within the public class called public.The function start at line 2228 and ends at 2251. It contains 24 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
DoCalibInst.GetInstParms
def GetInstParms(parmDict,varyList):for name in Inst:Inst[name][1] = parmDict[name]for name in Sample:if name in ['DisplaceX','DisplaceY']: # for CW onlytry:Sample[name][0] = parmDict[name]except:pass
5
9
2
55
0
2,253
2,261
2,253
null
[]
None
null
0
0
0
null
0
null
The function (DoCalibInst.GetInstParms) defined within the public class called public.The function start at line 2253 and ends at 2261. It contains 9 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [2253.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
DoCalibInst.InstPrint
def InstPrint(sigDict):print ('Instrument/Sample Parameters:')if 'C' in Inst['Type'][0] or 'B' in Inst['Type'][0]:ptfmt = "%12.6f"else:ptfmt = "%12.3f"ptlbls = 'names :'ptstr ='values:'sigstr = 'esds:'for parm in Inst:if parm in['Lam','difC','difA','difB','Zero','2-theta','XE','YE','ZE']:ptlbls += "%s" % (parm.center(1...
9
28
1
195
0
2,263
2,290
2,263
null
[]
None
null
0
0
0
null
0
null
The function (DoCalibInst.InstPrint) defined within the public class called public.The function start at line 2263 and ends at 2290. It contains 28 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
DoCalibInst.errPeakPos
def errPeakPos(values,peakDsp,peakPos,peakWt,dataType,parmDict,varyList):parmDict.update(zip(varyList,values))calcPos = G2lat.getPeakPos(dataType,parmDict,peakDsp)if 'C' in dataType or 'B' in dataType:const = 18.e-2/(np.pi*parmDict['radius'])shft = -const*(parmDict['DisplaceX']*npcosd(calcPos)+parmDict['DisplaceY']*nps...
3
9
7
128
0
2,292
2,303
2,292
null
[]
None
null
0
0
0
null
0
null
The function (DoCalibInst.errPeakPos) defined within the public class called public.The function start at line 2292 and ends at 2303. It contains 9 lines of code and it has a cyclomatic complexity of 3. It takes 7 parameters, represented as [2292.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
DoCalibInst
def DoCalibInst(IndexPeaks,Inst,Sample):def SetInstParms():dataType = Inst['Type'][0]insVary = []insNames = []insVals = []for parm in Inst:insNames.append(parm)insVals.append(Inst[parm][1])if parm in ['Lam','difC','difA','difB','Zero','2-theta','XE','YE','ZE']:if Inst[parm][2]:insVary.append(parm)if 'C' in dataType or ...
9
48
3
410
26
2,226
2,348
2,226
null
['values', 'ncyc', 'insVary', 'begin', 'runtime', 'peakWt', 'dataType', 'ptstr', 'const', 'calcPos', 'parmDict', 'ptlbls', 'varyList', 'instDict', 'peakDsp', 'shft', 'result', 'chisq', 'peakPos', 'sigDict', 'ptfmt', 'insVals', 'sig', 'GOF', 'insNames', 'sigstr']
None
null
0
0
0
null
0
null
The function (DoCalibInst) defined within the public class called public.The function start at line 2226 and ends at 2348. It contains 48 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [2226.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
getHeaderInfo
def getHeaderInfo(dataType):'''Provide parameter name, label name and formatting information for thecontents of the Peak Table and where used in DoPeakFit'''names = ['pos','int']lnames = ['position','intensity']if 'LF' in dataType:names = ['int','sig','gam','dampM','dampP','l','ttheta']lnames = ['intensity','sigma\u00b...
5
27
1
223
3
2,350
2,380
2,350
null
['lnames', 'fmt', 'names']
None
null
0
0
0
null
0
null
The function (getHeaderInfo) defined within the public class called public.The function start at line 2350 and ends at 2380. It contains 27 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
DoPeakFit.GetBackgroundParms
def GetBackgroundParms(parmList,Background):iBak = 0while True:try:bakName = 'Back;'+str(iBak)Background[0][iBak+3] = parmList[bakName]iBak += 1except KeyError:breakiDb = 0while True:names = ['DebyeA;','DebyeR;','DebyeU;']try:for i,name in enumerate(names):val = parmList[name+str(iDb)]Background[1]['debyeTerms'][iDb][2...
10
31
2
190
0
2,417
2,447
2,417
null
[]
None
null
0
0
0
null
0
null
The function (DoPeakFit.GetBackgroundParms) defined within the public class called public.The function start at line 2417 and ends at 2447. It contains 31 lines of code and it has a cyclomatic complexity of 10. It takes 2 parameters, represented as [2417.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
DoPeakFit.BackgroundPrint
def BackgroundPrint(Background,sigDict):print ('Background coefficients for '+Background[0][0]+' function')ptfmt = "%12.5f"ptstr ='value: 'sigstr = 'esd: 'for i,back in enumerate(Background[0][3:]):ptstr += ptfmt % (back)if Background[0][1]:prm = 'Back;'+str(i)if prm in sigDict:sigstr += ptfmt % (sigDict[prm])else:sigs...
17
56
2
429
0
2,449
2,505
2,449
null
[]
None
null
0
0
0
null
0
null
The function (DoPeakFit.BackgroundPrint) defined within the public class called public.The function start at line 2449 and ends at 2505. It contains 56 lines of code and it has a cyclomatic complexity of 17. It takes 2 parameters, represented as [2449.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
DoPeakFit.SetInstParms
def SetInstParms(Inst):dataType = Inst['Type'][0]insVary = []insNames = []insVals = []for parm in Inst:insNames.append(parm)insVals.append(Inst[parm][1])if parm in ['U','V','W','X','Y','Z','SH/L','I(L2)/I(L1)','alpha','A','B','C','beta-0','beta-1','beta-q','sig-0','sig-1','sig-2','sig-q','alpha-0','alpha-1'] and Inst[p...
5
15
1
148
0
2,507
2,521
2,507
null
[]
None
null
0
0
0
null
0
null
The function (DoPeakFit.SetInstParms) defined within the public class called public.The function start at line 2507 and ends at 2521. It contains 15 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
DoPeakFit.GetPkInstParms
def GetPkInstParms(parmDict,Inst,varyList):'''This sets default values for sigma & gamma in the single-peak fitting parameter dict when peakInstPrmMode is Trueand the peak values are not being fit. (Why not alpha & beta?)Note similar routine, GetPeaksParms, which sets values in the peak table. (TODO: add setting of alp...
13
29
3
236
0
2,523
2,557
2,523
null
[]
None
null
0
0
0
null
0
null
The function (DoPeakFit.GetPkInstParms) defined within the public class called public.The function start at line 2523 and ends at 2557. It contains 29 lines of code and it has a cyclomatic complexity of 13. It takes 3 parameters, represented as [2523.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
DoPeakFit.InstPrint
def InstPrint(Inst,sigDict):print ('Instrument Parameters:')ptfmt = "%12.6f"ptlbls = 'names :'ptstr ='values:'sigstr = 'esds:'for parm in Inst:if parm in['U','V','W','X','Y','Z','SH/L','I(L2)/I(L1)','alpha','A','B','C','beta-0','beta-1','beta-q','sig-0','sig-1','sig-2','sig-q','alpha-0','alpha-1']:ptlbls += "%s" % (par...
4
18
2
134
0
2,559
2,576
2,559
null
[]
None
null
0
0
0
null
0
null
The function (DoPeakFit.InstPrint) defined within the public class called public.The function start at line 2559 and ends at 2576. It contains 18 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [2559.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
DoPeakFit.SetPeaksParms
def SetPeaksParms(dataType,Peaks):'''Set the contents of peakDict from list Peaks'''peakDict = {}peakVary = []names,_,_ = getHeaderInfo(dataType)if 'LF' in dataType:off = 2names = names[:-2] # drop 00l & 2theta from headerelse:off = 0for i,peak in enumerate(Peaks):if type(peak) is dict:peakDict.update(peak)continueif '...
7
20
2
144
0
2,578
2,599
2,578
null
[]
None
null
0
0
0
null
0
null
The function (DoPeakFit.SetPeaksParms) defined within the public class called public.The function start at line 2578 and ends at 2599. It contains 20 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [2578.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
DoPeakFit.GetPeaksParms
def GetPeaksParms(Inst,parmDict,Peaks,varyList):'''Put single-peak fitting values into the Peaks List from the refinement results. Where values are not fit (unless peakInstPrmMode is False), they are computed from the Instrument Parameter values. Note that routine GetPkInstParms does this prior for sigma & gamma (only)...
27
54
4
533
0
2,601
2,661
2,601
null
[]
None
null
0
0
0
null
0
null
The function (DoPeakFit.GetPeaksParms) defined within the public class called public.The function start at line 2601 and ends at 2661. It contains 54 lines of code and it has a cyclomatic complexity of 27. It takes 4 parameters, represented as [2601.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
DoPeakFit.PeaksPrint
def PeaksPrint(dataType,parmDict,sigDict,varyList,ptsperFW):if 'clat' in varyList:print('c = {:.6f} esd {:.6f}'.format(parmDict['clat'],sigDict['clat']))print ('Peak coefficients:')names,fmt,_ = getHeaderInfo(dataType)head = 13*' 'for name in names:if name == 'l':head += nameelif name == 'ttheta':head += name.center(8)...
14
38
5
296
0
2,663
2,700
2,663
null
[]
None
null
0
0
0
null
0
null
The function (DoPeakFit.PeaksPrint) defined within the public class called public.The function start at line 2663 and ends at 2700. It contains 38 lines of code and it has a cyclomatic complexity of 14. It takes 5 parameters, represented as [2663.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
DoPeakFit.devPeakProfile
def devPeakProfile(values,xdata,ydata,fixback, weights,dataType,parmdict,varylist,bakType,dlg):'''Computes a matrix where each row is the derivative of the calc-obsvalues (see :func:`errPeakProfile`) with respect to each parameterin backVary,insVary,peakVary. Used for peak fitting.'''parmdict.update(zip(varylist,values...
1
3
10
57
0
2,702
2,708
2,702
null
[]
None
null
0
0
0
null
0
null
The function (DoPeakFit.devPeakProfile) defined within the public class called public.The function start at line 2702 and ends at 2708. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 10 parameters, represented as [2702.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
DoPeakFit.errPeakProfile
def errPeakProfile(values,xdata,ydata,fixback,weights,dataType,parmdict,varylist,bakType,dlg):'''Computes a vector with the weighted calc-obs values differencesfor peak fitting'''parmdict.update(zip(varylist,values))M = np.sqrt(weights)*(getPeakProfile(dataType,parmdict,xdata,fixback,varylist,bakType)-ydata)Rwp = min(1...
3
10
10
140
0
2,710
2,722
2,710
null
[]
None
null
0
0
0
null
0
null
The function (DoPeakFit.errPeakProfile) defined within the public class called public.The function start at line 2710 and ends at 2722. It contains 10 lines of code and it has a cyclomatic complexity of 3. It takes 10 parameters, represented as [2710.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
DoPeakFit
def DoPeakFit(FitPgm,Peaks,Background,Limits,Inst,Inst2,data,fixback=None,prevVaryList=[],oneCycle=False,controls=None,wtFactor=1.0,dlg=None,noFit=False):'''Called to perform a peak fit, refining the selected items in the peaktable as well as selected items in the background.:param str FitPgm: type of fit to perform. A...
42
149
14
1,300
55
2,382
2,863
2,382
null
['iDb', 'iBak', 'values', 'names', 'prm', 'warn', 'ncyc', 'insVary', 'binsperFWHM', 'begin', 'Rvals', 'fullvaryList', 'runtime', 'xpk', 'dataType', 'ptstr', 'badVary', 'GoOn', 'head', 'M', 'Rwp', 'peakVary', 'iPeak', 'line', 'xBeg', 'parName', 'ptlbls', 'parms', 'fixback', 'Ftol', 'parmDict', 'varyList', 'cw', 'dsp', '...
None
null
0
0
0
null
0
null
The function (DoPeakFit) defined within the public class called public.The function start at line 2382 and ends at 2863. It contains 149 lines of code and it has a cyclomatic complexity of 42. It takes 14 parameters, represented as [2382.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
calcIncident.IfunAdv
def IfunAdv(Iparm,xdata):Itype = Iparm['Itype']Icoef = Iparm['Icoeff']DYI = np.ones((12,xdata.shape[0]))YI = np.ones_like(xdata)*Icoef[0]x = xdata/1000. #expressions are in msif Itype == 'Exponential':for i in [1,3,5,7,9]:Eterm = np.exp(-Icoef[i+1]*x**((i+1)/2))YI += Icoef[i]*EtermDYI[i] *= EtermDYI[i+1] *= -Icoef[i]*E...
8
33
2
398
0
2,868
2,901
2,868
null
[]
None
null
0
0
0
null
0
null
The function (calcIncident.IfunAdv) defined within the public class called public.The function start at line 2868 and ends at 2901. It contains 33 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [2868.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
calcIncident
def calcIncident(Iparm,xdata):'needs a doc string'def IfunAdv(Iparm,xdata):Itype = Iparm['Itype']Icoef = Iparm['Icoeff']DYI = np.ones((12,xdata.shape[0]))YI = np.ones_like(xdata)*Icoef[0]x = xdata/1000. #expressions are in msif Itype == 'Exponential':for i in [1,3,5,7,9]:Eterm = np.exp(-Icoef[i+1]*x**((i+1)/2))YI += Ic...
3
19
2
186
14
2,865
2,918
2,865
null
['Itype', 'Iesd', 'vcov', 'Icovar', 'k', 'DYI', 'x', 'T', 'Ccof', 'M', 'WYI', 'YI', 'Eterm', 'Icoef']
None
null
0
0
0
null
0
null
The function (calcIncident) defined within the public class called public.The function start at line 2865 and ends at 2918. It contains 19 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [2865.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
MakeInst
def MakeInst(PWDdata,Name,Size,Mustrain,useSamBrd):inst = PWDdata['Instrument Parameters'][0]sample = PWDdata['Sample Parameters']Xsb = 0.Ysb = 0.if 'T' in inst['Type'][1]:difC = inst['difC'][1]if useSamBrd[0]:if 'ellipsoidal' not in Size[0]:#take the isotropic term onlyXsb = 1.e-4*difC/Size[1][0]if useSamBrd[1]:if 'ge...
10
51
5
744
9
2,921
2,971
2,921
null
['prms', 'fl', 'difC', 'Xsb', 'fname', 'sample', 'wave', 'inst', 'Ysb']
None
null
0
0
0
null
0
null
The function (MakeInst) defined within the public class called public.The function start at line 2921 and ends at 2971. It contains 51 lines of code and it has a cyclomatic complexity of 10. It takes 5 parameters, represented as [2921.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
MakeBack
def MakeBack(PWDdata,Name):Back = PWDdata['Background'][0]inst = PWDdata['Instrument Parameters'][0]if 'chebyschev-1' != Back[0]:return NoneNback = Back[2]BackVals = Back[3:]fname = Name+'.back'fl = open(fname,'w')fl.write('%10d\n'%Nback)for val in BackVals:if 'T' in inst['Type'][1]:fl.write('%12.6g\n'%(float(val)))els...
4
17
2
115
6
2,973
2,989
2,973
null
['Back', 'fl', 'fname', 'Nback', 'inst', 'BackVals']
None
null
0
0
0
null
0
null
The function (MakeBack) defined within the public class called public.The function start at line 2973 and ends at 2989. It contains 17 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [2973.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
findDup
def findDup(Atoms):Dup = []Fracs = []for iat1,at1 in enumerate(Atoms):if any([at1[0] in dup for dup in Dup]):continueelse:Dup.append([at1[0],])Fracs.append([at1[6],])for iat2,at2 in enumerate(Atoms[(iat1+1):]):if np.sum((np.array(at1[3:6])-np.array(at2[3:6]))**2) < 0.00001:Dup[-1] += [at2[0],]Fracs[-1]+= [at2[6],]retur...
6
14
1
153
2
2,991
3,004
2,991
null
['Dup', 'Fracs']
None
null
0
0
0
null
0
null
The function (findDup) defined within the public class called public.The function start at line 2991 and ends at 3004. It contains 14 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
MakeRMC6f
def MakeRMC6f(PWDdata,Name,Phase,RMCPdict):Meta = RMCPdict['metadata']Atseq = RMCPdict['atSeq']Supercell =RMCPdict['SuperCell']generalData = Phase['General']Dups,Fracs = findDup(Phase['Atoms'])Sfracs = [np.cumsum(fracs) for fracs in Fracs]ifSfracs = any([np.any(sfracs-1.) for sfracs in Sfracs])Sample = PWDdata['Sample ...
22
93
4
1,015
29
3,006
3,101
3,006
null
['fname', 'newPhase', 'i', 'Sfracs', 'reset', 'Meta', 'cell', 'atom', 'NAtype', 'Supercell', 'Natoms', 'Trans', 'ind', 'Satoms', 'atcode', 'ldup', 'nat', 'Atseq', 'Atoms', 'GB', 'natm', 'ifSfracs', 'Sample', 'fl', 'NAstr', 'generalData', 'Cell', 'atoms', 'Natm']
None
null
0
0
0
null
0
null
The function (MakeRMC6f) defined within the public class called public.The function start at line 3006 and ends at 3101. It contains 93 lines of code and it has a cyclomatic complexity of 22. It takes 4 parameters, represented as [3006.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
MakeBragg
def MakeBragg(PWDdata,Name,Phase):generalData = Phase['General']Vol = generalData['Cell'][7]Data = PWDdata['Data']Inst = PWDdata['Instrument Parameters'][0]Bank = int(Inst['Bank'][1])Sample = PWDdata['Sample Parameters']Scale = Sample['Scale'][0]Limits = PWDdata['Limits'][1]Ibeg = np.searchsorted(Data[0],Limits[0])Ifin...
4
24
3
261
12
3,103
3,126
3,103
null
['Sample', 'Limits', 'fl', 'Ibeg', 'Ifin', 'fname', 'Scale', 'generalData', 'Data', 'Inst', 'Vol', 'Bank']
None
null
0
0
0
null
0
null
The function (MakeBragg) defined within the public class called public.The function start at line 3103 and ends at 3126. It contains 24 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [3103.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
MakeRMCPdat
def MakeRMCPdat(PWDdata,Name,Phase,RMCPdict):Meta = RMCPdict['metadata']Times = RMCPdict['runTimes']Atseq = RMCPdict['atSeq']Natoms = RMCPdict['NoAtoms']sumatms = np.sum(np.array([Natoms[iatm] for iatm in Natoms]))Isotope = RMCPdict['Isotope']Isotopes = RMCPdict['Isotopes']Atypes = RMCPdict['aTypes']if 'Va' in Atypes:I...
60
190
4
2,015
39
3,128
3,319
3,128
null
['Nblen', 'pairMin', 'dMin', 'at1', 'fname', 'Atypes', 'refList', 'fb', 'lenA', 'Pairs', 'Times', 'Meta', 'inst', 'minHD', 'ncoef', 'maxMoves', 'BraggWt', 'atPairs', 'minD', 'fqdata', 'Files', 'Natoms', 'oxid', 'sumatms', 'at2', 'gsasType', 'Atseq', 'Xfl', 'Isotopes', 'XFF', 'pair', 'lines', 'fc', 'maxMv', 'fl', 'fa', ...
None
null
0
0
0
null
0
null
The function (MakeRMCPdat) defined within the public class called public.The function start at line 3128 and ends at 3319. It contains 190 lines of code and it has a cyclomatic complexity of 60. It takes 4 parameters, represented as [3128.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
findrmcprofile
def findrmcprofile():'''Find where RMCProfile is installed. Tries the following: 1. Returns the Config var `rmcprofile_exec`, if defined. This is the executable to run. 2. The path is checked for a RMCprofile image. Also checked arethe location where the GSAS-II Python files are found, the location where GSAS-II binari...
12
27
0
194
3
3,431
3,475
3,431
null
['pathlist', 'rmcprofile_exe', 'lookfor']
None
null
0
0
0
null
0
null
The function (findrmcprofile) defined within the public class called public.The function start at line 3431 and ends at 3475. It contains 27 lines of code and it has a cyclomatic complexity of 12. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
findfullrmc
def findfullrmc():'''Find where fullrmc is installed. Tries the following: 1. Returns the Config var 'fullrmc_exec', if defined. If an executableis found at that location it is assumed to run and supplyfullrmc 5.0+ 2. The path is checked for a fullrmc image as named by Bachir:returns: the full path to a python executab...
9
20
0
165
4
3,477
3,506
3,477
null
['pathlist', 'fullrmc_exe', 'lookfor', 'fl']
None
null
0
0
0
null
0
null
The function (findfullrmc) defined within the public class called public.The function start at line 3477 and ends at 3506. It contains 20 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
fullrmcDownload
def fullrmcDownload():'''Downloads the fullrmc executable from Bachir's site to the currentGSAS-II binary directory.Does some error checking.'''import osimport requestsimport platformif platform.architecture()[0] != '64bit':return "fullrmc is only available for 64 bit machines. This is 32 bit"setXbit = Trueif sys.platf...
7
29
0
169
3
3,508
3,542
3,508
null
['fil', 'URL', 'setXbit']
None
null
0
0
0
null
0
null
The function (fullrmcDownload) defined within the public class called public.The function start at line 3508 and ends at 3542. It contains 29 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
findPDFfit
def findPDFfit():'''Find if PDFfit2 is installed (may be local to GSAS-II). Does the following::returns: the full path to a python executable or None, if it was not found.'''if GSASIIpath.GetConfigValue('pdffit2_exec') is not None and is_exe(GSASIIpath.GetConfigValue('pdffit2_exec')):return GSASIIpath.GetConfigValue('p...
4
13
0
62
0
3,544
3,559
3,544
null
[]
None
null
0
0
0
null
0
null
The function (findPDFfit) defined within the public class called public.The function start at line 3544 and ends at 3559. It contains 13 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
GetPDFfitAtomVar
def GetPDFfitAtomVar(Phase,RMCPdict):''' Find dict of independent "@n" variables for PDFfit in atom constraints'''General = Phase['General']Atoms = Phase['Atoms']cx,ct,cs,cia = General['AtomPtrs']AtomVar = RMCPdict['AtomVar']varnames = []for iat,atom in enumerate(RMCPdict['AtomConstr']):for it,item in enumerate(atom):i...
12
25
2
187
7
3,561
3,587
3,561
null
['Atoms', 'itnum', 'varname', 'General', 'AtomVar', 'itms', 'varnames']
None
null
0
0
0
null
0
null
The function (GetPDFfitAtomVar) defined within the public class called public.The function start at line 3561 and ends at 3587. It contains 25 lines of code and it has a cyclomatic complexity of 12. It takes 2 parameters, represented as [3561.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
MakePDFfitAtomsFile
def MakePDFfitAtomsFile(Phase,RMCPdict):'''Make the PDFfit atoms file'''General = Phase['General']if General['SGData']['SpGrp'] != 'P 1':return 'Space group symmetry must be lowered to P 1 for PDFfit'fName = General['Name']+'-PDFfit.stru'fName = fName.replace(' ','_')if 'sequential' in RMCPdict['refinement']:fName = 'S...
8
38
2
498
7
3,589
3,628
3,589
null
['fName', 'fatm', 'shape', 'Atoms', 'sharp', 'General', 'cell']
None
null
0
0
0
null
0
null
The function (MakePDFfitAtomsFile) defined within the public class called public.The function start at line 3589 and ends at 3628. It contains 38 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [3589.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
MakePDFfitRunFile.GetCellConstr
def GetCellConstr(SGData):if SGData['SGLaue'] in ['m3', 'm3m']:return [1,1,1,0,0,0]elif SGData['SGLaue'] in ['3','3m1','31m','6/m','6/mmm','4/m','4/mmm']:return [1,1,2,0,0,0]elif SGData['SGLaue'] in ['3R','3mR']:return [1,1,1,2,2,2]elif SGData['SGLaue'] == 'mmm':return [1,2,3,0,0,0]elif SGData['SGLaue'] == '2/m':if SGD...
9
18
1
205
0
3,634
3,651
3,634
null
[]
None
null
0
0
0
null
0
null
The function (MakePDFfitRunFile.GetCellConstr) defined within the public class called public.The function start at line 3634 and ends at 3651. It contains 18 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
MakePDFfitRunFile
def MakePDFfitRunFile(Phase,RMCPdict):'''Make the PDFfit python run file'''def GetCellConstr(SGData):if SGData['SGLaue'] in ['m3', 'm3m']:return [1,1,1,0,0,0]elif SGData['SGLaue'] in ['3','3m1','31m','6/m','6/mmm','4/m','4/mmm']:return [1,1,2,0,0,0]elif SGData['SGLaue'] in ['3R','3mR']:return [1,1,1,2,2,2]elif SGData['...
33
126
2
950
21
3,630
3,785
3,630
null
['cellconst', 'Np', 'itnum', 'names', 'uijs', 'used', 'fName', 'parmNames', 'Nd', 'parms', 'PDFfit_exe', 'AtomVar', 'itms', 'filNam', 'cellNames', 'dType', 'rundata', 'rfile', 'General', 'Cell', 'once']
None
null
0
0
0
null
0
null
The function (MakePDFfitRunFile) defined within the public class called public.The function start at line 3630 and ends at 3785. It contains 126 lines of code and it has a cyclomatic complexity of 33. It takes 2 parameters, represented as [3630.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetSeqCell
def GetSeqCell(SGData,parmDict):''' For use in processing PDFfit sequential results'''try:if SGData['SGLaue'] in ['m3', 'm3m']:cell = [parmDict['11'][0],parmDict['11'][0],parmDict['11'][0],90.,90.,90.]elif SGData['SGLaue'] in ['3','3m1','31m','6/m','6/mmm','4/m','4/mmm']:cell = [parmDict['11'][0],parmDict['11'][0],parm...
10
24
2
443
1
3,787
3,812
3,787
null
['cell']
None
null
0
0
0
null
0
null
The function (GetSeqCell) defined within the public class called public.The function start at line 3787 and ends at 3812. It contains 24 lines of code and it has a cyclomatic complexity of 10. It takes 2 parameters, represented as [3787.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
UpdatePDFfit
def UpdatePDFfit(Phase,RMCPdict):''' Updates various PDFfit parameters held in GSAS-II'''General = Phase['General']if RMCPdict['refinement'] == 'normal':fName = General['Name']+'-PDFfit.rstr'try:rstr = open(fName.replace(' ','_'),'r')except FileNotFoundError:return [fName,'Not found - PDFfit failed']lines = rstr.readli...
40
101
2
1,042
23
3,814
3,918
3,814
null
['res', 'XNdata', 'atstr', 'dkey', 'py', 'newpy', 'resline', 'header', 'Uijstr', 'results', 'resdict', 'newParms', 'Rwp', 'rstr', 'parm', 'fName', 'Ibeg', 'Atoms', 'Uiistr', 'lines', 'General', 'pylines', 'atmBeg']
None
null
0
0
0
null
0
null
The function (UpdatePDFfit) defined within the public class called public.The function start at line 3814 and ends at 3918. It contains 101 lines of code and it has a cyclomatic complexity of 40. It takes 2 parameters, represented as [3814.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
MakefullrmcSupercell
def MakefullrmcSupercell(Phase,RMCPdict):'''Create a fullrmc supercell from GSAS-II:param dict Phase: phase information from data tree:param dict RMCPdict: fullrmc parameters from GUI:param list grpDict: a list of lists where the inner listcontains the atom numbers contained in each group. e.g.[[0,1,2,3,4],[5,6],[4,6]]...
11
21
2
345
8
3,920
3,956
3,920
null
['el', 'coordlist', 'atomlist', 'cellnum', 'cell', 'xyzOrth', 'SGData', 'grps']
None
null
0
0
0
null
0
null
The function (MakefullrmcSupercell) defined within the public class called public.The function start at line 3920 and ends at 3956. It contains 21 lines of code and it has a cyclomatic complexity of 11. It takes 2 parameters, represented as [3920.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
MakefullrmcRun
def MakefullrmcRun(pName,Phase,RMCPdict):'''Creates a script to run fullrmc. Returns the name of the file that wascreated.'''BondList = {}for k in RMCPdict['Pairs']:if RMCPdict['Pairs'][k][1]+RMCPdict['Pairs'][k][2]>0:BondList[k] = (RMCPdict['Pairs'][k][1],RMCPdict['Pairs'][k][2])AngleList = []for angle in RMCPdict['An...
49
408
3
1,290
15
3,958
4,407
3,958
null
['el', 'BondList', 'bbox', 'sfwt', 'filDat', 'minDists', 'AngleList', 'rundata', 'SymOpList', 'Files', 'rfile', 'atomsList', 'cell', 'scrname', 'fpos']
None
null
0
0
0
null
0
null
The function (MakefullrmcRun) defined within the public class called public.The function start at line 3958 and ends at 4407. It contains 408 lines of code and it has a cyclomatic complexity of 49. It takes 3 parameters, represented as [3958.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetRMCBonds
def GetRMCBonds(general,RMCPdict,Atoms,bondList):bondDist = []Cell = general['Cell'][1:7]Supercell =RMCPdict['SuperCell']Trans = np.eye(3)*np.array(Supercell)Cell = G2lat.TransformCell(Cell,Trans)[:6]Amat,Bmat = G2lat.cell2AB(Cell)indices = (-1,0,1)Units = np.array([[h,k,l] for h in indices for k in indices for l in in...
8
17
4
227
9
4,409
4,425
4,409
null
['Oxyz', 'Units', 'Dx', 'bondDist', 'indices', 'Supercell', 'Cell', 'Txyz', 'Trans']
None
null
0
0
0
null
0
null
The function (GetRMCBonds) defined within the public class called public.The function start at line 4409 and ends at 4425. It contains 17 lines of code and it has a cyclomatic complexity of 8. It takes 4 parameters, represented as [4409.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetRMCAngles
def GetRMCAngles(general,RMCPdict,Atoms,angleList):bondAngles = []Cell = general['Cell'][1:7]Supercell =RMCPdict['SuperCell']Trans = np.eye(3)*np.array(Supercell)Cell = G2lat.TransformCell(Cell,Trans)[:6]Amat,Bmat = G2lat.cell2AB(Cell)indices = (-1,0,1)Units = np.array([[h,k,l] for h in indices for k in indices for l i...
10
24
4
378
17
4,427
4,450
4,427
null
['TBxyz', 'Oxyz', 'DBx', 'Units', 'DAx', 'DBv', 'DAxV', 'indices', 'Supercell', 'TAxyz', 'bondAngles', 'DBxV', 'Cell', 'iDAx', 'DAv', 'Trans', 'iDBx']
None
null
0
0
0
null
0
null
The function (GetRMCAngles) defined within the public class called public.The function start at line 4427 and ends at 4450. It contains 24 lines of code and it has a cyclomatic complexity of 10. It takes 4 parameters, represented as [4427.0] and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
ISO2PDFfit
def ISO2PDFfit(Phase):''' Creates new phase structure to be used for PDFfit from an ISODISTORT mode displacement phase.It builds the distortion mode parameters to be used as PDFfit variables for atom displacements fromthe original parent positions as transformed to the child cell wiht symmetry defined from ISODISTORT.:...
13
51
1
551
17
4,452
4,511
4,452
null
['SGOps', 'Vvec', 'Uvec', 'ModeMatrix', 'atmConstr', 'ISOdict', 'conStr', 'Norms', 'newPhase', 'Phase', 'parentXYZ', 'Atoms', 'pid', 'RMCPdict', 'consVec', 'Trans', 'SGData']
None
null
0
0
0
null
0
null
The function (ISO2PDFfit) defined within the public class called public.The function start at line 4452 and ends at 4511. It contains 51 lines of code and it has a cyclomatic complexity of 13. The function does not take any parameters and does not return any value..
AdvancedPhotonSource_GSAS-II
public
public
0
0
GetAtmDispList
def GetAtmDispList(ISOdata):atmDispList = []MT = ISOdata['Mode2VarMatrix'].TDispList = ISOdata['IsoVarList']N = len(DispList)for I in range(N):vary = []for i in range(N):if MT[I,i]:vary.append(DispList[i])atmDispList.append(vary)return atmDispList
4
12
1
74
5
4,513
4,524
4,513
null
['DispList', 'MT', 'vary', 'atmDispList', 'N']
None
null
0
0
0
null
0
null
The function (GetAtmDispList) defined within the public class called public.The function start at line 4513 and ends at 4524. It contains 12 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..