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 | REFDRefine.__init__ | def __init__(self, xmin, xmax, stepsize=0.5):self.xmin = xminself.xmax = xmaxself.stepsize = stepsize | 1 | 4 | 4 | 30 | 0 | 4,532 | 4,535 | 4,532 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (REFDRefine.__init__) defined within the public class called public.The function start at line 4532 and ends at 4535. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [4532.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | REFDRefine.__call__ | def __call__(self, x):"""take a random step but ensure the new position is within the bounds"""while True:# this could be done in a much more clever way, but it will work for example purposessteps = self.xmax-self.xminxnew = x + np.random.uniform(-self.stepsize*steps, self.stepsize*steps, np.shape(x))if np.all(xnew < s... | 4 | 7 | 2 | 76 | 0 | 4,537 | 4,545 | 4,537 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (REFDRefine.__call__) defined within the public class called public.The function start at line 4537 and ends at 4545. It contains 7 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [4537.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | REFDRefine.GetModelParms | def GetModelParms():parmDict = {}varyList = []values = []bounds = []parmDict['dQ type'] = data['dQ type']parmDict['Res'] = data['Resolution'][0]/(100.*sateln2) #% FWHM-->decimal sigfor parm in ['Scale','FltBack']:parmDict[parm] = data[parm][0]if data[parm][1]:varyList.append(parm)values.append(data[parm][0])bounds.appe... | 8 | 34 | 0 | 356 | 0 | 4,547 | 4,580 | 4,547 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (REFDRefine.GetModelParms) defined within the public class called public.The function start at line 4547 and ends at 4580. It contains 34 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 | REFDRefine.SetModelParms | def SetModelParms():line = ' Refined parameters: Histogram scale: %.4g'%(parmDict['Scale'])if 'Scale' in varyList:data['Scale'][0] = parmDict['Scale']line += ' esd: %.4g'%(sigDict['Scale'])G2fil.G2Print (line)line = ' Flat background: %15.4g'%(parmDict['FltBack'])if 'FltBack' in varyList:data['FltBack'][0] = parmDict['... | 8 | 29 | 0 | 281 | 0 | 4,582 | 4,610 | 4,582 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (REFDRefine.SetModelParms) defined within the public class called public.The function start at line 4582 and ends at 4610. It contains 29 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 | REFDRefine.calcREFD | def calcREFD(values,Q,Io,wt,Qsig,parmDict,varyList):parmDict.update(zip(varyList,values))M = np.sqrt(wt)*(getREFD(Q,Qsig,parmDict)-Io)return M | 1 | 4 | 7 | 51 | 0 | 4,612 | 4,615 | 4,612 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (REFDRefine.calcREFD) defined within the public class called public.The function start at line 4612 and ends at 4615. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 7 parameters, represented as [4612.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | REFDRefine.sumREFD | def sumREFD(values,Q,Io,wt,Qsig,parmDict,varyList):parmDict.update(zip(varyList,values))M = np.sqrt(wt)*(getREFD(Q,Qsig,parmDict)-Io)return np.sum(M**2) | 1 | 4 | 7 | 58 | 0 | 4,617 | 4,620 | 4,617 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (REFDRefine.sumREFD) defined within the public class called public.The function start at line 4617 and ends at 4620. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 7 parameters, represented as [4617.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | REFDRefine.getREFD | def getREFD(Q,Qsig,parmDict):Ic = np.ones_like(Q)*parmDict['FltBack']Scale = parmDict['Scale']Nlayers = parmDict['nLayers']Res = parmDict['Res']depth = np.zeros(Nlayers)rho = np.zeros(Nlayers)irho = np.zeros(Nlayers)sigma = np.zeros(Nlayers)for ilay,lay in enumerate(parmDict['Layer Seq']):cid = str(lay)+';'depth[ilay] ... | 7 | 29 | 3 | 309 | 0 | 4,622 | 4,650 | 4,622 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (REFDRefine.getREFD) defined within the public class called public.The function start at line 4622 and ends at 4650. It contains 29 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [4622.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | REFDRefine.estimateT0 | def estimateT0(takestep):Mmax = -1.e-10Mmin = 1.e10for i in range(100):x0 = takestep(values)M = sumREFD(x0,Q[Ibeg:Ifin],Io[Ibeg:Ifin],wtFactor*wt[Ibeg:Ifin],Qsig[Ibeg:Ifin],parmDict,varyList)Mmin = min(M,Mmin)MMax = max(M,Mmax)return 1.5*(MMax-Mmin) | 2 | 9 | 1 | 98 | 0 | 4,652 | 4,660 | 4,652 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (REFDRefine.estimateT0) defined within the public class called public.The function start at line 4652 and ends at 4660. It contains 9 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | REFDRefine | def REFDRefine(Profile,ProfDict,Inst,Limits,Substances,data):G2fil.G2Print ('fit REFD data by '+data['Minimizer']+' using %.2f%% data resolution'%(data['Resolution'][0]))class RandomDisplacementBounds(object):"""random displacement with bounds"""def __init__(self, xmin, xmax, stepsize=0.5):self.xmin = xminself.xmax = x... | 14 | 111 | 6 | 1,264 | 50 | 4,527 | 4,761 | 4,527 | null | ['T0', 'covM', 'values', 'depth', 'cid', 'Nlayers', 'Rvals', 'rho', 'Ifin', 'covMatrix', 'Mmax', 'steps', 'wt', 'xnew', 'bound', 'M', 'sigma', 'x0', 'line', 'line2', 'xyrng', 'Ibeg', 'parmDict', 'Negs', 'varyList', 'Msg', 'bounds', 'name', 'Bounds', 'MMax', 'Scale', 'Ic', 'AB', 'result', 'chisq', 'irho', 'sigDict', 'Qm... | None | null | 0 | 0 | 0 | null | 0 | null | The function (REFDRefine) defined within the public class called public.The function start at line 4527 and ends at 4761. It contains 111 lines of code and it has a cyclomatic complexity of 14. It takes 6 parameters, represented as [4527.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | makeSLDprofile | def makeSLDprofile(data,Substances):sq2 = np.sqrt(2.)laySeq = ['0',]+data['Layer Seq'].split()+[str(len(data['Layers'])-1),]Nlayers = len(laySeq)laySeq = np.array(laySeq,dtype=int)interfaces = np.zeros(Nlayers)rho = np.zeros(Nlayers)sigma = np.zeros(Nlayers)name = data['Layers'][0]['Name']thick = 0.for ilay,lay in enum... | 8 | 39 | 2 | 447 | 17 | 4,763 | 4,802 | 4,763 | null | ['sq2', 'laySeq', 'rho', 'thick', 'irho', 'iBeg', 'interfaces', 'x', 'y', 'name', 'layer', 'delt', 'iPos', 'rrho', 'Nlayers', 'xr', 'sigma'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (makeSLDprofile) defined within the public class called public.The function start at line 4763 and ends at 4802. It contains 39 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [4763.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | REFDModelFxn | def REFDModelFxn(Profile,Inst,Limits,Substances,data):Q,Io,wt,Ic,Ib,Qsig = Profile[:6]Qmin = Limits[1][0]Qmax = Limits[1][1]iBeg = np.searchsorted(Q,Qmin)iFin = np.searchsorted(Q,Qmax)+1#include last pointIb[:] = data['FltBack'][0]Ic[:] = 0Scale = data['Scale'][0]if data['Layer Seq'] == []:returnlaySeq = ['0',]+data['L... | 9 | 40 | 5 | 485 | 15 | 4,804 | 4,844 | 4,804 | null | ['laySeq', 'rho', 'irho', 'res', 'iBeg', 'iFin', 'Qmin', 'depth', 'Qmax', 'name', 'layer', 'Scale', 'AB', 'Nlayers', 'sigma'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (REFDModelFxn) defined within the public class called public.The function start at line 4804 and ends at 4844. It contains 40 lines of code and it has a cyclomatic complexity of 9. It takes 5 parameters, represented as [4804.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | abeles.calc | def calc(kz, depth, rho, irho, sigma):if len(kz) == 0: return kz# Complex index of refraction is relative to the incident medium.# We can get the same effect using kz_rel^2 = kz^2 + 4*pi*rho_o# in place of kz^2, and ignoring rho_okz_sq = kz**2 + 4e-6*np.pi*rho[:,0]k = kz# According to Heavens, the initial matrix should... | 5 | 27 | 5 | 263 | 0 | 4,870 | 4,913 | 4,870 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (abeles.calc) defined within the public class called public.The function start at line 4870 and ends at 4913. It contains 27 lines of code and it has a cyclomatic complexity of 5. It takes 5 parameters, represented as [4870.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | abeles | def abeles(kz, depth, rho, irho=0, sigma=0):"""Optical matrix form of the reflectivity calculation.O.S. Heavens, Optical Properties of Thin Solid FilmsReflectometry as a function of kz for a set of slabs.:param kz: float[n] (1/Ang). Scattering vector, :math:`2\\pi\\sin(\\theta)/\\lambda`.This is :math:`\\tfrac12 Q_z`.:... | 5 | 12 | 5 | 161 | 21 | 4,846 | 4,930 | 4,846 | null | ['B21', 'B11', 'depth', 'rho', 'M12', 'M11', 'kz', 'M21', 'sigma', 'r', 'm', 'k_next', 'B12', 'irho', 'B22', 'M22', 'k', 'C1', 'F', 'C2', 'kz_sq'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (abeles) defined within the public class called public.The function start at line 4846 and ends at 4930. It contains 12 lines of code and it has a cyclomatic complexity of 5. It takes 5 parameters, represented as [4846.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | SmearAbeles | def SmearAbeles(kz,dq, depth, rho, irho=0, sigma=0):y = abeles(kz, depth, rho, irho, sigma)s = dq/2.y += 0.1354*(abeles(kz+2*s, depth, rho, irho, sigma)+abeles(kz-2*s, depth, rho, irho, sigma))y += 0.24935*(abeles(kz-5*s/3., depth, rho, irho, sigma)+abeles(kz+5*s/3., depth, rho, irho, sigma))y += 0.4111*(abeles(kz-4*s/... | 1 | 11 | 6 | 309 | 2 | 4,932 | 4,942 | 4,932 | null | ['s', 'y'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (SmearAbeles) defined within the public class called public.The function start at line 4932 and ends at 4942. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [4932.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | makeRefdFFT | def makeRefdFFT(Limits,Profile):G2fil.G2Print ('make fft')Q,Io = Profile[:2]Qmin = Limits[1][0]Qmax = Limits[1][1]iBeg = np.searchsorted(Q,Qmin)iFin = np.searchsorted(Q,Qmax)+1#include last pointQf = np.linspace(0.,Q[iFin-1],5000)QI = si.interp1d(Q[iBeg:iFin],Io[iBeg:iFin],bounds_error=False,fill_value=0.0)If = QI(Qf)*... | 1 | 13 | 2 | 146 | 9 | 4,944 | 4,956 | 4,944 | null | ['iBeg', 'iFin', 'Qmin', 'R', 'QI', 'Qmax', 'Qf', 'F', 'If'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (makeRefdFFT) defined within the public class called public.The function start at line 4944 and ends at 4956. It contains 13 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [4944.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | GetStackParms | def GetStackParms(Layers):Parms = []#cell parmsif Layers['Laue'] in ['-3','-3m','4/m','4/mmm','6/m','6/mmm']:Parms.append('cellA')Parms.append('cellC')else:Parms.append('cellA')Parms.append('cellB')Parms.append('cellC')if Layers['Laue'] != 'mmm':Parms.append('cellG')#Transition parmsfor iY in range(len(Layers['Layers']... | 5 | 18 | 1 | 153 | 1 | 4,960 | 4,980 | 4,960 | null | ['Parms'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (GetStackParms) defined within the public class called public.The function start at line 4960 and ends at 4980. It contains 18 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 | StackSim | def StackSim(Layers,ctrls,scale=0.,background={},limits=[],inst={},profile=[]):'''Simulate powder or selected area diffraction pattern from stacking faults using DIFFaX:param dict Layers: dict with following items:: {'Laue':'-1','Cell':[False,1.,1.,1.,90.,90.,90,1.], 'Width':[[10.,10.],[False,False]],'Toler':0.01,'AtIn... | 39 | 158 | 7 | 1,650 | 32 | 4,982 | 5,163 | 4,982 | null | ['iBeg', 'iFin', 'laue', 'text', 'gam', 'path', 'inst', 'cf', 'p', 'sf', 'atTypes', 'Sadp', 'HW', 'x0', 'DIFFaX', 'Z', 'Dx', 'V', 'Xpat', 'df', 'rv', 'layerNames', 'U', 'HWHM', 'Slen', 'iF', 'time0', 'sumPx', 'iB', 'blen', 'Adat', 'W'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (StackSim) defined within the public class called public.The function start at line 4982 and ends at 5163. It contains 158 lines of code and it has a cyclomatic complexity of 39. It takes 7 parameters, represented as [4982.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | SetPWDRscan | def SetPWDRscan(inst,limits,profile):wave = G2mth.getMeanWave(inst)x0 = profile[0]iBeg = np.searchsorted(x0,limits[0])iFin = np.searchsorted(x0,limits[1])if iFin-iBeg > 20000:iFin = iBeg+20000Dx = (x0[iFin]-x0[iBeg])/(iFin-iBeg)pyx.pygetinst(wave,x0[iBeg],x0[iFin],Dx)return iFin-iBeg | 2 | 10 | 3 | 102 | 5 | 5,165 | 5,175 | 5,165 | null | ['Dx', 'iBeg', 'iFin', 'wave', 'x0'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (SetPWDRscan) defined within the public class called public.The function start at line 5165 and ends at 5175. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [5165.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | SetStackingSF | def SetStackingSF(Layers,debug):# Load scattering factors into DIFFaX arraysfrom . import atmdataatTypes = Layers['AtInfo'].keys()aTypes = []for atype in atTypes:aTypes.append('%4s'%(atype.ljust(4)))SFdat = []for atType in atTypes:Adat = atmdata.XrayFF[atType]SF = np.zeros(9)SF[:8:2] = Adat['fa']SF[1:8:2] = Adat['fb']S... | 3 | 16 | 2 | 135 | 5 | 5,177 | 5,193 | 5,177 | null | ['atTypes', 'SFdat', 'aTypes', 'SF', 'Adat'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (SetStackingSF) defined within the public class called public.The function start at line 5177 and ends at 5193. It contains 16 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [5177.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | SetStackingClay | def SetStackingClay(Layers,Type):# Controlsrand.seed()ranSeed = rand.randint(1,2**16-1)try:laueId = ['-1','2/m(ab)','2/m(c)','mmm','-3','-3m','4/m','4/mmm','6/m','6/mmm'].index(Layers['Laue'])+1except ValueError:#for 'unknown'laueId = -1if 'SADP' in Type:planeId = ['h0l','0kl','hhl','h-hl'].index(Layers['Sadp']['Plane'... | 7 | 33 | 2 | 284 | 12 | 5,195 | 5,229 | 5,195 | null | ['StkSeq', 'ranSeed', 'laueId', 'Wdth', 'StkParm', 'Nstk', 'controls', 'LaueSym', 'planeId', 'lmax', 'mult', 'StkType'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (SetStackingClay) defined within the public class called public.The function start at line 5195 and ends at 5229. It contains 33 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [5195.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | SetCellAtoms | def SetCellAtoms(Layers):Cell = Layers['Cell'][1:4]+Layers['Cell'][6:7]# atoms in layersatTypes = list(Layers['AtInfo'].keys())AtomXOU = []AtomTp = []LayerSymm = []LayerNum = []layerNames = []Natm = 0Nuniq = 0for layer in Layers['Layers']:layerNames.append(layer['Name'])for il,layer in enumerate(Layers['Layers']):if la... | 6 | 33 | 1 | 286 | 11 | 5,231 | 5,264 | 5,231 | null | ['layerNames', 'atTypes', 'LayerNum', 'Ta', 'AtomTp', 'AtomXOU', 'Cell', 'Nuniq', 'Nlayers', 'LayerSymm', 'Natm'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (SetCellAtoms) defined within the public class called public.The function start at line 5231 and ends at 5264. It contains 33 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 | SetStackingTrans | def SetStackingTrans(Layers,Nlayers):# TransitionsTransX = []TransP = []for Ytrans in Layers['Transitions']:TransP.append([trans[0] for trans in Ytrans]) #get just the numbersTransX.append([trans[1:4] for trans in Ytrans]) #get just the numbersTransP = np.array(TransP,dtype='float').TTransX = np.array(TransX,dtype='flo... | 4 | 9 | 2 | 91 | 2 | 5,266 | 5,276 | 5,266 | null | ['TransP', 'TransX'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (SetStackingTrans) defined within the public class called public.The function start at line 5266 and ends at 5276. It contains 9 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [5266.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | CalcStackingPWDR | def CalcStackingPWDR(Layers,scale,background,limits,inst,profile,debug):# Scattering factorsSetStackingSF(Layers,debug)# Controls & sequenceslaueId,controls = SetStackingClay(Layers,'PWDR')# cell & atomsNlayers = SetCellAtoms(Layers)Volume = Layers['Cell'][7]# TransitionsSetStackingTrans(Layers,Nlayers)# PWDR scanNstep... | 6 | 51 | 7 | 695 | 17 | 5,278 | 5,334 | 5,278 | null | ['Volume', 'U', 'HWHM', 'iBeg', 'iFin', 'Z', 'Nsteps', 'HW', 'BrdSpec', 'Nspec', 'time0', 'V', 'spec', 'W', 'Nlayers', 'rv', 'x0'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (CalcStackingPWDR) defined within the public class called public.The function start at line 5278 and ends at 5334. It contains 51 lines of code and it has a cyclomatic complexity of 6. It takes 7 parameters, represented as [5278.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | CalcStackingSADP | def CalcStackingSADP(Layers,debug):# Scattering factorsSetStackingSF(Layers,debug)# Controls & sequenceslaueId,controls = SetStackingClay(Layers,'SADP')# cell & atomsNlayers = SetCellAtoms(Layers)# TransitionsSetStackingTrans(Layers,Nlayers)# result as SadpNspec = 20001spec = np.zeros(Nspec,dtype='double')time0 = time.... | 5 | 28 | 2 | 250 | 9 | 5,336 | 5,369 | 5,336 | null | ['iF', 'p1', 'time0', 'Nspec', 'iB', 'spec', 'p2', 'Sapd', 'Nlayers'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (CalcStackingSADP) defined within the public class called public.The function start at line 5336 and ends at 5369. It contains 28 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [5336.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | makePRFfile | def makePRFfile(data,MEMtype):''' makes Dysnomia .prf control file from Dysnomia GUI controls:param dict data: GSAS-II phase data:param int MEMtype: 1 for neutron data with negative scattering lengths0 otherwise:returns str: name of Dysnomia control file'''generalData = data['General']pName = generalData['Name'].replac... | 5 | 40 | 2 | 285 | 5 | 5,372 | 5,419 | 5,372 | null | ['prfName', 'generalData', 'DysData', 'prf', 'pName'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (makePRFfile) defined within the public class called public.The function start at line 5372 and ends at 5419. It contains 40 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [5372.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | makeMEMfile | def makeMEMfile(data,reflData,MEMtype,DYSNOMIA):''' make Dysnomia .mem file of reflection data, etc.:param dict data: GSAS-II phase data:param list reflData: GSAS-II reflection data:param int MEMtype: 1 for neutron data with negative scattering lengths0 otherwise:param str DYSNOMIA: path to dysnomia.exe'''DysData = dat... | 31 | 141 | 4 | 1,227 | 46 | 5,421 | 5,574 | 5,421 | null | ['sumpos', 'Map', 'sumneg', 'Fobs', 'Nref', 'DysData', 'AtInfo', 'delt', 'cell', 'Type', 'refSet', 'g', 'nref2', 'hkl', 'prevpos', 'ovlp', 'iref', 'SGId', 'mapsize', 's', 'theta', 'memName', 'SGSym', 'SGData', 'refDict', 'dmin', 'Gsum', 'UseList', 'refs1', 'Msum', 'TOFlam', 'org', 'pName', 'A', 'start', 'pos', 'refs', ... | None | null | 0 | 0 | 0 | null | 0 | null | The function (makeMEMfile) defined within the public class called public.The function start at line 5421 and ends at 5574. It contains 141 lines of code and it has a cyclomatic complexity of 31. It takes 4 parameters, represented as [5421.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | MEMupdateReflData | def MEMupdateReflData(prfName,data,reflData):''' Update reflection data with new Fosq, phase result from Dysnomia:param str prfName: phase.mem file name:param list reflData: GSAS-II reflection data'''generalData = data['General']Map = generalData['Map']Type = Map['Type']cell = generalData['Cell'][1:7]A = G2lat.cell2A(c... | 7 | 43 | 3 | 450 | 21 | 5,576 | 5,624 | 5,576 | null | ['l', 'Map', 'Nref', 'info', 'Fosq', 'fba', 'cell', 'Type', 'd', 'newRefs', 'fbaName', 'reflDict', 'fbalines', 'phase', 'h', 'A', 'FoR', 'k', 'generalData', 'FoI', 'refId'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (MEMupdateReflData) defined within the public class called public.The function start at line 5576 and ends at 5624. It contains 43 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [5576.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | conv_Lauefringe | def conv_Lauefringe(self):"""Compute the FT of the Laue Fringe function"""me=self.get_function_name() #the name of this convolver,as a stringwave = self.param_dicts['conv_global']['dominant_wavelength']*1.e10 # in Apos = np.rad2deg(self.param_dicts["conv_global"]["twotheta0"])# peak position as 2theta in degposQ = np.p... | 1 | 23 | 1 | 360 | 0 | 5,630 | 5,654 | 5,630 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (conv_Lauefringe) defined within the public class called public.The function start at line 5630 and ends at 5654. It contains 23 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 | conv_Lorentzian | def conv_Lorentzian(self):"""Compute the FT of a Lorentz function where gamma is the FWHM"""ttwid = self.twotheta_window_fullwidth_degme=self.get_function_name() #the name of this convolver,as a stringg2gam = self.param_dicts[me]['g2gam'] # gsas-ii gamma in centidegreesgamma = g2gam/100 # degttlist = np.linspace(-ttwid... | 1 | 10 | 1 | 102 | 0 | 5,656 | 5,666 | 5,656 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (conv_Lorentzian) defined within the public class called public.The function start at line 5656 and ends at 5666. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | conv_Gaussian | def conv_Gaussian(self):"""Compute the FT of a Gaussian where sigma**2 is the variance"""ttwid = self.twotheta_window_fullwidth_degme=self.get_function_name() #the name of this convolver,as a stringg2sig2 = self.param_dicts[me]['g2sig2'] # gsas-ii sigma**2 in centidegr**2sigma = math.sqrt(g2sig2)/100.ttlist = np.linspa... | 1 | 10 | 1 | 116 | 0 | 5,668 | 5,678 | 5,668 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (conv_Gaussian) defined within the public class called public.The function start at line 5668 and ends at 5678. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | LaueFringePeakCalc | def LaueFringePeakCalc(ttArr,intArr,lam,peakpos,intens,sigma2,gamma,shol,ncells,clat,dampM,dampP,calcwid,fitPowerM=2,fitPowerP=2,plot=False):'''Compute the peakshape for a Laue Fringe peak convoluted with a Gaussian, Lorentzian &an axial divergence asymmetry correction.:param np.array ttArr: Array of two-theta values (... | 10 | 76 | 16 | 612 | 17 | 5,680 | 5,818 | 5,680 | null | ['pkMax', 'pstart', 'offset', 'center_bin_idx', 'NISTparms', 'step', 'startInd', 'pend', 'convList', 'diffRadius', 'axial_factor', 'peakObj', 'pkPts', 'istart', 'NISTpk', 'iend', 'equatorial_divergence_deg'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (LaueFringePeakCalc) defined within the public class called public.The function start at line 5680 and ends at 5818. It contains 76 lines of code and it has a cyclomatic complexity of 10. It takes 16 parameters, represented as [5680.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | LaueSatellite | def LaueSatellite(peakpos,wave,c,ncell,j=[-4,-3,-2,-1,0,1,2,3,4]):'''Returns the locations of the Laue satellite positions relativeto the peak position:param float peakpos: the peak position in degrees 2theta:param float ncell: Laue fringe parameter, number of unit cells in layer:param list j: the satellite order, wher... | 1 | 4 | 5 | 118 | 2 | 5,822 | 5,834 | 5,822 | null | ['Qpos', 'dQvals'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (LaueSatellite) defined within the public class called public.The function start at line 5822 and ends at 5834. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [5822.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | SetDefaultSubstances | def SetDefaultSubstances():'Fills in default items for the SASD Substances dictionary'return {'Substances':{'vacuum':{'Elements':{},'Volume':1.0,'Density':0.0,'Scatt density':0.0,'XImag density':0.0},'unit scatter':{'Elements':None,'Volume':None,'Density':None,'Scatt density':1.0,'XImag density':1.0}}} | 1 | 4 | 0 | 72 | 0 | 5,836 | 5,839 | 5,836 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (SetDefaultSubstances) defined within the public class called public.The function start at line 5836 and ends at 5839. 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 | SetDefaultSASDModel | def SetDefaultSASDModel():'Fills in default items for the SASD Models dictionary'return {'Back':[0.0,False],'Size':{'MinDiam':50,'MaxDiam':10000,'Nbins':100,'logBins':True,'Method':'MaxEnt','Distribution':[],'Shape':['Spheroid',1.0],'MaxEnt':{'Niter':100,'Precision':0.01,'Sky':-3},'IPG':{'Niter':100,'Approach':0.8,'Pow... | 1 | 15 | 0 | 246 | 0 | 5,841 | 5,855 | 5,841 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (SetDefaultSASDModel) defined within the public class called public.The function start at line 5841 and ends at 5855. It contains 15 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 | SetDefaultREFDModel | def SetDefaultREFDModel():'''Fills in default items for the REFD Models dictionary which aredefined as follows for each layer:* Name: name of substance* Thick: thickness of layer in Angstroms (not present for top & bottom layers)* Rough: upper surface roughness for layer (not present for toplayer)* Penetration: mixing ... | 1 | 6 | 0 | 154 | 0 | 5,857 | 5,875 | 5,857 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (SetDefaultREFDModel) defined within the public class called public.The function start at line 5857 and ends at 5875. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | TestData | def TestData():'needs a doc string'#global NeedTestDataglobal bakTypebakType = 'chebyschev'global xdataxdata = np.linspace(4.0,40.0,36000)global parmDict0parmDict0 = {'pos0':5.6964,'int0':8835.8,'sig0':1.0,'gam0':1.0,'pos1':11.4074,'int1':3922.3,'sig1':1.0,'gam1':1.0,'pos2':20.6426,'int2':1573.7,'sig2':1.0,'gam2':1.0,'... | 1 | 35 | 0 | 513 | 6 | 5,879 | 5,915 | 5,879 | null | ['parmDict1', 'varyList', 'parmDict2', 'bakType', 'xdata', 'parmDict0'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (TestData) defined within the public class called public.The function start at line 5879 and ends at 5915. It contains 35 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | test0 | def test0():if NeedTestData: TestData()gplot = plotter.add('FCJ-Voigt, 11BM').gca()gplot.plot(xdata,getBackground('',parmDict0,bakType,'PXC',xdata)[0])gplot.plot(xdata,getPeakProfile(parmDict0,xdata,np.zeros_like(xdata),varyList,bakType))fplot = plotter.add('FCJ-Voigt, Ka1+2').gca()fplot.plot(xdata,getBackground('',par... | 2 | 8 | 0 | 126 | 2 | 5,917 | 5,924 | 5,917 | null | ['gplot', 'fplot'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test0) defined within the public class called public.The function start at line 5917 and ends at 5924. It contains 8 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 | test1 | def test1():if NeedTestData: TestData()time0 = time.time()for i in range(100):getPeakProfile(parmDict1,xdata,np.zeros_like(xdata),varyList,bakType)G2fil.G2Print ('100+6*Ka1-2 peaks=1200 peaks %.2f'%time.time()-time0) | 3 | 6 | 0 | 56 | 1 | 5,926 | 5,931 | 5,926 | null | ['time0'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test1) defined within the public class called public.The function start at line 5926 and ends at 5931. It contains 6 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 | test2 | def test2(name,delt):if NeedTestData: TestData()varyList = [name,]xdata = np.linspace(5.6,5.8,400)hplot = plotter.add('derivatives test for '+name).gca()hplot.plot(xdata,getPeakProfileDerv(parmDict2,xdata,np.zeros_like(xdata),varyList,bakType)[0])y0 = getPeakProfile(parmDict2,xdata,np.zeros_like(xdata),varyList,bakType... | 2 | 10 | 2 | 136 | 5 | 5,933 | 5,942 | 5,933 | null | ['y1', 'varyList', 'xdata', 'hplot', 'y0'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test2) defined within the public class called public.The function start at line 5933 and ends at 5942. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [5933.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | test3 | def test3(name,delt):if NeedTestData: TestData()names = ['pos','sig','gam','shl']idx = names.index(name)myDict = {'pos':parmDict2['pos0'],'sig':parmDict2['sig0'],'gam':parmDict2['gam0'],'shl':parmDict2['SH/L']}xdata = np.linspace(5.6,5.8,800)dx = xdata[1]-xdata[0]hplot = plotter.add('derivatives test for '+name).gca()h... | 2 | 13 | 2 | 225 | 8 | 5,944 | 5,956 | 5,944 | null | ['myDict', 'y1', 'dx', 'names', 'xdata', 'idx', 'hplot', 'y0'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test3) defined within the public class called public.The function start at line 5944 and ends at 5956. It contains 13 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [5944.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | SetLattice | def SetLattice(controls):'''impose constraints on lattice constaints and determine theBravias lattice index (ibrav) as used in cellGUIlist'''ibrav = bravaisSymb.index(controls[5])if controls[5] in ['Fm3m','Im3m','Pm3m']:controls[7] = controls[8] = controls[6]controls[9] = controls[10] = controls[11] = 90.elif controls[... | 6 | 16 | 1 | 211 | 1 | 95 | 113 | 95 | null | ['ibrav'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (SetLattice) defined within the public class called public.The function start at line 95 and ends at 113. 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 | __init__ | def __init__(self,parent,title,controls,SGData,items,phaseDict,ifPick=False):wx.Dialog.__init__(self,parent,-1,title,pos=wx.DefaultPosition,style=wx.DEFAULT_DIALOG_STYLE)self.panel = Noneself.controls = controlsself.SGData = SGData #for parent phaseself.items = itemsself.phaseDict = phaseDictself.Pick = 0self.ifPick = ... | 1 | 11 | 8 | 88 | 0 | 121 | 132 | 121 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__init__) defined within the public class called public.The function start at line 121 and ends at 132. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 8 parameters, represented as [121.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | Draw.RefreshGrid | def RefreshGrid(event):r,c =event.GetRow(),event.GetCol()br = self.items[r]phase = self.phaseDict[br]rLab = magDisplay.GetRowLabelValue(r)pname = '(%s) %s'%(rLab,phase['Name'])if c == 0:mSGData = phase['SGData']text,table = G2spc.SGPrint(mSGData,AddInv=True)if 'magAtms' in phase:msg = 'Magnetic space group information'... | 12 | 62 | 1 | 562 | 0 | 136 | 198 | 136 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (Draw.RefreshGrid) defined within the public class called public.The function start at line 136 and ends at 198. It contains 62 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 | Draw | def Draw(self):def RefreshGrid(event):r,c =event.GetRow(),event.GetCol()br = self.items[r]phase = self.phaseDict[br]rLab = magDisplay.GetRowLabelValue(r)pname = '(%s) %s'%(rLab,phase['Name'])if c == 0:mSGData = phase['SGData']text,table = G2spc.SGPrint(mSGData,AddInv=True)if 'magAtms' in phase:msg = 'Magnetic space gro... | 8 | 51 | 1 | 585 | 0 | 134 | 250 | 134 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (Draw) defined within the public class called public.The function start at line 134 and ends at 250. It contains 51 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 | GetSelection | def GetSelection(self):return self.Pick | 1 | 2 | 1 | 9 | 0 | 252 | 253 | 252 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (GetSelection) defined within the public class called public.The function start at line 252 and ends at 253. 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 | OnOk | def OnOk(self,event):parent = self.GetParent()parent.Raise()self.EndModal(wx.ID_OK) | 1 | 4 | 2 | 27 | 0 | 255 | 258 | 255 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (OnOk) defined within the public class called public.The function start at line 255 and ends at 258. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [255.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | __init__ | def __init__(self,parent):wx.Dialog.__init__(self,parent,-1,'Background radial distribution function',pos=wx.DefaultPosition,style=wx.DEFAULT_DIALOG_STYLE)self.panel = Noneself.result = {'UseObsCalc':'obs-calc','maxR':20.0,'Smooth':'linear'}self.Draw() | 1 | 6 | 2 | 63 | 0 | 262 | 268 | 262 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__init__) defined within the public class called public.The function start at line 262 and ends at 268. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [262.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | Draw.OnUseOC | def OnUseOC(event):self.result['UseObsCalc'] = useOC.GetValue() | 1 | 2 | 1 | 17 | 0 | 272 | 273 | 272 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (Draw.OnUseOC) defined within the public class called public.The function start at line 272 and ends at 273. 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 | Draw.OnSmCombo | def OnSmCombo(event):self.result['Smooth'] = smCombo.GetValue() | 1 | 2 | 1 | 17 | 0 | 275 | 276 | 275 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (Draw.OnSmCombo) defined within the public class called public.The function start at line 275 and ends at 276. 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 | Draw | def Draw(self):def OnUseOC(event):self.result['UseObsCalc'] = useOC.GetValue()def OnSmCombo(event):self.result['Smooth'] = smCombo.GetValue()if self.panel: self.panel.Destroy()self.panel = wx.Panel(self)mainSizer = wx.BoxSizer(wx.VERTICAL)mainSizer.Add(wx.StaticText(self.panel,label='Background RDF controls:'),0)plotTy... | 2 | 42 | 1 | 495 | 0 | 270 | 318 | 270 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (Draw) defined within the public class called public.The function start at line 270 and ends at 318. It contains 42 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 | GetSelection | def GetSelection(self):return self.Pick | 1 | 2 | 1 | 9 | 0 | 320 | 321 | 252 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (GetSelection) defined within the public class called public.The function start at line 320 and ends at 321. 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 | OnOk | def OnOk(self,event):parent = self.GetParent()parent.Raise()self.EndModal(wx.ID_OK) | 1 | 4 | 2 | 27 | 0 | 323 | 326 | 255 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (OnOk) defined within the public class called public.The function start at line 323 and ends at 326. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [255.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | OnCancel | def OnCancel(self,event):parent = self.GetParent()parent.Raise()self.EndModal(wx.ID_CANCEL) | 1 | 4 | 2 | 27 | 0 | 328 | 331 | 328 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (OnCancel) defined within the public class called public.The function start at line 328 and ends at 331. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [328.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | GetFileBackground | def GetFileBackground(G2frame,xye,background,scale=True):''' Select a background file to subtract from PWDR patternparam: xye list [npts,6] of PWDR patternparam: background PWDR file to be used as backgroundparam: scale bool:=True if scale mult included in background & apply itreturns: list background to subtract'''bxy... | 5 | 16 | 4 | 131 | 3 | 338 | 359 | 338 | null | ['bId', 'bxye', 'mult'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (GetFileBackground) defined within the public class called public.The function start at line 338 and ends at 359. It contains 16 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [338.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | IsHistogramInAnyPhase | def IsHistogramInAnyPhase(G2frame,histoName):'''Tests a Histogram to see if it is linked to any phases.Returns the name of the first phase where the histogram is used.'''phases = G2gd.GetGPXtreeItemId(G2frame,G2frame.root,'Phases')if phases:item, cookie = G2frame.GPXtree.GetFirstChild(phases)while item:data = G2frame.G... | 4 | 13 | 2 | 94 | 3 | 361 | 376 | 361 | null | ['histoList', 'data', 'phases'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (IsHistogramInAnyPhase) defined within the public class called public.The function start at line 361 and ends at 376. It contains 13 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [361.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | GetPhasesforHistogram | def GetPhasesforHistogram(G2frame,histoName):'''Returns phases (if any) associated with provided HistogramReturns a list of phase dicts'''phList = []Histograms,Phases = G2frame.GetUsedHistogramsAndPhasesfromTree()for ph in Phases:if histoName in Phases[ph]['Histograms']:phList.append(Phases[ph])return phList | 3 | 7 | 2 | 48 | 1 | 378 | 387 | 378 | null | ['phList'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (GetPhasesforHistogram) defined within the public class called public.The function start at line 378 and ends at 387. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [378.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | SetupSampleLabels | def SetupSampleLabels(histName,dataType,histType):'''Setup a list of labels and number formatting for use inlabeling sample parameters.:param str histName: Name of histogram, ("PWDR ..."):param str dataType:'''parms = []parms.append(['Scale','Histogram scale factor: ',[10,7]])if histType[2] in ['A','B','C']:parms.appen... | 7 | 30 | 3 | 371 | 1 | 389 | 423 | 389 | null | ['parms'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (SetupSampleLabels) defined within the public class called public.The function start at line 389 and ends at 423. It contains 30 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [389.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | GetFileList | def GetFileList(G2frame,fileType):''' Get list of file names containing a particular stringparam: fileType str: any string within a file namereturns: list of file names from GSAS-II treeNote routine of same name in GSASIIdataGUI; it has a skip option'''fileList = []Id, cookie = G2frame.GPXtree.GetFirstChild(G2frame.roo... | 3 | 9 | 2 | 75 | 2 | 425 | 438 | 425 | null | ['fileList', 'name'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (GetFileList) defined within the public class called public.The function start at line 425 and ends at 438. It contains 9 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [425.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | GetHistsLikeSelected | def GetHistsLikeSelected(G2frame):'''Get the histograms that match the current selected one:The histogram prefix and data type (PXC etc.), the number ofwavelengths and the instrument geometry (Debye-Scherrer etc.)must all match. The current histogram is not included in the list.:param wx.Frame G2frame: pointer to main ... | 14 | 36 | 1 | 266 | 9 | 440 | 487 | 440 | null | ['hLam', 'hstName', 'cType', 'hPrefix', 'histList', 'hType', 'subname', 'name', 'cLam'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (GetHistsLikeSelected) defined within the public class called public.The function start at line 440 and ends at 487. It contains 36 lines of code and it has a cyclomatic complexity of 14. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | SetCopyNames | def SetCopyNames(histName,dataType,addNames=[]):'''Determine the items in the sample parameters that should be copied,depending on the histogram type and the instrument type.'''copyNames = ['Scale',]histType = 'HKLF'if 'PWDR' in histName:histType = 'PWDR'if 'Debye' in dataType:copyNames += ['DisplaceX','DisplaceY','Abs... | 5 | 15 | 3 | 86 | 2 | 489 | 506 | 489 | null | ['copyNames', 'histType'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (SetCopyNames) defined within the public class called public.The function start at line 489 and ends at 506. It contains 15 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [489.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | CopyPlotCtrls | def CopyPlotCtrls(G2frame):'''Global copy: Copy plot controls from current histogram to others.'''hst = G2frame.GPXtree.GetItemText(G2frame.PatternId)histList = GetHistsLikeSelected(G2frame)if not histList:G2frame.ErrorDialog('No match','No other histograms match '+hst,G2frame)returnsourceData = G2frame.GPXtree.GetItem... | 8 | 30 | 1 | 275 | 10 | 508 | 542 | 508 | null | ['results', 'histList', 'source', 'copyList', 'keys', 'dlg', 'Id', 'sourceData', 'data', 'hst'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (CopyPlotCtrls) defined within the public class called public.The function start at line 508 and ends at 542. It contains 30 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 | CopySelectedHistItems | def CopySelectedHistItems(G2frame):'''Global copy: Copy items from current histogram to others.'''hst = G2frame.GPXtree.GetItemText(G2frame.PatternId)histList = GetHistsLikeSelected(G2frame)if not histList:G2frame.ErrorDialog('No match','No other histograms match '+hst,G2frame)returnchoices = ['Limits','Background','In... | 17 | 65 | 1 | 559 | 10 | 544 | 614 | 544 | null | ['results', 'histList', 'choiceList', 'copyList', 'dlg', 'Id', 'copyDict', 'data', 'hst', 'choices'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (CopySelectedHistItems) defined within the public class called public.The function start at line 544 and ends at 614. It contains 65 lines of code and it has a cyclomatic complexity of 17. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | TestMagAtoms | def TestMagAtoms(phase,magAtms,SGData,Uvec,Trans,allmom,maxequiv=100,maximal=False):''' Tests substructure magnetic atoms for magnetic site symmetryparam: phase GSAS-II phase objectparam: magAtms list:magnetic atom objectsparam: SGData dict: GSAS-II space group objectparam: Uvec array: Translation U vectorparam: Trans ... | 13 | 33 | 8 | 333 | 11 | 616 | 659 | 616 | null | ['atCodes', 'invTrans', 'xyzs', 'Phase', 'found', 'xyz', 'uAtms', 'XYZ', 'anymom', 'natm', 'CSI'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (TestMagAtoms) defined within the public class called public.The function start at line 616 and ends at 659. It contains 33 lines of code and it has a cyclomatic complexity of 13. It takes 8 parameters, represented as [616.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | TestAtoms | def TestAtoms(phase,magAtms,SGData,Uvec,Trans,maxequiv=100,maximal=False):'''Tests atoms for substructure equivalentsparam: phase GSAS-II phase objectparam: magAtms list: atom objectsparam: SGData dict: GSAS-II space group objectparam: Uvec array: Translation U vectorparam: Trans array: Transformation matrixparams: max... | 7 | 20 | 7 | 238 | 8 | 661 | 690 | 661 | null | ['atCodes', 'invTrans', 'xyzs', 'Phase', 'xyz', 'uAtms', 'XYZ', 'natm'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (TestAtoms) defined within the public class called public.The function start at line 661 and ends at 690. It contains 20 lines of code and it has a cyclomatic complexity of 7. It takes 7 parameters, represented as [661.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | RefineCell.cellPrint | def cellPrint(ibrav,A):cell = G2lat.A2cell(A)Vol = G2lat.calc_V(A)if ibrav in ['Fm3m','Im3m','Pm3m']:print (" %s%10.6f" % ('a =',cell[0]))elif ibrav in ['R3-H','P6/mmm','I4/mmm','P4/mmm']:print (" %s%10.6f %s%10.6f %s%12.3f" % ('a =',cell[0],' c =',cell[2],' volume =',Vol))elif ibrav in ['P4/mmm','Fmmm','Immm','Ammm','... | 5 | 14 | 2 | 245 | 0 | 694 | 707 | 694 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (RefineCell.cellPrint) defined within the public class called public.The function start at line 694 and ends at 707. It contains 14 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [694.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | RefineCell.vecPrint | def vecPrint(Vec):print (' %s %10.5f %10.5f %10.5f'%('Modulation vector:',Vec[0],Vec[1],Vec[2])) | 1 | 2 | 1 | 28 | 0 | 709 | 710 | 709 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (RefineCell.vecPrint) defined within the public class called public.The function start at line 709 and ends at 710. 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 | RefineCell | def RefineCell(G2frame):'''Refine a unit cell, called by OnRefine'''def cellPrint(ibrav,A):cell = G2lat.A2cell(A)Vol = G2lat.calc_V(A)if ibrav in ['Fm3m','Im3m','Pm3m']:print (" %s%10.6f" % ('a =',cell[0]))elif ibrav in ['R3-H','P6/mmm','I4/mmm','P4/mmm']:print (" %s%10.6f %s%10.6f %s%12.3f" % ('a =',cell[0],' c =',cel... | 15 | 78 | 1 | 1,099 | 20 | 692 | 786 | 692 | null | ['cells', 'newcell', 'ip', 'wave', 'cell', 'Zero', 'Inst', 'Vol', 'SGData', 'ibrav', 'difC', 'dmin', 'vecFlags', 'SSGData', 'A', 'TTh', 'Limits', 'PatternId', 'peaks', 'data'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (RefineCell) defined within the public class called public.The function start at line 692 and ends at 786. It contains 78 lines of code and it has a cyclomatic complexity of 15. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdatePeakGrid.OnAutoSearch | def OnAutoSearch(event):'Search pattern for possible peak positions'PatternId = G2frame.PatternIdlimits = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,PatternId, 'Limits'))[1]background = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,PatternId, 'Background'))inst,inst2 = G2frame.GPXtree.Get... | 8 | 39 | 1 | 433 | 0 | 795 | 833 | 795 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.OnAutoSearch) defined within the public class called public.The function start at line 795 and ends at 833. 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 | UpdatePeakGrid.OnCopyPeaks | def OnCopyPeaks(event):'Copy peaks to other histograms'hst = G2frame.GPXtree.GetItemText(G2frame.PatternId)histList = GetHistsLikeSelected(G2frame)if not histList:G2frame.ErrorDialog('No match','No histograms match '+hst,G2frame)returncopyList = []dlg = G2G.G2MultiChoiceDialog(G2frame,'Copy peak list from\n'+str(hst[5:... | 6 | 20 | 1 | 151 | 0 | 835 | 854 | 835 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.OnCopyPeaks) defined within the public class called public.The function start at line 835 and ends at 854. It contains 20 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 | UpdatePeakGrid.OnLoadPeaks | def OnLoadPeaks(event):'Load peak list from file'pth = G2G.GetExportPath(G2frame)dlg = wx.FileDialog(G2frame, 'Choose GSAS-II PWDR peaks list file', pth, '','PWDR peak list files (*.pkslst)|*.pkslst',wx.FD_OPEN)try:if dlg.ShowModal() == wx.ID_OK:peaks = []filename = dlg.GetPath()File = open(filename,'r')S = File.readli... | 6 | 26 | 1 | 150 | 0 | 856 | 881 | 856 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.OnLoadPeaks) defined within the public class called public.The function start at line 856 and ends at 881. It contains 26 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 | UpdatePeakGrid.OnSavePeaks | def OnSavePeaks(event):'Save peak to file suitable for OnLoadPeaks'pth = G2G.GetExportPath(G2frame)dlg = wx.FileDialog(G2frame, 'Choose GSAS-II PWDR peaks list file', pth, '','PWDR peak list files (*.pkslst)|*.pkslst',wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)try:if dlg.ShowModal() == wx.ID_OK:filename = dlg.GetPath()# make su... | 6 | 19 | 1 | 134 | 0 | 883 | 902 | 883 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.OnSavePeaks) defined within the public class called public.The function start at line 883 and ends at 902. It contains 19 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdatePeakGrid.OnUnDo | def OnUnDo(event):'Undo a peak fit - reads a saved file from PeakFit'file = open(G2frame.undofile,'rb')PatternId = G2frame.PatternIdfor item in ['Background','Instrument Parameters','Peak List']:Id = G2gd.GetGPXtreeItemId(G2frame,PatternId, item)oldvals = pickle.load(file)G2frame.GPXtree.SetItemPyData(Id,oldvals)if ite... | 3 | 15 | 1 | 121 | 0 | 904 | 918 | 904 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.OnUnDo) defined within the public class called public.The function start at line 904 and ends at 918. It contains 15 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 | UpdatePeakGrid.SaveState | def SaveState():'Saves result of a peaak fit for possible UnDo'G2frame.undofile = os.path.join(G2frame.dirname,'GSASII.save')file = open(G2frame.undofile,'wb')PatternId = G2frame.PatternIdfor item in ['Background','Instrument Parameters','Peak List']:pickle.dump(G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2fra... | 2 | 9 | 0 | 88 | 0 | 920 | 928 | 920 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.SaveState) defined within the public class called public.The function start at line 920 and ends at 928. It contains 9 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdatePeakGrid.OnLSQPeakFit | def OnLSQPeakFit(event):'Do a peak fit'if reflGrid.IsCellEditControlEnabled(): # complete any grid edits in progressreflGrid.HideCellEditControl()reflGrid.DisableCellEditControl()if not G2frame.GSASprojectfile:#force a save of the gpx file so SaveState can write in the same directoryG2frame.OnFileSaveas(event)wx.CallAf... | 3 | 8 | 1 | 41 | 0 | 930 | 937 | 930 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.OnLSQPeakFit) defined within the public class called public.The function start at line 930 and ends at 937. 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 | UpdatePeakGrid.OnOneCycle | def OnOneCycle(event):'Do a single cycle of peak fit'if reflGrid.IsCellEditControlEnabled(): # complete any grid edits in progressreflGrid.HideCellEditControl()reflGrid.DisableCellEditControl()wx.CallAfter(OnPeakFit,oneCycle=True) | 2 | 6 | 1 | 33 | 0 | 939 | 944 | 939 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.OnOneCycle) defined within the public class called public.The function start at line 939 and ends at 944. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdatePeakGrid.OnSeqPeakFit | def OnSeqPeakFit(event):'''Do a sequential peak fit across multiple histograms - peaks must be present in all.results saved in Sequential peak fit results'''histList = G2gd.GetGPXtreeDataNames(G2frame,['PWDR',])od = {'label_1':'Copy to next','value_1':False,'label_2':'Reverse order','value_2':False}dlg = G2G.G2MultiCho... | 12 | 67 | 1 | 670 | 0 | 946 | 1,014 | 946 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.OnSeqPeakFit) defined within the public class called public.The function start at line 946 and ends at 1014. It contains 67 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 | UpdatePeakGrid.OnDelPeaks | def OnDelPeaks(event):'Delete selected peaks from the Peak fit table'if G2frame.dataWindow.XtraPeakMode.IsChecked(): # which table?tbl = data['xtraPeaks']else:tbl = data['peaks']choices = [f"{i[0]:.2f}" for i in tbl]if not choices: returnsel = []dlg = G2G.G2MultiChoiceDialog(G2frame,'Select peaks to delete','Delete pea... | 7 | 20 | 1 | 124 | 0 | 1,016 | 1,035 | 1,016 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.OnDelPeaks) defined within the public class called public.The function start at line 1016 and ends at 1035. It contains 20 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 | UpdatePeakGrid.OnClearPeaks | def OnClearPeaks(event):'Clear the Peak fit table'dlg = wx.MessageDialog(G2frame,'Delete all peaks?','Clear peak list',wx.OK|wx.CANCEL)try:if dlg.ShowModal() == wx.ID_OK:peaks = {'peaks':[],'sigDict':{}}finally:dlg.Destroy()UpdatePeakGrid(G2frame,peaks)G2pwpl.PlotPatterns(G2frame,plotType='PWDR') | 3 | 10 | 1 | 75 | 0 | 1,037 | 1,046 | 1,037 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.OnClearPeaks) defined within the public class called public.The function start at line 1037 and ends at 1046. It contains 10 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 | UpdatePeakGrid.OnPeakFit | def OnPeakFit(oneCycle=False,noFit=False):'Do peak fitting by least squares'SaveState()controls = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.root, 'Controls'))if not controls:controls = {'deriv type':'analytic','min dM/M':0.001,} #fill in defaults if needed#print ('Peak Fitting with '+controls[... | 11 | 65 | 2 | 786 | 0 | 1,048 | 1,121 | 1,048 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.OnPeakFit) defined within the public class called public.The function start at line 1048 and ends at 1121. It contains 65 lines of code and it has a cyclomatic complexity of 11. It takes 2 parameters, represented as [1048.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdatePeakGrid.OnResetSigGam | def OnResetSigGam(event):'Reset sig & gam values to instrument parameter values'PatternId = G2frame.PatternIdInst,Inst2 = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,PatternId, 'Instrument Parameters'))peaks = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,PatternId, 'Peak List'))if not pea... | 3 | 13 | 1 | 139 | 0 | 1,123 | 1,135 | 1,123 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.OnResetSigGam) defined within the public class called public.The function start at line 1123 and ends at 1135. It contains 13 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdatePeakGrid.setBackgroundColors | def setBackgroundColors():'Set background colors in peak list table; red if negative (nonsense), white if ok'for r in range(reflGrid.GetNumberRows()):for c in range(reflGrid.GetNumberCols()):if reflGrid.GetColLabelValue(c) in ['position','intensity','alpha','beta','sigma\u00b2','gamma']:try:if float(reflGrid.GetCellVal... | 6 | 12 | 0 | 105 | 0 | 1,137 | 1,148 | 1,137 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.setBackgroundColors) defined within the public class called public.The function start at line 1137 and ends at 1148. It contains 12 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 | UpdatePeakGrid.KeyEditPeakGrid | def KeyEditPeakGrid(event):'''Respond to pressing a key to act on selection of a row, column or cellin the Peak List table'''rowList = reflGrid.GetSelectedRows()colList = reflGrid.GetSelectedCols()selectList = reflGrid.GetSelectedCells()data = G2frame.GPXtree.GetItemPyData(G2frame.PickId)if event.GetKeyCode() == wx.WXK... | 25 | 50 | 1 | 445 | 0 | 1,150 | 1,203 | 1,150 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.KeyEditPeakGrid) defined within the public class called public.The function start at line 1150 and ends at 1203. It contains 50 lines of code and it has a cyclomatic complexity of 25. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdatePeakGrid.SelectVars | def SelectVars(rows):'''Set or clear peak refinement variables for peaks listed in rows'''refOpts = {reflGrid.GetColLabelValue(i):i+1 for i in range(reflGrid.GetNumberCols()) if reflGrid.GetColLabelValue(i) != "refine"}dlg = G2G.G2MultiChoiceDialog(G2frame,'Select columns to refine','Refinement Selection', sorted(refOp... | 8 | 18 | 1 | 161 | 0 | 1,205 | 1,224 | 1,205 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.SelectVars) defined within the public class called public.The function start at line 1205 and ends at 1224. It contains 18 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 | UpdatePeakGrid.OnRefineSelected | def OnRefineSelected(event):'''set refinement flags for the selected peaks'''rows = list(set([row for row,col in reflGrid.GetSelectedCells()] +reflGrid.GetSelectedRows()))tbl = reflGrid.GetTable().dataif not rows:choices = [f"{i[0]:.2f}" for i in tbl]dlg = G2G.G2MultiChoiceDialog(G2frame,'Select peaks to refine','selec... | 7 | 15 | 1 | 106 | 0 | 1,226 | 1,242 | 1,226 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.OnRefineSelected) defined within the public class called public.The function start at line 1226 and ends at 1242. It contains 15 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 | UpdatePeakGrid.OnRefineAll | def OnRefineAll(event):'''set refinement flags for all peaks'''SelectVars(range(reflGrid.GetNumberRows())) | 1 | 2 | 1 | 17 | 0 | 1,244 | 1,247 | 1,244 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.OnRefineAll) defined within the public class called public.The function start at line 1244 and ends at 1247. 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 | UpdatePeakGrid.onCellListDClick | def onCellListDClick(event):'''Called after a double-click on a row/column label'''r,c =event.GetRow(),event.GetCol()if r < 0 and c < 0:for row in range(reflGrid.GetNumberRows()):reflGrid.SelectRow(row,True)for col in range(reflGrid.GetNumberCols()):reflGrid.SelectCol(col,True)elif r >= 0 and c < 0: #row label: select ... | 13 | 28 | 1 | 267 | 0 | 1,249 | 1,277 | 1,249 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.onCellListDClick) defined within the public class called public.The function start at line 1249 and ends at 1277. It contains 28 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 | UpdatePeakGrid.RefreshPeakGrid | def RefreshPeakGrid(event):'recompute & plot the peaks any time a value in the table is edited'if 'LF' in Inst['Type'][0]:for i in range(len(data['LFpeaks'])):data['peaks'][i][2:] = data['LFpeaks'][i]wx.CallAfter(UpdatePeakGrid,G2frame,data)if data['peaks']:OnPeakFit(noFit=True) | 4 | 8 | 1 | 72 | 0 | 1,279 | 1,286 | 1,279 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.RefreshPeakGrid) defined within the public class called public.The function start at line 1279 and ends at 1286. It contains 8 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 | UpdatePeakGrid.ToggleXtraMode | def ToggleXtraMode(event):'''Switch "Extra Peak" mode in response to button'''G2frame.dataWindow.XtraPeakMode.Check(not G2frame.dataWindow.XtraPeakMode.IsChecked())OnXtraMode(event) | 1 | 4 | 1 | 29 | 0 | 1,288 | 1,292 | 1,288 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.ToggleXtraMode) defined within the public class called public.The function start at line 1288 and ends at 1292. 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 | UpdatePeakGrid.OnXtraMode | def OnXtraMode(event):'''Respond to change in "Extra Peak" mode from menu commandor button via :func:`ToggleXtraMode`.'''data['xtraMode'] = G2frame.dataWindow.XtraPeakMode.IsChecked()wx.CallAfter(UpdatePeakGrid,G2frame,data)wx.CallAfter(G2pwpl.PlotPatterns,G2frame,plotType='PWDR') | 1 | 4 | 1 | 44 | 0 | 1,294 | 1,300 | 1,294 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.OnXtraMode) defined within the public class called public.The function start at line 1294 and ends at 1300. 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 | UpdatePeakGrid.OnSetPeakWidMode | def OnSetPeakWidMode(event):'''Toggle G2pwd.peakInstPrmMode mode; determines if unvariedsigma and gamma values are set from UVW & XY'''state = G2frame.dataWindow.setPeakMode.IsChecked()G2pwd.setPeakInstPrmMode(state) | 1 | 3 | 1 | 23 | 0 | 1,302 | 1,307 | 1,302 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.OnSetPeakWidMode) defined within the public class called public.The function start at line 1302 and ends at 1307. 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 | UpdatePeakGrid.ShiftLFc | def ShiftLFc(event):'''Shift the Laue Fringe lattice parameter'''Obj = event.GetEventObject()move = Obj.GetValue()Obj.SetValue(0)data['LaueFringe']['clat'] *= 1. + move/2000.wx.CallAfter(RefreshPeakGrid,None) | 1 | 6 | 1 | 50 | 0 | 1,309 | 1,316 | 1,309 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid.ShiftLFc) defined within the public class called public.The function start at line 1309 and ends at 1316. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdatePeakGrid | def UpdatePeakGrid(G2frame, data):'''respond to selection of PWDR powder peaks data tree item.'''def OnAutoSearch(event):'Search pattern for possible peak positions'PatternId = G2frame.PatternIdlimits = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,PatternId, 'Limits'))[1]background = G2frame.GPXtree.GetI... | 27 | 255 | 2 | 2,866 | 95 | 792 | 1,569 | 792 | null | ['oneCycle', 'ysig', 'pkmode', 'ch', 'msg', 'background', 'histoName', 'Inst', 'pks', 'x', 'S', 'refOpts', 'sels', 'nDel', 'ymask', 'controls', 'X', 'Obj', 'kPeakTable', 'colLabels', 'File', 'peakline', 'cellSpin', 'peaksplus', 'copyList', 'text', 'colList', 'limits', 'parent', 'kcolLabels', 'dlg', 'GoOn', 'rowList', '... | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdatePeakGrid) defined within the public class called public.The function start at line 792 and ends at 1569. It contains 255 lines of code and it has a cyclomatic complexity of 27. It takes 2 parameters, represented as [792.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateBackground.OnBackFlagCopy | def OnBackFlagCopy(event):'Copy background refonement flags to other similar histograms'flag = data[0][1]backDict = data[-1]if backDict['nDebye']:DBflags = []for term in backDict['debyeTerms']:DBflags.append(term[1::2])if backDict['nPeaks']:PKflags = []for term in backDict['peaksList']:PKflags.append(term[1::2])FBflag ... | 15 | 42 | 1 | 366 | 0 | 1,579 | 1,620 | 1,579 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateBackground.OnBackFlagCopy) defined within the public class called public.The function start at line 1579 and ends at 1620. It contains 42 lines of code and it has a cyclomatic complexity of 15. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateBackground.OnBackCopy | def OnBackCopy(event):'Copy background functions/values to other similar histograms'hst = G2frame.GPXtree.GetItemText(G2frame.PatternId)histList = GetHistsLikeSelected(G2frame)if not histList:G2frame.ErrorDialog('No match','No histograms match '+hst,G2frame)returncopyList = []dlg = G2G.G2MultiChoiceDialog(G2frame,'Copy... | 6 | 21 | 1 | 155 | 0 | 1,622 | 1,642 | 1,622 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateBackground.OnBackCopy) defined within the public class called public.The function start at line 1622 and ends at 1642. It contains 21 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 | UpdateBackground.OnBackSave | def OnBackSave(event):'Save background values to file'pth = G2G.GetExportPath(G2frame)dlg = wx.FileDialog(G2frame, 'Set name to save GSAS-II background parameters file', pth, '','background parameter files (*.pwdrbck)|*.pwdrbck',wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)try:if dlg.ShowModal() == wx.ID_OK:filename = dlg.GetPath... | 10 | 29 | 1 | 247 | 0 | 1,644 | 1,673 | 1,644 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateBackground.OnBackSave) defined within the public class called public.The function start at line 1644 and ends at 1673. It contains 29 lines of code and it has a cyclomatic complexity of 10. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateBackground.OnBackLoad | def OnBackLoad(event):'load background values from file'pth = G2G.GetImportPath(G2frame)if not pth: pth = '.'dlg = wx.FileDialog(G2frame, 'Choose GSAS-II background parameters file', pth, '','background parameter files (*.pwdrbck)|*.pwdrbck',wx.FD_OPEN)try:if dlg.ShowModal() == wx.ID_OK:newback = [[],{}]filename = dlg.... | 12 | 38 | 1 | 312 | 0 | 1,675 | 1,712 | 1,675 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateBackground.OnBackLoad) defined within the public class called public.The function start at line 1675 and ends at 1712. It contains 38 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 | UpdateBackground.UpdateBackground.OnBkgFit.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',] and Inst[parm][2]:Inst[parm][... | 6 | 18 | 1 | 186 | 0 | 1,717 | 1,735 | 1,717 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateBackground.UpdateBackground.OnBkgFit.SetInstParms) defined within the public class called public.The function start at line 1717 and ends at 1735. It contains 18 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 | UpdateBackground.OnBkgFit | def OnBkgFit(event):'Fit background functions to fixed set of background points'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','... | 10 | 59 | 1 | 632 | 0 | 1,714 | 1,801 | 1,714 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateBackground.OnBkgFit) defined within the public class called public.The function start at line 1714 and ends at 1801. It contains 59 lines of code and it has a cyclomatic complexity of 10. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateBackground.OnBkgClear | def OnBkgClear(event):'Clear fixed points from background'if 'FixedPoints' not in data[1]:returnelse:data[1]['FixedPoints'] = []G2pwpl.PlotPatterns(G2frame,plotType='PWDR') | 2 | 7 | 1 | 38 | 0 | 1,803 | 1,809 | 1,803 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateBackground.OnBkgClear) defined within the public class called public.The function start at line 1803 and ends at 1809. 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 | UpdateBackground.OnPeaksMove | def OnPeaksMove(event):'Move a background peak'if not data[1]['nPeaks']:G2frame.ErrorDialog('Error','No peaks to move')returnPeaks = {'peaks':[],'sigDict':{}}for peak in data[1]['peaksList']:Peaks['peaks'].append([peak[0],0,peak[2],0,peak[4],0,peak[6],0])G2frame.GPXtree.SetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2fra... | 3 | 9 | 1 | 107 | 0 | 1,811 | 1,819 | 1,811 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateBackground.OnPeaksMove) defined within the public class called public.The function start at line 1811 and ends at 1819. It contains 9 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value.. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.