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 | GetColLabelValue | def GetColLabelValue(self, col):return self.colLabels[col] | 1 | 2 | 2 | 14 | 0 | 221 | 222 | 221 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (GetColLabelValue) defined within the public class called public.The function start at line 221 and ends at 222. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [221.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | GetRowLabelValue | def GetRowLabelValue(self,row):return str(row) | 1 | 2 | 2 | 12 | 0 | 223 | 224 | 223 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (GetRowLabelValue) defined within the public class called public.The function start at line 223 and ends at 224. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [223.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | MoveRow | def MoveRow(self,frm,to):grid = self.GetView()if grid:move = self.index[frm]del self.index[frm]if frm > to:self.index.insert(to,move)else:self.index.insert(to-1,move)# Notify the gridgrid.BeginBatch()msg = wg.GridTableMessage(self, wg.GRIDTABLE_NOTIFY_ROWS_DELETED, frm, 1)grid.ProcessTableMessage(msg)msg = wg.GridTable... | 4 | 21 | 3 | 127 | 0 | 227 | 249 | 227 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (MoveRow) defined within the public class called public.The function start at line 227 and ends at 249. It contains 21 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [227.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | __init__ | def __init__(self,parent,title,text,data,separator='*',varname="",varyflag=False):wx.Dialog.__init__(self,parent,-1,'Edit '+title, pos=wx.DefaultPosition,style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)self.data = data[:]self.newvar = [varname,varyflag]mainSizer = wx.BoxSizer(wx.VERTICAL)self.SetSizer(mainSizer)topLab... | 5 | 58 | 8 | 707 | 0 | 267 | 329 | 267 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__init__) defined within the public class called public.The function start at line 267 and ends at 329. It contains 58 lines of code and it has a cyclomatic complexity of 5. It takes 8 parameters, represented as [267.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | DisableOK | def DisableOK(self,setting):for id in range(len(self.data)):# coefficient cannot be zerotry:if abs(self.data[id][0]) < 1.e-20:setting= Falsebreakexcept:passif setting:self.OkBtn.Enable()else:self.OkBtn.Disable() | 5 | 12 | 2 | 68 | 0 | 331 | 342 | 331 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (DisableOK) defined within the public class called public.The function start at line 331 and ends at 342. It contains 12 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [331.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | OnCheckBox | def OnCheckBox(self,event):self.newvar[1] = self.refine.GetValue() | 1 | 2 | 2 | 21 | 0 | 344 | 345 | 344 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (OnCheckBox) defined within the public class called public.The function start at line 344 and ends at 345. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [344.0] 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 | 347 | 350 | 347 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (OnOk) defined within the public class called public.The function start at line 347 and ends at 350. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [347.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 | 352 | 355 | 352 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (OnCancel) defined within the public class called public.The function start at line 352 and ends at 355. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [352.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | GetData | def GetData(self):return self.data | 1 | 2 | 1 | 9 | 0 | 357 | 358 | 357 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (GetData) defined within the public class called public.The function start at line 357 and ends at 358. 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 | CheckConstraints | def CheckConstraints(G2frame,Phases,Histograms,data,newcons=[],reqVaryList=None,seqhst=None,seqmode='use-all'):'''Load constraints & check them for errors. N.B. Equivalences based on symmetry (etc.)are generated by running :func:`GSASIIstrIO.GetPhaseData`.When reqVaryList is included (see WarnConstraintLimit) then para... | 18 | 51 | 8 | 499 | 9 | 361 | 431 | 361 | null | ['rbIds', 'constrDict', 'parmDict', 'Controls', 'varyList', 'impossible', 'consVars', 'rigidbodyDict', 'msg'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (CheckConstraints) defined within the public class called public.The function start at line 361 and ends at 431. It contains 51 lines of code and it has a cyclomatic complexity of 18. It takes 8 parameters, represented as [361.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateConstraints.FindEquivVarb | def FindEquivVarb(name,nameList):'Creates a list of variables appropriate to constrain with name'outList = []#phlist = []items = name.split(':')namelist = [items[2],]if 'dA' in name:namelist = ['dAx','dAy','dAz']elif 'AU' in name:namelist = ['AUiso','AU11','AU22','AU33','AU12','AU13','AU23']elif 'Akappa' in name:nameli... | 36 | 60 | 2 | 661 | 0 | 438 | 501 | 438 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.FindEquivVarb) defined within the public class called public.The function start at line 438 and ends at 501. It contains 60 lines of code and it has a cyclomatic complexity of 36. It takes 2 parameters, represented as [438.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateConstraints.SelectVarbs | def SelectVarbs(page,FrstVarb,varList,legend,constType):'''Select variables used in constraints after one variable hasbeen selected. This routine determines the appropriate variables to beused based on the one that has been selected and asks for more to be added.It then creates the constraint and adds it to the constra... | 87 | 202 | 5 | 1,571 | 0 | 503 | 727 | 503 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.SelectVarbs) defined within the public class called public.The function start at line 503 and ends at 727. It contains 202 lines of code and it has a cyclomatic complexity of 87. It takes 5 parameters, represented as [503.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateConstraints.CheckAddedConstraint | def CheckAddedConstraint(newcons):'''Check a new constraint that has just been input.If there is an error display a message and discard the last entrySince the varylist is not available, no warning messagesshould be generated here:returns: True if constraint should be added'''errmsg,warnmsg = CheckConstraints(G2frame,P... | 5 | 19 | 1 | 154 | 0 | 729 | 757 | 729 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.CheckAddedConstraint) defined within the public class called public.The function start at line 729 and ends at 757. It contains 19 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 | UpdateConstraints.WarnConstraintLimit | def WarnConstraintLimit():'''Check if constraints reference variables with limits.Displays a warning message, but does nothing'''parmDict,reqVaryList = G2frame.MakeLSParmDict()try:errmsg,warnmsg = CheckConstraints(G2frame,Phases,Histograms,data,[],reqVaryList,seqhst=seqhistnum,seqmode=seqmode)except Exception as msg:if... | 3 | 10 | 0 | 79 | 0 | 759 | 771 | 759 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.WarnConstraintLimit) defined within the public class called public.The function start at line 759 and ends at 771. 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 | UpdateConstraints.CheckChangedConstraint | def CheckChangedConstraint():'''Check all constraints after an edit has been made.If there is an error display a message and reject the change.Since the varylist is not available, no warning messagesshould be generated.:returns: True if the edit should be retained'''errmsg,warnmsg = CheckConstraints(G2frame,Phases,Hist... | 5 | 19 | 0 | 147 | 0 | 773 | 800 | 773 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.CheckChangedConstraint) defined within the public class called public.The function start at line 773 and ends at 800. It contains 19 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 | UpdateConstraints.PageSelection | def PageSelection(page):'Decode page reference'if page[1] == "phs":vartype = "phase"varList = G2obj.removeNonRefined(phaseList)# remove any non-refinable prms from listconstrDictEnt = 'Phase'elif page[1] == "hap":vartype = "Histogram*Phase"varList = G2obj.removeNonRefined(hapList)# remove any non-refinable prms from li... | 6 | 23 | 1 | 121 | 0 | 802 | 825 | 802 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.PageSelection) defined within the public class called public.The function start at line 802 and ends at 825. It contains 23 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 | UpdateConstraints.OnAddHold | def OnAddHold(event):'''Create a new Hold constraintHold constraints allows the user to select one variable (the list of availablevariables depends on which tab is currently active). '''page = G2frame.Pagevartype,varList,constrDictEnt = PageSelection(page)if vartype is None: returnvarList = G2obj.SortVariables(varList)... | 8 | 30 | 1 | 270 | 0 | 827 | 863 | 827 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.OnAddHold) defined within the public class called public.The function start at line 827 and ends at 863. 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 | UpdateConstraints.OnAddEquivalence | def OnAddEquivalence(event):'''add an Equivalence constraint'''page = G2frame.Pagevartype,varList,constrDictEnt = PageSelection(page)if vartype is None: returntitle1 = "Create equivalence constraint between "+vartype+" variables"title2 = "Select additional "+vartype+" variable(s) to be equivalent with "if not varList:G... | 3 | 11 | 1 | 74 | 0 | 865 | 877 | 865 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.OnAddEquivalence) defined within the public class called public.The function start at line 865 and ends at 877. It contains 11 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 | UpdateConstraints.OnAddAtomEquiv | def OnAddAtomEquiv(event):''' Add equivalences between all parameters on atoms '''page = G2frame.Pagevartype,varList,constrDictEnt = PageSelection(page)if vartype is None: returntitle1 = "Setup equivalent atom variables"title2 = "Select additional atoms(s) to be equivalent with "if not varList:G2frame.ErrorDialog('No v... | 3 | 11 | 1 | 66 | 0 | 879 | 891 | 879 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.OnAddAtomEquiv) defined within the public class called public.The function start at line 879 and ends at 891. It contains 11 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 | UpdateConstraints.OnAddRiding | def OnAddRiding(event):''' Add riding equivalences between all parameters on atoms- not currently used'''page = G2frame.Pagevartype,varList,constrDictEnt = PageSelection(page)if vartype is None: returntitle1 = "Setup riding atoms "title2 = "Select additional atoms(s) to ride on "if not varList:G2frame.ErrorDialog('No v... | 3 | 11 | 1 | 66 | 0 | 893 | 905 | 893 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.OnAddRiding) defined within the public class called public.The function start at line 893 and ends at 905. It contains 11 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 | UpdateConstraints.OnAddFunction | def OnAddFunction(event):'''add a Function (new variable) constraint'''page = G2frame.Pagevartype,varList,constrDictEnt = PageSelection(page)if vartype is None: returntitle1 = "Setup new variable based on "+vartype+" variables"title2 = "Include additional "+vartype+" variable(s) to be included with "if not varList:G2fr... | 3 | 11 | 1 | 74 | 0 | 907 | 919 | 907 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.OnAddFunction) defined within the public class called public.The function start at line 907 and ends at 919. It contains 11 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 | UpdateConstraints.OnAddConstraint | def OnAddConstraint(event):'''add a constraint equation to the constraints list'''page = G2frame.Pagevartype,varList,constrDictEnt = PageSelection(page)if vartype is None: returntitle1 = "Creating constraint on "+vartype+" variables"title2 = "Select additional "+vartype+" variable(s) to include in constraint with "if n... | 3 | 11 | 1 | 74 | 0 | 921 | 933 | 921 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.OnAddConstraint) defined within the public class called public.The function start at line 921 and ends at 933. It contains 11 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 | UpdateConstraints.GetAddVars | def GetAddVars(page,title1,title2,varList,constrDictEnt,constType):'''Get the variables to be added for OnAddEquivalence, OnAddFunction,and OnAddConstraint. Then create and check the constraint.'''#varListlbl = ["("+i+") "+G2obj.fmtVarDescr(i) for i in varList]if constType == 'equivalence':omitVars = G2mv.GetDependentV... | 12 | 30 | 6 | 303 | 0 | 935 | 969 | 935 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.GetAddVars) defined within the public class called public.The function start at line 935 and ends at 969. It contains 30 lines of code and it has a cyclomatic complexity of 12. It takes 6 parameters, represented as [935.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateConstraints.FindNeighbors | def FindNeighbors(phase,FrstName,AtNames):General = phase['General']cx,ct,cs,cia = General['AtomPtrs']Atoms = phase['Atoms']atNames = [atom[ct-1] for atom in Atoms]Cell = General['Cell'][1:7]Amat,Bmat = G2lat.cell2AB(Cell)atTypes = General['AtomTypes']Radii = np.array(General['BondRadii'])AtInfo = dict(zip(atTypes,Radi... | 4 | 22 | 3 | 226 | 0 | 971 | 992 | 971 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.FindNeighbors) defined within the public class called public.The function start at line 971 and ends at 992. It contains 22 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [971.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateConstraints.GetAddAtomVars | def GetAddAtomVars(page,title1,title2,varList,constrDictEnt,constType):'''Get the atom variables to be added for OnAddAtomEquiv. Then create and check the constraints. Riding for H atoms only.'''Atoms = {G2obj.VarDescr(i)[0]:[] for i in varList if 'Atom' in G2obj.VarDescr(i)[0]}for item in varList:atName = G2obj.VarDes... | 23 | 73 | 6 | 638 | 0 | 994 | 1,070 | 994 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.GetAddAtomVars) defined within the public class called public.The function start at line 994 and ends at 1070. It contains 73 lines of code and it has a cyclomatic complexity of 23. It takes 6 parameters, represented as [994.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateConstraints.MakeConstraintsSizer | def MakeConstraintsSizer(name,panel):'''Creates a sizer displaying all of the constraints entered ofthe specified type.:param str name: the type of constraints to be displayed ('HAP','Hist', 'Phase', 'Global', 'Sym-Generated'):param wx.Panel panel: parent panel for sizer:returns: wx.Sizer created by method'''if name ==... | 63 | 236 | 2 | 2,302 | 0 | 1,072 | 1,339 | 1,072 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.MakeConstraintsSizer) defined within the public class called public.The function start at line 1072 and ends at 1339. It contains 236 lines of code and it has a cyclomatic complexity of 63. It takes 2 parameters, represented as [1072.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateConstraints.OnConstDel | def OnConstDel(event):'Delete selected constraints'sel = G2frame.constr.GetSelection()selList = event.GetEventObject().checkboxListselList.reverse()for obj,Id,name in event.GetEventObject().checkboxList:if obj.GetValue(): del data[name][Id]wx.CallAfter(UpdateConstraints,G2frame,data,sel,True) | 3 | 8 | 1 | 73 | 0 | 1,341 | 1,348 | 1,341 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.OnConstDel) defined within the public class called public.The function start at line 1341 and ends at 1348. 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 | UpdateConstraints.OnConstEdit | def OnConstEdit(event):'''Called to edit an individual contraint in response to aclick on its Edit button'''Obj = event.GetEventObject()sel = G2frame.constr.GetSelection()Id,name = Indx[Obj.GetId()]if data[name][Id][-1] == 'f':items = data[name][Id][:-3]constType = 'New Variable'if data[name][Id][-3]:varname = str(data... | 16 | 59 | 1 | 594 | 0 | 1,350 | 1,413 | 1,350 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.OnConstEdit) defined within the public class called public.The function start at line 1350 and ends at 1413. It contains 59 lines of code and it has a cyclomatic complexity of 16. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateConstraints.UpdateConstraintPanel | def UpdateConstraintPanel(panel,typ):'''Update the contents of the selected Constraintnotebook tab. Called in :func:`OnPageChanged`'''if panel.GetSizer(): panel.GetSizer().Clear(True)topSizer = G2frame.dataWindow.topBoxtopSizer.Clear(True)parent = G2frame.dataWindow.topPanellbl= "Define/edit constraints on refined para... | 5 | 61 | 2 | 751 | 0 | 1,415 | 1,481 | 1,415 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.UpdateConstraintPanel) defined within the public class called public.The function start at line 1415 and ends at 1481. It contains 61 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [1415.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateConstraints.OnPageChanged | def OnPageChanged(event,selectTab=None):'''Called when a tab is pressed or when a "select tab" menu button isused (see RaisePage), or to refresh the current tab contents (event=None)'''if event: #page change event!page = event.GetSelection()elif selectTab: #reload previouspage = selectTabelse: # called directly, get cu... | 12 | 42 | 2 | 298 | 0 | 1,483 | 1,530 | 1,483 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.OnPageChanged) defined within the public class called public.The function start at line 1483 and ends at 1530. It contains 42 lines of code and it has a cyclomatic complexity of 12. It takes 2 parameters, represented as [1483.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateConstraints.RaisePage | def RaisePage(event):'Respond to a "select tab" menu button'try:i = (G2G.wxID_CONSPHASE, G2G.wxID_CONSHAP, G2G.wxID_CONSHIST, G2G.wxID_CONSGLOBAL, G2G.wxID_CONSSYM,).index(event.GetId())G2frame.constr.SetSelection(i)wx.CallAfter(OnPageChanged,None)except ValueError:print('Unexpected event in RaisePage') | 2 | 13 | 1 | 64 | 0 | 1,532 | 1,544 | 1,532 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.RaisePage) defined within the public class called public.The function start at line 1532 and ends at 1544. It contains 13 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 | UpdateConstraints.SetStatusLine | def SetStatusLine(text):G2frame.GetStatusBar().SetStatusText(text,1) | 1 | 2 | 1 | 17 | 0 | 1,546 | 1,547 | 1,546 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.SetStatusLine) defined within the public class called public.The function start at line 1546 and ends at 1547. 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 | UpdateConstraints.OnShowISODISTORT | def OnShowISODISTORT(event):ShowIsoDistortCalc(G2frame) | 1 | 2 | 1 | 9 | 0 | 1,549 | 1,550 | 1,549 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints.OnShowISODISTORT) defined within the public class called public.The function start at line 1549 and ends at 1550. 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 | UpdateConstraints | def UpdateConstraints(G2frame, data, selectTab=None, Clear=False):'''Called when Constraints tree item is selected.Displays the constraints in the data window'''def FindEquivVarb(name,nameList):'Creates a list of variables appropriate to constrain with name'outList = []#phlist = []items = name.split(':')namelist = [ite... | 36 | 166 | 4 | 1,335 | 143 | 433 | 1,736 | 433 | null | ['seqHistList', 'moreVarb', 'helptext', 'namelist', 'XYZ', 'ch', 'constType', 'page', 'wildList', 'Selections', 'omitVars', 'vartype', 'constr', 'outList', 'constDel', 'PhaseConstr', 'nam', 'mitem', 'ans', 'akey', 'Siz', 'legend', 'Radii', 'atNames', 'phaselbl', 'hlptxt', 'Eq', 'plbl', 'title1', 'Split', 'symHolds', 'c... | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateConstraints) defined within the public class called public.The function start at line 433 and ends at 1736. It contains 166 lines of code and it has a cyclomatic complexity of 36. It takes 4 parameters, represented as [433.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | CheckAllScalePhaseFractions | def CheckAllScalePhaseFractions(G2frame,refine=True):'''Check if scale factor and all phase fractions are refined without a constraintfor all used histograms, if so, offer the user a chance to create a constrainton the sum of phase fractions:returns: False if refinement should be continued'''histograms, phases = G2fram... | 13 | 40 | 2 | 330 | 8 | 1,741 | 1,787 | 1,741 | null | ['opts', 'constr', 'dlg', 'problems', 'ans', 'msg', 'Constraints', 'cId'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (CheckAllScalePhaseFractions) defined within the public class called public.The function start at line 1741 and ends at 1787. It contains 40 lines of code and it has a cyclomatic complexity of 13. It takes 2 parameters, represented as [1741.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | CheckScalePhaseFractions | def CheckScalePhaseFractions(G2frame,hist,histograms,phases,Constraints):'''Check if scale factor and all phase fractions are refined without a constraintfor histogram hist, if so, offer the user a chance to create a constrainton the sum of phase fractions'''if G2frame.testSeqRefineMode():# more work needed due to seqm... | 15 | 21 | 5 | 222 | 2 | 1,789 | 1,822 | 1,789 | null | ['phaseCount', 'histStr'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (CheckScalePhaseFractions) defined within the public class called public.The function start at line 1789 and ends at 1822. It contains 21 lines of code and it has a cyclomatic complexity of 15. It takes 5 parameters, represented as [1789.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | TransConstraints.SetUniqAj | def SetUniqAj(pId,iA,SGData):SGLaue = SGData['SGLaue']SGUniq = SGData['SGUniq']if SGLaue in ['m3','m3m']:if iA in [0,1,2]:parm = '%d::%s'%(pId,'A0')else:parm = Noneelif SGLaue in ['4/m','4/mmm']:if iA in [0,1]:parm = '%d::%s'%(pId,'A0')elif iA == 2:parm = '%d::%s'%(pId,'A2')else:parm = Noneelif SGLaue in ['6/m','6/mmm'... | 21 | 46 | 3 | 325 | 0 | 1,831 | 1,876 | 1,831 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (TransConstraints.SetUniqAj) defined within the public class called public.The function start at line 1831 and ends at 1876. It contains 46 lines of code and it has a cyclomatic complexity of 21. It takes 3 parameters, represented as [1831.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | TransConstraints | def TransConstraints(G2frame,oldPhase,newPhase,Trans,Vec,atCodes):'''Add constraints for new magnetic phase created via transformation of oldnuclear oneNB: A = [G11,G22,G33,2*G12,2*G13,2*G23]'''def SetUniqAj(pId,iA,SGData):SGLaue = SGData['SGLaue']SGUniq = SGData['SGUniq']if SGLaue in ['m3','m3m']:if iA in [0,1,2]:parm... | 17 | 73 | 6 | 838 | 25 | 1,825 | 1,988 | 1,825 | null | ['invOpr', 'CSX', 'item', 'DepCons', 'siteSym', 'Opr', 'atom', 'nSGData', 'nhapkey', 'opId', 'constraints', 'Nop', 'nAtoms', 'XOpr', 'IndpCon', 'parm', 'ohapkey', 'UseList', 'name', 'Aold', 'npId', 'xnames', 'detTrans', 'SGLaue', 'SGUniq'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (TransConstraints) defined within the public class called public.The function start at line 1825 and ends at 1988. It contains 73 lines of code and it has a cyclomatic complexity of 17. It takes 6 parameters, represented as [1825.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.OnPageChanged | def OnPageChanged(event):global resListresList = []if event: #page change event!page = event.GetSelection()else:try:page = G2frame.rbBook.GetSelection()except:if GSASIIpath.GetConfigValue('debug'): print('DBG_gpx open error:C++ Run time error - skipped')returnG2frame.rbBook.ChangeSelection(page)text = G2frame.rbBook.Ge... | 7 | 40 | 1 | 370 | 0 | 1,996 | 2,035 | 1,996 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.OnPageChanged) defined within the public class called public.The function start at line 1996 and ends at 2035. It contains 40 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 | UpdateRigidBodies.getMacroFile | def getMacroFile(macName):defDir = os.path.join(GSASIIpath.path2GSAS2,'inputs','GSASIImacros')if not os.path.exists(defDir):# patch 3/2024 for svn dir organizationdefDir = os.path.join(GSASIIpath.path2GSAS2,'GSASIImacros')if not os.path.exists(defDir):print('Warning: GSASIImacros directory not found')return []dlg = wx.... | 6 | 24 | 1 | 170 | 0 | 2,038 | 2,061 | 2,038 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.getMacroFile) defined within the public class called public.The function start at line 2038 and ends at 2061. It contains 24 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 | UpdateRigidBodies.getTextFile | def getTextFile():dlg = wx.FileDialog(G2frame,'Choose rigid body text file', G2frame.LastGPXdir, '',"GSAS-II text file (*.txt)|*.txt|XYZ file (*.xyz)|*.xyz|""Sybyl mol2 file (*.mol2)|*.mol2|PDB file (*.pdb;*.ent)|*.pdb;*.ent",wx.FD_OPEN | wx.FD_CHANGE_DIR)try:if dlg.ShowModal() == wx.ID_OK:txtfile = dlg.GetPath()ext = ... | 4 | 18 | 0 | 104 | 0 | 2,063 | 2,080 | 2,063 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.getTextFile) defined within the public class called public.The function start at line 2063 and ends at 2080. It contains 18 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 | UpdateRigidBodies.OnImportRigidBody | def OnImportRigidBody(event):page = G2frame.rbBook.GetSelection()if 'Vector' in G2frame.rbBook.GetPageText(page):passelif 'Residue' in G2frame.rbBook.GetPageText(page):try:ImportResidueRB()except Exception as msg:print('Error reading .xyz file\nError msg:',msg)if GSASIIpath.GetConfigValue('debug'): import tracebackprin... | 5 | 12 | 1 | 73 | 0 | 2,082 | 2,093 | 2,082 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.OnImportRigidBody) defined within the public class called public.The function start at line 2082 and ends at 2093. It contains 12 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 | UpdateRigidBodies.OnSaveRigidBody | def OnSaveRigidBody(event):page = G2frame.rbBook.GetSelection()if 'Vector' in G2frame.rbBook.GetPageText(page):passelif 'Residue' in G2frame.rbBook.GetPageText(page):SaveResidueRB() | 3 | 6 | 1 | 42 | 0 | 2,095 | 2,100 | 2,095 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.OnSaveRigidBody) defined within the public class called public.The function start at line 2095 and ends at 2100. 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 | UpdateRigidBodies.DumpVectorRB | def DumpVectorRB(event):global resRBselif resRBsel not in data['Residue']:returnrbData = data['Residue'][resRBsel]pth = G2G.GetExportPath(G2frame)dlg = wx.FileDialog(G2frame, 'Choose file to save residue rigid body',pth, '', 'RRB files (*.resbody)|*.resbody',wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)try:if dlg.ShowModal() == w... | 8 | 34 | 1 | 266 | 0 | 2,102 | 2,136 | 2,102 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.DumpVectorRB) defined within the public class called public.The function start at line 2102 and ends at 2136. 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 | UpdateRigidBodies.LoadVectorRB | def LoadVectorRB(event):AtInfo = data['Residue']['AtInfo']pth = G2G.GetExportPath(G2frame)dlg = wx.FileDialog(G2frame, 'Choose file to read vector rigid body',pth, '', 'RRB files (*.resbody)|*.resbody',wx.FD_OPEN)try:if dlg.ShowModal() == wx.ID_OK:filename = dlg.GetPath()filename = os.path.splitext(filename)[0]+'.resbo... | 13 | 62 | 1 | 537 | 0 | 2,138 | 2,199 | 2,138 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.LoadVectorRB) defined within the public class called public.The function start at line 2138 and ends at 2199. It contains 62 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 | UpdateRigidBodies.AddVectorRB | def AddVectorRB(event):'Create a new vector rigid body'AtInfo = data['Vector']['AtInfo']dlg = G2G.MultiIntegerDialog(G2frame,'New Rigid Body',['No. atoms','No. translations'],[3,1])if dlg.ShowModal() == wx.ID_OK:nAtoms,nTrans = dlg.GetValues()if nAtoms < 3:dlg.Destroy()G2G.G2MessageBox(G2frame,'A vector rigid body must... | 9 | 26 | 1 | 293 | 0 | 2,201 | 2,226 | 2,201 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.AddVectorRB) defined within the public class called public.The function start at line 2201 and ends at 2226. It contains 26 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 | UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.SetupDrawing | def SetupDrawing(atmData):'''Add the dicts needed for G2plt.PlotStructure to work to thereader .Phase object'''generalData = atmData['General']generalData['BondRadii'] = []G2phG.SetDrawingDefaults(atmData['Drawing'])atmData['Drawing'].update({'oldxy':[0.,0.],'Quaternion':[0.,0.,0.,1.],'cameraPos':150., 'viewDir':[0,0,1... | 9 | 46 | 1 | 519 | 0 | 2,230 | 2,282 | 2,230 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.SetupDrawing) defined within the public class called public.The function start at line 2230 and ends at 2282. It contains 46 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 | UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.onCancel | def onCancel(event,page=0):'complete or bail out from RB define, cleaning up'G2frame.rbBook.DeletePage(G2frame.rbBook.FindPage(pagename))G2frame.rbBook.SetSelection(page) | 1 | 4 | 2 | 33 | 0 | 2,284 | 2,287 | 2,284 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.onCancel) defined within the public class called public.The function start at line 2284 and ends at 2287. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [2284.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page1.ShowSelection | def ShowSelection(selections):'respond to change in atom selections'ct,cs = [1,8]generalData = rd.Phase['General']for i,atom in enumerate(rd.Phase['Drawing']['Atoms']):if i in selections:factor = 1else:factor = 2.5atNum = generalData['AtomTypes'].index(atom[ct]) atom[cs] = list(np.array(generalData['Color'][atNum])//fa... | 3 | 12 | 1 | 95 | 0 | 2,294 | 2,305 | 2,294 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page1.ShowSelection) defined within the public class called public.The function start at line 2294 and ends at 2305. It contains 12 lines of code and it has a cyclomatic complexity of 3. The function does... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page1.onPage1OK | def onPage1OK(event):'1st section has been completed, move onto next'G2frame.G2plotNB.Delete(rd.Phase['General']['Name'])GetCoords(atmsel)Page2() | 1 | 5 | 1 | 29 | 0 | 2,306 | 2,310 | 2,306 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page1.onPage1OK) defined within the public class called public.The function start at line 2306 and ends at 2310. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not ... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page1 | def Page1():'''Show the GUI for first stage of the rigid body with all atoms in phase in crystal coordinates. Select the atoms to go onto thenext stage'''def ShowSelection(selections):'respond to change in atom selections'ct,cs = [1,8]generalData = rd.Phase['General']for i,atom in enumerate(rd.Phase['Drawing']['Atoms']... | 6 | 48 | 0 | 425 | 0 | 2,289 | 2,368 | 2,289 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page1) defined within the public class called public.The function start at line 2289 and ends at 2368. It contains 48 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 | UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page2.UpdateDraw | def UpdateDraw(event=None):'Called when info changes in grid, replots'UpdateVectorBody(rbData)DrawCallback() | 1 | 4 | 1 | 15 | 0 | 2,375 | 2,378 | 2,375 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page2.UpdateDraw) defined within the public class called public.The function start at line 2375 and ends at 2378. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page2.onSetAll | def onSetAll(event):'Set all atoms as selected'grid.completeEdits()for i in range(len(rd.Phase['RBselection'])):rd.Phase['RBselection'][i] = 1 # table needs 0/1 for T/Fgrid.ForceRefresh()UpdateDraw() | 2 | 7 | 1 | 46 | 0 | 2,380 | 2,386 | 2,380 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page2.onSetAll) defined within the public class called public.The function start at line 2380 and ends at 2386. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not t... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page2.onToggle | def onToggle(event):'Toggles selection state for all atoms'grid.completeEdits()for i in range(len(rd.Phase['RBselection'])):rd.Phase['RBselection'][i] = int(not rd.Phase['RBselection'][i])grid.ForceRefresh()UpdateDraw() | 2 | 7 | 1 | 58 | 0 | 2,388 | 2,394 | 2,388 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page2.onToggle) defined within the public class called public.The function start at line 2388 and ends at 2394. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not t... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page2.onSetOrigin | def onSetOrigin(event):'Resets origin to midpoint between all selected atoms'grid.completeEdits()center = np.array([0.,0.,0.])count = 0for i in range(len(rd.Phase['RBselection'])):if rd.Phase['RBselection'][i]:count += 1center += rd.Phase['RBcoords'][i]if count:rd.Phase['RBcoords'] -= center/countgrid.ForceRefresh()Upd... | 4 | 13 | 1 | 93 | 0 | 2,396 | 2,408 | 2,396 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page2.onSetOrigin) defined within the public class called public.The function start at line 2396 and ends at 2408. It contains 13 lines of code and it has a cyclomatic complexity of 4. The function does n... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page2.onSetX | def onSetX(event):grid.completeEdits()center = np.array([0.,0.,0.])count = 0for i in range(len(rd.Phase['RBselection'])):if rd.Phase['RBselection'][i]:count += 1center += rd.Phase['RBcoords'][i]if not count:G2G.G2MessageBox(G2frame,'No atoms selected','Selection required')returnXYZP = center/countif np.sqrt(sum(XYZP**2... | 10 | 40 | 1 | 394 | 0 | 2,410 | 2,450 | 2,410 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page2.onSetX) defined within the public class called public.The function start at line 2410 and ends at 2450. It contains 40 lines of code and it has a cyclomatic complexity of 10. The function does not t... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page2.onSetPlane | def onSetPlane(event): '''Finds eigen vector/matrix for best "ellipsoid" about atoms; rotate atoms so that smallest axis is along choice. '''grid.completeEdits()selList = [i==1 for i in rd.Phase['RBselection']]XYZ = rd.Phase['RBcoords'][selList]Natoms = len(XYZ)if Natoms < 3: G2G.G2MessageBox(G2frame,'A plane requires ... | 7 | 25 | 1 | 277 | 0 | 2,452 | 2,480 | 2,452 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page2.onSetPlane) defined within the public class called public.The function start at line 2452 and ends at 2480. It contains 25 lines of code and it has a cyclomatic complexity of 7. The function does no... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page2.onWriteXYZ | def onWriteXYZ(event):'''Writes selected atoms in a .xyz file for use in Avogadro, etc.'''grid.completeEdits()center = np.array([0.,0.,0.])count = 0for i in range(len(rd.Phase['RBselection'])):if rd.Phase['RBselection'][i]:count += 1center += rd.Phase['RBcoords'][i]if count:center /= countelse:print('nothing selected')... | 8 | 26 | 1 | 198 | 0 | 2,482 | 2,510 | 2,482 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page2.onWriteXYZ) defined within the public class called public.The function start at line 2482 and ends at 2510. It contains 26 lines of code and it has a cyclomatic complexity of 8. The function does no... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page2.onAddVector | def onAddVector(event):'''Adds selected atoms as a new vector rigid body.Closes out the importer tab when done. '''grid.completeEdits()name = os.path.splitext(os.path.split(filename)[1])[0]namelist = [data['Vector'][key]['RBname'] for key indata['Vector'] if 'RBname' in data['Vector'][key]]name = G2obj.MakeUniqueLabel(... | 6 | 18 | 1 | 196 | 0 | 2,513 | 2,533 | 2,513 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page2.onAddVector) defined within the public class called public.The function start at line 2513 and ends at 2533. It contains 18 lines of code and it has a cyclomatic complexity of 6. The function does n... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page2.onAddResidue | def onAddResidue(event):'''Adds selected atoms as a new residue rigid body.Closes out the importer tab when done. '''grid.completeEdits()name = os.path.split(filename)[1]rbXYZ = []rbTypes = []atNames = []for i in rd.Phase['RBindex']:if rd.Phase['RBselection'][i]:rbXYZ.append(rd.Phase['RBcoords'][i])rbTypes.append(rd.Ph... | 8 | 28 | 1 | 300 | 0 | 2,535 | 2,566 | 2,535 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page2.onAddResidue) defined within the public class called public.The function start at line 2535 and ends at 2566. It contains 28 lines of code and it has a cyclomatic complexity of 8. The function does ... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page2 | def Page2():'''Show the GUI for the second stage, where selected atoms arenow in Cartesian space, manipulate the axes and export selected atoms to a vector or residue rigid body.'''def UpdateDraw(event=None):'Called when info changes in grid, replots'UpdateVectorBody(rbData)DrawCallback()def onSetAll(event):'Set all at... | 6 | 100 | 0 | 1,032 | 0 | 2,370 | 2,663 | 2,370 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.Page2) defined within the public class called public.The function start at line 2370 and ends at 2663. It contains 100 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 | UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.GetCoords | def GetCoords(atmsel):'''Create orthogonal coordinates for selected atoms.Place the origin at the center of the body'''atms = rd.Phase['Atoms']cell = rd.Phase['General']['Cell'][1:7]Amat,Bmat = G2lat.cell2AB(cell)rd.Phase['RBcoords'] = np.array([np.inner(Amat,atms[i][3:6]) for i in atmsel])rd.Phase['RBcoords'] -= rd.Ph... | 4 | 8 | 1 | 134 | 0 | 2,665 | 2,675 | 2,665 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.GetCoords) defined within the public class called public.The function start at line 2665 and ends at 2675. 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 | UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateVectorBody | def UpdateVectorBody(rb,useSelection=False):'''Put the atoms in order to pass for plotting or for storage as a vector rigid body. :param dict rb: rigid body contents created in :func:`MakeVectorBody`:param bool useSelection: True if the rd.Phase['RBselection']values will be used to select which atoms are included in th... | 7 | 19 | 2 | 145 | 0 | 2,677 | 2,704 | 2,677 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.UpdateVectorBody) defined within the public class called public.The function start at line 2677 and ends at 2704. It contains 19 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [2677.0] and does not return any ... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.MakeVectorBody | def MakeVectorBody(name=''):'''Make the basic vector rigid body dict (w/o coordinates) used forexport and for plotting'''vecMag = [1.0]vecRef = [False]rb = {'RBname':name,'VectMag':vecMag,'rbRef':[0,1,2,False],'VectRef':vecRef,'useCount':0}UpdateVectorBody(rb)return rb | 1 | 8 | 1 | 57 | 0 | 2,706 | 2,716 | 2,706 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.ExtractPhaseRB.MakeVectorBody) defined within the public class called public.The function start at line 2706 and ends at 2716. It contains 8 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 | UpdateRigidBodies.ExtractPhaseRB | def ExtractPhaseRB(event):'Extract a rigid body from a file with a phase'def SetupDrawing(atmData):'''Add the dicts needed for G2plt.PlotStructure to work to thereader .Phase object'''generalData = atmData['General']generalData['BondRadii'] = []G2phG.SetDrawingDefaults(atmData['Drawing'])atmData['Drawing'].update({'old... | 14 | 73 | 1 | 408 | 0 | 2,228 | 2,790 | 2,228 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.ExtractPhaseRB) defined within the public class called public.The function start at line 2228 and ends at 2790. It contains 73 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 | UpdateRigidBodies.AddVectTrans | def AddVectTrans(event):'Add a translation to an existing vector rigid body'choices = []rbIdlist = []for rbid in data['RBIds']['Vector']:if rbid != 'AtInfo':rbIdlist.append(rbid)choices.append(data['Vector'][rbid]['RBname'])if len(choices) == 0:G2G.G2MessageBox(G2frame,'No Vector Rigid Bodies found', 'No VR Bodies')ret... | 7 | 29 | 1 | 204 | 0 | 2,792 | 2,820 | 2,792 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.AddVectTrans) defined within the public class called public.The function start at line 2792 and ends at 2820. 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 | UpdateRigidBodies.SaveVectorRB | def SaveVectorRB(event):choices = []rbIdlist = []for rbid in data['RBIds']['Vector']:if rbid != 'AtInfo':rbIdlist.append(rbid)choices.append(data['Vector'][rbid]['RBname'])if len(choices) == 0:G2G.G2MessageBox(G2frame,'No Vector Rigid Bodies found', 'No VR Bodies')returnelif len(choices) == 1:rbid = rbIdlist[0]else:dlg... | 12 | 48 | 1 | 367 | 0 | 2,822 | 2,870 | 2,822 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.SaveVectorRB) defined within the public class called public.The function start at line 2822 and ends at 2870. It contains 48 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 | UpdateRigidBodies.ReadVectorRB | def ReadVectorRB(event):AtInfo = data['Vector']['AtInfo']pth = G2G.GetExportPath(G2frame)dlg = wx.FileDialog(G2frame, 'Choose file to read vector rigid body',pth, '', 'VRB files (*.vecbody)|*.vecbody',wx.FD_OPEN)try:if dlg.ShowModal() == wx.ID_OK:filename = dlg.GetPath()filename = os.path.splitext(filename)[0]+'.vecbod... | 13 | 53 | 1 | 490 | 0 | 2,872 | 2,924 | 2,872 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.ReadVectorRB) defined within the public class called public.The function start at line 2872 and ends at 2924. It contains 53 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 | UpdateRigidBodies.AddResidueRB | def AddResidueRB(event):global resRBselAtInfo = data['Residue']['AtInfo']macro = getMacroFile('rigid body')if not macro:returnmacStr = macro.readline()while macStr:items = macStr.split()if 'I' == items[0]:resRBsel = ran.randint(0,sys.maxsize)rbName = items[1]rbTypes = []rbXYZ = []rbSeq = []atNames = []nAtms,nSeq,nOrig,... | 13 | 50 | 1 | 496 | 0 | 2,926 | 2,975 | 2,926 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.AddResidueRB) defined within the public class called public.The function start at line 2926 and ends at 2975. It contains 50 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 | UpdateRigidBodies.ImportResidueRB | def ImportResidueRB():global resRBselAtInfo = data['Residue']['AtInfo']text,ext = getTextFile()if not text:returnresRBsel = ran.randint(0,sys.maxsize)rbTypes = []rbXYZ = []atNames = []txtStr = text.readline()if 'xyz' in ext:txtStr = text.readline()txtStr = text.readline()elif 'mol2' in ext:while 'ATOM' not in txtStr:tx... | 27 | 76 | 0 | 681 | 0 | 2,977 | 3,052 | 2,977 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.ImportResidueRB) defined within the public class called public.The function start at line 2977 and ends at 3052. It contains 76 lines of code and it has a cyclomatic complexity of 27. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.SaveResidueRB | def SaveResidueRB():global resRBselpth = G2G.GetExportPath(G2frame)dlg = wx.FileDialog(G2frame, 'Choose PDB file for Atom XYZ', pth, '', 'PDB files (*.pdb)|*.pdb',wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)try:if dlg.ShowModal() == wx.ID_OK:filename = dlg.GetPath()filename = os.path.splitext(filename)[0]+'.pdb'# make extension ... | 4 | 18 | 0 | 171 | 0 | 3,054 | 3,071 | 3,054 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.SaveResidueRB) defined within the public class called public.The function start at line 3054 and ends at 3071. It contains 18 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 | UpdateRigidBodies.AddSpinRB | def AddSpinRB(event):rbid = ran.randint(0,sys.maxsize)atType = 'C'rbType = 'Q'Natoms = 1name = 'UNKRB'namelist = [data['Spin'][key]['RBname'] for key in data['Spin']]name = G2obj.MakeUniqueLabel(name,namelist)atColor = G2elem.GetAtomInfo(atType)['Color']data['Spin'][rbid] = {'RBname':name,'Natoms':Natoms,'atType':atTyp... | 2 | 13 | 1 | 159 | 0 | 3,073 | 3,086 | 3,073 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.AddSpinRB) defined within the public class called public.The function start at line 3073 and ends at 3086. It contains 13 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 | UpdateRigidBodies.FindNeighbors | def FindNeighbors(Orig,XYZ,atTypes,atNames,AtInfo):Radii = []for Atype in atTypes:Radii.append(AtInfo[Atype][0])Radii = np.array(Radii)Neigh = []Dx = XYZ-XYZ[Orig]dist = np.sqrt(np.sum(Dx**2,axis=1))sumR = Radii[Orig]+RadiiIndB = ma.nonzero(ma.masked_greater(dist-0.85*sumR,0.))for j in IndB[0]:if j != Orig and atTypes[... | 5 | 14 | 5 | 134 | 0 | 3,088 | 3,101 | 3,088 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.FindNeighbors) defined within the public class called public.The function start at line 3088 and ends at 3101. It contains 14 lines of code and it has a cyclomatic complexity of 5. It takes 5 parameters, represented as [3088.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.FindAllNeighbors | def FindAllNeighbors(XYZ,atTypes,atNames,AtInfo):NeighDict = {}for iat,xyz in enumerate(atNames):NeighDict[atNames[iat]] = FindNeighbors(iat,XYZ,atTypes,atNames,AtInfo)return NeighDict | 2 | 5 | 4 | 47 | 0 | 3,103 | 3,107 | 3,103 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.FindAllNeighbors) defined within the public class called public.The function start at line 3103 and ends at 3107. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [3103.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.FindRiding | def FindRiding(Orig,Pivot,NeighDict):riding = [Orig,Pivot]iAdd = 1new = Truewhile new:newAtms = NeighDict[riding[iAdd]]for At in newAtms:new = Falseif At not in riding:riding.append(At)new = TrueiAdd += 1if iAdd < len(riding):new = Truereturn riding[2:] | 5 | 15 | 3 | 77 | 0 | 3,109 | 3,123 | 3,109 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.FindRiding) defined within the public class called public.The function start at line 3109 and ends at 3123. It contains 15 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [3109.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.OnDefineTorsSeq | def OnDefineTorsSeq(event):global resRBselrbData = data['Residue'][resRBsel]if not len(rbData):returnatNames = rbData['atNames']AtInfo = data['Residue']['AtInfo']atTypes = rbData['rbTypes']XYZ = rbData['rbXYZ']neighDict = FindAllNeighbors(XYZ,atTypes,atNames,AtInfo)TargList = []dlg = wx.SingleChoiceDialog(G2frame,'Sele... | 6 | 28 | 1 | 227 | 0 | 3,125 | 3,152 | 3,125 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.OnDefineTorsSeq) defined within the public class called public.The function start at line 3125 and ends at 3152. It contains 28 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 | UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbNameSizer.OnRBName | def OnRBName(event):event.Skip()Obj = event.GetEventObject()name = Obj.GetValue()if name == rbData['RBname']: return # no changenamelist = [data['Vector'][key]['RBname'] for key indata['Vector'] if 'RBname' in data['Vector'][key]]name = G2obj.MakeUniqueLabel(name,namelist)rbData['RBname'] = namewx.CallAfter(UpdateVecto... | 4 | 10 | 1 | 86 | 0 | 3,160 | 3,169 | 3,160 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbNameSizer.OnRBName) defined within the public class called public.The function start at line 3160 and ends at 3169. It contains 10 lines of code and it has a cyclomatic complexity of 4. The function doe... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbNameSizer.OnDelRB | def OnDelRB(event):Obj = event.GetEventObject()rbid = Indx[Obj.GetId()]if rbid in data['Vector']:del data['Vector'][rbid]data['RBIds']['Vector'].remove(rbid)rbData['useCount'] -= 1wx.CallAfter(UpdateVectorRB) | 2 | 8 | 1 | 62 | 0 | 3,171 | 3,178 | 3,171 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbNameSizer.OnDelRB) defined within the public class called public.The function start at line 3171 and ends at 3178. It contains 8 lines of code and it has a cyclomatic complexity of 2. The function does ... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbNameSizer.OnPlotRB | def OnPlotRB(event):G2plt.PlotRigidBody(G2frame,'Vector',AtInfo,rbData,plotDefaults) | 1 | 2 | 1 | 19 | 0 | 3,180 | 3,181 | 3,180 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbNameSizer.OnPlotRB) defined within the public class called public.The function start at line 3180 and ends at 3181. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbNameSizer | def rbNameSizer(rbid,rbData):def OnRBName(event):event.Skip()Obj = event.GetEventObject()name = Obj.GetValue()if name == rbData['RBname']: return # no changenamelist = [data['Vector'][key]['RBname'] for key indata['Vector'] if 'RBname' in data['Vector'][key]]name = G2obj.MakeUniqueLabel(name,namelist)rbData['RBname'] =... | 2 | 25 | 2 | 256 | 0 | 3,158 | 3,204 | 3,158 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbNameSizer) defined within the public class called public.The function start at line 3158 and ends at 3204. It contains 25 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [3158.0] and does not return any value... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbRefAtmSizer.OnRefSel | def OnRefSel(event):Obj = event.GetEventObject()iref = Indx[Obj.GetId()]sel = Obj.GetValue()rbData['rbRef'][iref] = atNames.index(sel)FillRefChoice(rbid,rbData) | 1 | 6 | 1 | 49 | 0 | 3,208 | 3,213 | 3,208 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbRefAtmSizer.OnRefSel) defined within the public class called public.The function start at line 3208 and ends at 3213. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function do... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbRefAtmSizer | def rbRefAtmSizer(rbid,rbData):def OnRefSel(event):Obj = event.GetEventObject()iref = Indx[Obj.GetId()]sel = Obj.GetValue()rbData['rbRef'][iref] = atNames.index(sel)FillRefChoice(rbid,rbData)refAtmSizer = wx.BoxSizer(wx.HORIZONTAL)atNames = [name+str(i) for i,name in enumerate(rbData['rbTypes'])]rbRef = rbData.get('rbR... | 5 | 30 | 2 | 276 | 0 | 3,206 | 3,242 | 3,206 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbRefAtmSizer) defined within the public class called public.The function start at line 3206 and ends at 3242. It contains 30 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [3206.0] and does not return any val... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbVectMag.OnRBVectorMag | def OnRBVectorMag(event):event.Skip()Obj = event.GetEventObject()rbid,imag = Indx[Obj.GetId()]try:val = float(Obj.GetValue())if val <= 0.:raise ValueErrorrbData['VectMag'][imag] = valexcept ValueError:passObj.SetValue('%8.4f'%(val))wx.CallAfter(UpdateVectorRB,VectorRB.GetScrollPos(wx.VERTICAL))G2plt.PlotRigidBody(G2fra... | 3 | 14 | 1 | 107 | 0 | 3,246 | 3,259 | 3,246 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbVectMag.OnRBVectorMag) defined within the public class called public.The function start at line 3246 and ends at 3259. It contains 14 lines of code and it has a cyclomatic complexity of 3. The function ... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbVectMag.OnRBVectorRef | def OnRBVectorRef(event):Obj = event.GetEventObject()rbid,imag = Indx[Obj.GetId()]rbData['VectRef'][imag] = Obj.GetValue() | 1 | 4 | 1 | 37 | 0 | 3,261 | 3,264 | 3,261 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbVectMag.OnRBVectorRef) defined within the public class called public.The function start at line 3261 and ends at 3264. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function d... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbVectMag | def rbVectMag(rbid,imag,rbData):def OnRBVectorMag(event):event.Skip()Obj = event.GetEventObject()rbid,imag = Indx[Obj.GetId()]try:val = float(Obj.GetValue())if val <= 0.:raise ValueErrorrbData['VectMag'][imag] = valexcept ValueError:passObj.SetValue('%8.4f'%(val))wx.CallAfter(UpdateVectorRB,VectorRB.GetScrollPos(wx.VER... | 1 | 18 | 3 | 187 | 0 | 3,244 | 3,280 | 3,244 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbVectMag) defined within the public class called public.The function start at line 3244 and ends at 3280. It contains 18 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [3244.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbVectors.TypeSelect | def TypeSelect(event):AtInfo = data['Vector']['AtInfo']r,c = event.GetRow(),event.GetCol()if vecGrid.GetColLabelValue(c) == 'Type':PE = G2elemGUI.PickElement(G2frame,oneOnly=True)if PE.ShowModal() == wx.ID_OK:if PE.Elem != 'None':El = PE.Elem.strip().lower().capitalize()if El not in AtInfo:Info = G2elem.GetAtomInfo(El)... | 5 | 15 | 1 | 155 | 0 | 3,284 | 3,298 | 3,284 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbVectors.TypeSelect) defined within the public class called public.The function start at line 3284 and ends at 3298. It contains 15 lines of code and it has a cyclomatic complexity of 5. The function doe... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbVectors.ChangeCell | def ChangeCell(event):r,c =event.GetRow(),event.GetCol()if r >= 0 and (0 <= c < 3):try:val = float(vecGrid.GetCellValue(r,c))rbData['rbVect'][imag][r][c] = valexcept ValueError:passG2plt.PlotRigidBody(G2frame,'Vector',AtInfo,data['Vector'][rbid],plotDefaults)wx.CallAfter(UpdateVectorRB,VectorRB.GetScrollPos(wx.VERTICAL... | 4 | 10 | 1 | 102 | 0 | 3,300 | 3,309 | 3,300 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbVectors.ChangeCell) defined within the public class called public.The function start at line 3300 and ends at 3309. It contains 10 lines of code and it has a cyclomatic complexity of 4. The function doe... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbVectors | def rbVectors(rbid,imag,mag,XYZ,rbData):def TypeSelect(event):AtInfo = data['Vector']['AtInfo']r,c = event.GetRow(),event.GetCol()if vecGrid.GetColLabelValue(c) == 'Type':PE = G2elemGUI.PickElement(G2frame,oneOnly=True)if PE.ShowModal() == wx.ID_OK:if PE.Elem != 'None':El = PE.Elem.strip().lower().capitalize()if El not... | 8 | 37 | 5 | 350 | 0 | 3,282 | 3,345 | 3,282 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.rbVectors) defined within the public class called public.The function start at line 3282 and ends at 3345. It contains 37 lines of code and it has a cyclomatic complexity of 8. It takes 5 parameters, represented as [3282.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.FillRefChoice | def FillRefChoice(rbid,rbData):choiceIds = [i for i in range(len(rbData['rbTypes']))]rbRef = rbData.get('rbRef',[-1,-1,-1,False])for i in range(3):if rbRef[i] in choiceIds: choiceIds.remove(rbRef[i])refChoice[rbid] = [choiceIds[:],choiceIds[:],choiceIds[:]]for i in range(3):refChoice[rbid][i].append(rbRef[i])refChoice[... | 5 | 9 | 2 | 126 | 0 | 3,347 | 3,356 | 3,347 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.FillRefChoice) defined within the public class called public.The function start at line 3347 and ends at 3356. It contains 9 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [3347.0] and does not return any valu... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.OnRBSelect | def OnRBSelect(event):global resRBselsel = rbSelect.GetSelection()if sel == 0: return # 1st entry is blankrbname = rbchoice[sel-1]resRBsel = RBnames[rbname]wx.CallLater(100,UpdateVectorRB) | 2 | 7 | 1 | 42 | 0 | 3,358 | 3,364 | 3,358 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.UpdateVectorRB.OnRBSelect) defined within the public class called public.The function start at line 3358 and ends at 3364. 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 | UpdateRigidBodies.UpdateVectorRB | def UpdateVectorRB(Scroll=0):'''Display & edit a selected Vector RB'''global resRBseldef rbNameSizer(rbid,rbData):def OnRBName(event):event.Skip()Obj = event.GetEventObject()name = Obj.GetValue()if name == rbData['RBname']: return # no changenamelist = [data['Vector'][key]['RBname'] for key indata['Vector'] if 'RBname'... | 12 | 66 | 1 | 554 | 0 | 3,154 | 3,430 | 3,154 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateVectorRB) defined within the public class called public.The function start at line 3154 and ends at 3430. It contains 66 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 | UpdateRigidBodies.UpdateRigidBodies.UpdateSpinRB.OnTypeSel | def OnTypeSel(event):Obj = event.GetEventObject()ObjId = event.GetId()data['Spin'][Indx[ObjId]]['rbType'] = Obj.GetValue() | 1 | 4 | 1 | 38 | 0 | 3,434 | 3,437 | 3,434 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.UpdateSpinRB.OnTypeSel) defined within the public class called public.The function start at line 3434 and ends at 3437. 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 | UpdateRigidBodies.UpdateRigidBodies.UpdateSpinRB.OnAtSel | def OnAtSel(event):Obj = event.GetEventObject()ObjId = event.GetId()PE = G2elemGUI.PickElement(G2frame,oneOnly=False)if PE.ShowModal() == wx.ID_OK:if PE.Elem != 'None':El = PE.Elem.strip().lower().capitalize()data['Spin'][Indx[ObjId]]['atType'] = Eldata['Spin'][Indx[ObjId]]['Color'] = G2elem.GetAtomInfo(El)['Color']Obj... | 4 | 12 | 1 | 121 | 0 | 3,439 | 3,450 | 3,439 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.UpdateSpinRB.OnAtSel) defined within the public class called public.The function start at line 3439 and ends at 3450. 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.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.UpdateSpinRB.OnElSel | def OnElSel(event):Obj = event.GetEventObject()ObjId = event.GetId()PE = G2elemGUI.PickElement(G2frame,oneOnly=False,ifOrbs=True)if PE.ShowModal() == wx.ID_OK:if PE.Elem != 'None':El = PE.Elem.strip().lower().capitalize()data['Spin'][Indx[ObjId]]['elType'] = ElObj.ChangeValue(El) | 3 | 9 | 1 | 91 | 0 | 3,452 | 3,460 | 3,452 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.UpdateSpinRB.OnElSel) defined within the public class called public.The function start at line 3452 and ends at 3460. 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.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.UpdateSpinRB.OnSymSel | def OnSymSel(event):ObjId = event.GetId()data['Spin'][Indx[ObjId]]['RBsym'] = simsel.GetValue() | 1 | 3 | 1 | 31 | 0 | 3,462 | 3,464 | 3,462 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.UpdateSpinRB.OnSymSel) defined within the public class called public.The function start at line 3462 and ends at 3464. 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 | UpdateRigidBodies.UpdateSpinRB | def UpdateSpinRB():def OnTypeSel(event):Obj = event.GetEventObject()ObjId = event.GetId()data['Spin'][Indx[ObjId]]['rbType'] = Obj.GetValue()def OnAtSel(event):Obj = event.GetEventObject()ObjId = event.GetId()PE = G2elemGUI.PickElement(G2frame,oneOnly=False)if PE.ShowModal() == wx.ID_OK:if PE.Elem != 'None':El = PE.Ele... | 14 | 72 | 0 | 716 | 0 | 3,432 | 3,538 | 3,432 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateSpinRB) defined within the public class called public.The function start at line 3432 and ends at 3538. It contains 72 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 | UpdateRigidBodies.UpdateRigidBodies.UpdateResidueRB.UpdateRigidBodies.UpdateRigidBodies.UpdateResidueRB.rbNameSizer.OnRBName | def OnRBName(event):event.Skip()Obj = event.GetEventObject()name = Obj.GetValue()if name == rbData['RBname']: return # no changenamelist = [data['Residue'][key]['RBname'] for key indata['Residue'] if 'RBname' in data['Residue'][key]]name = G2obj.MakeUniqueLabel(name,namelist)rbData['RBname'] = namewx.CallAfter(UpdateRe... | 4 | 10 | 1 | 86 | 0 | 3,546 | 3,555 | 3,546 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.UpdateResidueRB.UpdateRigidBodies.UpdateRigidBodies.UpdateResidueRB.rbNameSizer.OnRBName) defined within the public class called public.The function start at line 3546 and ends at 3555. It contains 10 lines of code and it has a cyclomatic complexity of 4. The function d... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.UpdateResidueRB.UpdateRigidBodies.UpdateRigidBodies.UpdateResidueRB.rbNameSizer.OnDelRB | def OnDelRB(event):Obj = event.GetEventObject()rbid = Indx[Obj.GetId()]if rbid in data['Residue']: del data['Residue'][rbid]data['RBIds']['Residue'].remove(rbid)wx.CallAfter(UpdateResidueRB) | 2 | 7 | 1 | 56 | 0 | 3,557 | 3,563 | 3,557 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.UpdateResidueRB.UpdateRigidBodies.UpdateRigidBodies.UpdateResidueRB.rbNameSizer.OnDelRB) defined within the public class called public.The function start at line 3557 and ends at 3563. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function doe... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.UpdateResidueRB.UpdateRigidBodies.UpdateRigidBodies.UpdateResidueRB.rbNameSizer.OnStripH | def OnStripH(event):Obj = event.GetEventObject()rbid = Indx[Obj.GetId()]if rbid in data['Residue']:newNames = []newTypes = []newXYZ = []for i,atype in enumerate(rbData['rbTypes']):if atype != 'H':newNames.append(rbData['atNames'][i])newTypes.append(rbData['rbTypes'][i])newXYZ.append(rbData['rbXYZ'][i])rbData['atNames']... | 4 | 17 | 1 | 134 | 0 | 3,565 | 3,581 | 3,565 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.UpdateResidueRB.UpdateRigidBodies.UpdateRigidBodies.UpdateResidueRB.rbNameSizer.OnStripH) defined within the public class called public.The function start at line 3565 and ends at 3581. It contains 17 lines of code and it has a cyclomatic complexity of 4. The function d... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateRigidBodies.UpdateRigidBodies.UpdateResidueRB.UpdateRigidBodies.UpdateRigidBodies.UpdateResidueRB.rbNameSizer.OnPlotRB | def OnPlotRB(event):G2plt.PlotRigidBody(G2frame,'Residue',AtInfo,rbData,plotDefaults) | 1 | 2 | 1 | 19 | 0 | 3,583 | 3,584 | 3,583 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateRigidBodies.UpdateRigidBodies.UpdateResidueRB.UpdateRigidBodies.UpdateRigidBodies.UpdateResidueRB.rbNameSizer.OnPlotRB) defined within the public class called public.The function start at line 3583 and ends at 3584. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function do... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.