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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.OnRunSubsMag.strTest | def strTest(text):if '.' in text: # no decimalsreturn Falseelif text.strip() in[' ','0','1','-1','3/2']: # specialsreturn Trueelif '/' in text: #process fractionnums = text.split('/')return (0 < int(nums[1]) < 10) and (0 < abs(int(nums[0])) < int(nums[1]))return False | 5 | 9 | 1 | 85 | 0 | 5,069 | 5,077 | 5,069 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.OnRunSubsMag.strTest) defined within the public class called public.The function start at line 5069 and ends at 5077. It contains 9 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 | UpdateUnitCellsGrid.OnRunSubsMag | def OnRunSubsMag(event,kvec1=None):def strTest(text):if '.' in text: # no decimalsreturn Falseelif text.strip() in[' ','0','1','-1','3/2']: # specialsreturn Trueelif '/' in text: #process fractionnums = text.split('/')return (0 < int(nums[1]) < 10) and (0 < abs(int(nums[0])) < int(nums[1]))return FalseG2frame.dataWindo... | 21 | 120 | 2 | 1,116 | 0 | 5,068 | 5,199 | 5,068 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.OnRunSubsMag) defined within the public class called public.The function start at line 5068 and ends at 5199. It contains 120 lines of code and it has a cyclomatic complexity of 21. It takes 2 parameters, represented as [5068.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.OnISODISTORT_kvec._showWebPage | def _showWebPage(event):'Show a web page when the user presses the "show" button'import tempfiletxt = event.GetEventObject().pagetmp = tempfile.NamedTemporaryFile(suffix='.html',delete=False)with open(tmp.name,'w') as fp:fp.write(txt.replace('<HEAD>','<head><base href="https://iso.byu.edu/">',))fileList.append(tmp.name... | 1 | 9 | 1 | 77 | 0 | 5,205 | 5,213 | 5,205 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.OnISODISTORT_kvec._showWebPage) defined within the public class called public.The function start at line 5205 and ends at 5213. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any val... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.OnISODISTORT_kvec.showWebtext | def showWebtext(txt):import tempfiletmp = tempfile.NamedTemporaryFile(suffix='.html',delete=False)with open(tmp.name,'w') as fp:fp.write(txt.replace('<HEAD>','<head><base href="https://iso.byu.edu/">',))fileList.append(tmp.name)G2G.ShowWebPage('file://'+tmp.name,G2frame) | 1 | 7 | 1 | 67 | 0 | 5,215 | 5,221 | 5,215 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.OnISODISTORT_kvec.showWebtext) defined within the public class called public.The function start at line 5215 and ends at 5221. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any valu... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.OnISODISTORT_kvec._get_opt_val | def _get_opt_val(opt_name, out):opt_pattern = rf'NAME="{opt_name}" VALUE="(.*?)"'opt_match = re.search(opt_pattern, out)return opt_match.group(1) | 1 | 4 | 2 | 28 | 0 | 5,223 | 5,227 | 5,223 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.OnISODISTORT_kvec._get_opt_val) defined within the public class called public.The function start at line 5223 and ends at 5227. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5223.0] and does not return an... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.OnISODISTORT_kvec.grab_all_kvecs | def grab_all_kvecs(out_html):"""Extract all k-vectors from the ISODISTORT output HTML."""import refrom k_vec_solve import k_vec_solve as kvsolvekvec1_pattern = r'<SELECT NAME="kvec1">(.*?)</SELECT>'kvec1_match = re.search(kvec1_pattern, out_html, re.DOTALL)if kvec1_match:select_content = kvec1_match.group(1)# Extract o... | 4 | 20 | 1 | 107 | 0 | 5,229 | 5,256 | 5,229 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.OnISODISTORT_kvec.grab_all_kvecs) defined within the public class called public.The function start at line 5229 and ends at 5256. It contains 20 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any ... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.OnISODISTORT_kvec.frac_str | def frac_str(value, max_den=1000):# Try to get a rational exactly; if huge, fall back to bounded approximationtry:rat = nsimplify(value, rational=True, maxsteps=50)if isinstance(rat, SRational):num, den = rat.as_numer_denom()num, den = int(num), int(den)if den <= max_den:return f"{num}/{den}" if den != 1 else str(num)e... | 7 | 15 | 2 | 122 | 0 | 5,260 | 5,278 | 5,260 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.OnISODISTORT_kvec.frac_str) defined within the public class called public.The function start at line 5260 and ends at 5278. It contains 15 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [5260.0] and does not return any v... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.OnISODISTORT_kvec.to_fraction_strs | def to_fraction_strs(d, keys=(a, b, g), max_den=1000):out = {}for k in keys:if k in d:out[str(k)] = frac_str(d[k], max_den)return out | 3 | 6 | 4 | 52 | 0 | 5,280 | 5,285 | 5,280 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.OnISODISTORT_kvec.to_fraction_strs) defined within the public class called public.The function start at line 5280 and ends at 5285. It contains 6 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [5280.0] and does not retur... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.OnISODISTORT_kvec.setup_kvec_input | def setup_kvec_input(k_vec, k_vec_dict, isocif_cif):"""Set up the input for isodistort post requestArgs:k_vec (str): The k-vector to use for the isodistort request.k_vec_dict (dict): The dictionary containing the k-vectorform extracted from isodistort.isocif_cif (str): The CIF file content exported from ISOCIF.Returns:... | 4 | 17 | 3 | 131 | 0 | 5,287 | 5,319 | 5,287 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.OnISODISTORT_kvec.setup_kvec_input) defined within the public class called public.The function start at line 5287 and ends at 5319. It contains 17 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [5287.0] and does not retu... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.OnISODISTORT_kvec._ShowPhase | def _ShowPhase():phId = G2gd.GetGPXtreeItemId(G2frame, G2frame.root, 'Phases')G2frame.GPXtree.Expand(phId)phId = G2gd.GetGPXtreeItemId(G2frame, phId, phsnam)G2frame.GPXtree.SelectItem(phId) | 1 | 5 | 0 | 46 | 0 | 5,570 | 5,574 | 5,570 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.OnISODISTORT_kvec._ShowPhase) defined within the public class called public.The function start at line 5570 and ends at 5574. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateUnitCellsGrid.OnISODISTORT_kvec | def OnISODISTORT_kvec(event):'''Search for k-vector using the ISODISTORT web service.Developed by Yuanpeng Zhang with help from Branton Campbell.'''def _showWebPage(event):'Show a web page when the user presses the "show" button'import tempfiletxt = event.GetEventObject().pagetmp = tempfile.NamedTemporaryFile(suffix='.... | 24 | 221 | 1 | 1,488 | 0 | 5,201 | 5,593 | 5,201 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.OnISODISTORT_kvec) defined within the public class called public.The function start at line 5201 and ends at 5593. It contains 221 lines of code and it has a cyclomatic complexity of 24. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateUnitCellsGrid.updateCellsWindow | def updateCellsWindow(event):'called when k-vec mode is selected'wx.CallAfter(UpdateUnitCellsGrid,G2frame,data) | 1 | 3 | 1 | 16 | 0 | 5,595 | 5,597 | 5,595 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.updateCellsWindow) defined within the public class called public.The function start at line 5595 and ends at 5597. 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 | UpdateUnitCellsGrid.OnClearCells | def OnClearCells(event):'remove previous search results'data[2] = []data[5] = []ssopt['SgResults'] = []wx.CallAfter(UpdateUnitCellsGrid, G2frame, data) | 1 | 6 | 1 | 37 | 0 | 5,599 | 5,604 | 5,599 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.OnClearCells) defined within the public class called public.The function start at line 5599 and ends at 5604. 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 | UpdateUnitCellsGrid.OnISODIST | def OnISODIST(event):phase_sel = G2frame.kvecSearch['phase']if len(phase_sel.strip()) == 0:err_title = "Missing parent phase"err_msg = "Please select the parent phase from "err_msg += "the drop-down list."G2G.G2MessageBox(G2frame, err_msg, err_title) | 2 | 7 | 1 | 44 | 0 | 5,606 | 5,612 | 5,606 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.OnISODIST) defined within the public class called public.The function start at line 5606 and ends at 5612. 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 | UpdateUnitCellsGrid._setupResultsGrid | def _setupResultsGrid(grid):'''Turn on scrolling for grid andregister the grid in resizeGrids so that it will beadjusted when the window is resized (also when first created).This ensure that Search Results tables display nicelywith scrollbars internal to the table (plays nicely with tableheaders). See _onResizeUnitCell... | 1 | 3 | 1 | 20 | 0 | 5,614 | 5,623 | 5,614 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid._setupResultsGrid) defined within the public class called public.The function start at line 5614 and ends at 5623. 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 | UpdateUnitCellsGrid.clearShowFlags | def clearShowFlags():'''resets all the "Use" flags in all search tables'''for i,grid in enumerate(resizeGrids):try:for c in range(grid.GetNumberCols()):if grid.GetColLabelValue(c) == 'show':for r in range(grid.GetNumberRows()):grid.GetTable().SetValue(r,c,False)grid.ForceRefresh()except:pass | 6 | 10 | 0 | 73 | 0 | 5,625 | 5,636 | 5,625 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.clearShowFlags) defined within the public class called public.The function start at line 5625 and ends at 5636. It contains 10 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 | UpdateUnitCellsGrid.disableCellEntries | def disableCellEntries(mode=False):'''Called to disable (or enable with mode==True) the widgetsassociated with entering a unit cell into the 2nd Box'''for item in unitSizerWidgetList:try:item.Enable(mode)except:pass | 3 | 6 | 1 | 24 | 0 | 5,638 | 5,646 | 5,638 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.disableCellEntries) defined within the public class called public.The function start at line 5638 and ends at 5646. 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 | UpdateUnitCellsGrid._onResizeUnitCellsList | def _onResizeUnitCellsList(event):'''This is called to adjust the sizes of objects inthe dataWindow display if that window is resized.The only task at present is to adjust the size of theGSGrid tables (search results) to be at most the newwidth of the window (less 15 pt to leave room for ascrollbar) but if the grid is ... | 4 | 15 | 1 | 121 | 0 | 5,648 | 5,676 | 5,648 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid._onResizeUnitCellsList) defined within the public class called public.The function start at line 5648 and ends at 5676. It contains 15 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.firstSizer.OnNcNo | def OnNcNo(event):controls[2] = NcNo.GetValue() | 1 | 2 | 1 | 15 | 0 | 5,680 | 5,681 | 5,680 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.firstSizer.OnNcNo) defined within the public class called public.The function start at line 5680 and ends at 5681. 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.firstSizer.OnIfX20 | def OnIfX20(event):G2frame.ifX20 = x20.GetValue() | 1 | 2 | 1 | 14 | 0 | 5,683 | 5,684 | 5,683 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.firstSizer.OnIfX20) defined within the public class called public.The function start at line 5683 and ends at 5684. 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.firstSizer.OnBravais | def OnBravais(event):Obj = event.GetEventObject()bravais[bravList.index(Obj.GetId())] = Obj.GetValue() | 1 | 3 | 1 | 31 | 0 | 5,686 | 5,688 | 5,686 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.firstSizer.OnBravais) defined within the public class called public.The function start at line 5686 and ends at 5688. 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 | UpdateUnitCellsGrid.firstSizer | def firstSizer():def OnNcNo(event):controls[2] = NcNo.GetValue()def OnIfX20(event):G2frame.ifX20 = x20.GetValue()def OnBravais(event):Obj = event.GetEventObject()bravais[bravList.index(Obj.GetId())] = Obj.GetValue()firstSizer = wx.BoxSizer(wx.VERTICAL)firstSizer.Add(wx.StaticText(parent=G2frame.dataWindow,label='Autoin... | 2 | 39 | 0 | 403 | 0 | 5,678 | 5,725 | 5,678 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.firstSizer) defined within the public class called public.The function start at line 5678 and ends at 5725. It contains 39 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.kvecSizer.OnKvecSearch | def OnKvecSearch(event):'Run the k-vector search'from . import k_vector_search as kvstry:import seekpathseekpathexcept:G2fil.NeededPackage({'magnetic k-vector search':['seekpath']})msg = 'Performing a k-vector search requires installation of the Python seekpath package. Use the Help/Add Package... to install that packa... | 22 | 163 | 1 | 1,093 | 0 | 5,730 | 5,958 | 5,730 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.kvecSizer.OnKvecSearch) defined within the public class called public.The function start at line 5730 and ends at 5958. It contains 163 lines of code and it has a cyclomatic complexity of 22. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateUnitCellsGrid.kvecSizer | def kvecSizer():def OnKvecSearch(event):'Run the k-vector search'from . import k_vector_search as kvstry:import seekpathseekpathexcept:G2fil.NeededPackage({'magnetic k-vector search':['seekpath']})msg = 'Performing a k-vector search requires installation of the Python seekpath package. Use the Help/Add Package... to in... | 3 | 63 | 0 | 900 | 0 | 5,728 | 6,027 | 5,728 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.kvecSizer) defined within the public class called public.The function start at line 5728 and ends at 6027. It contains 63 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnSSselect | def OnSSselect(event):if controls[5] in ['Fm3m','Im3m','Pm3m']:SSselect.SetValue(False)G2frame.ErrorDialog('Cubic lattice','Incommensurate superlattice not possible with a cubic lattice')returnssopt['Use'] = SSselect.GetValue()if 'ssSymb' not in ssopt:ssopt.update({'ssSymb':'(abg)','ModVec':[0.1,0.1,0.1],'maxH':1})wx.C... | 3 | 9 | 1 | 90 | 0 | 6,032 | 6,040 | 6,032 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnSSselect) defined within the public class called public.The function start at line 6032 and ends at 6040. 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnSelMG | def OnSelMG(event):ssopt['ssSymb'] = selMG.GetValue()Vec = ssopt['ModVec']modS = G2spc.splitSSsym(ssopt['ssSymb'])[0]ssopt['ModVec'] = G2spc.SSGModCheck(Vec,modS)[0]print (' Selecting: '+controls[13]+ssopt['ssSymb']+ 'maxH:'+str(ssopt['maxH']))OnHklShow(event,indexFrom=' Indexing from new super group %s'%(controls[13]+... | 1 | 8 | 1 | 105 | 0 | 6,042 | 6,049 | 6,042 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnSelMG) defined within the public class called public.The function start at line 6042 and ends at 6049. 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnModVal | def OnModVal(invalid,value,tc):OnHklShow(tc.event,indexFrom=' Indexing from new modulation vector') | 1 | 2 | 3 | 19 | 0 | 6,051 | 6,052 | 6,051 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnModVal) defined within the public class called public.The function start at line 6051 and ends at 6052. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [6051.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnMoveMod | def OnMoveMod(event):Obj = event.GetEventObject()ObjId = Obj.GetId()Id,valObj = Indx[ObjId]inc = float(shiftChoices[shiftSel.GetSelection()][:-1])move = Obj.GetValue()*inc/100.Obj.SetValue(0)value = min(0.98,max(-0.98,float(valObj.GetValue())+move))valObj.SetValue('%.4f'%(value))ssopt['ModVec'][Id] = valueOnHklShow(eve... | 1 | 11 | 1 | 117 | 0 | 6,054 | 6,064 | 6,054 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnMoveMod) defined within the public class called public.The function start at line 6054 and ends at 6064. It contains 11 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnMaxMH | def OnMaxMH(event):ssopt['maxH'] = int(maxMH.GetValue())print (' Selecting: '+controls[13]+ssopt['ssSymb']+'maxH:'+str(ssopt['maxH']))OnHklShow(event,indexFrom=' Indexing from new max. M') | 1 | 4 | 1 | 50 | 0 | 6,066 | 6,069 | 6,066 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnMaxMH) defined within the public class called public.The function start at line 6066 and ends at 6069. 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnButton | def OnButton(xpos,ypos):modSym = ssopt['ssSymb'].split(')')[0]+')'if modSym in ['(a0g)','(a1/2g)']:ssopt['ModVec'][0] = xposssopt['ModVec'][2] = yposelif modSym in ['(0bg)','(1/2bg)']:ssopt['ModVec'][1] = xposssopt['ModVec'][2] = yposelif modSym in ['(ab0)','(ab1/2)']:ssopt['ModVec'][0] = xposssopt['ModVec'][1] = yposv... | 4 | 15 | 2 | 159 | 0 | 6,071 | 6,085 | 6,071 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnButton) defined within the public class called public.The function start at line 6071 and ends at 6085. It contains 15 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [6071.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnFindOneMV | def OnFindOneMV(event):Peaks = np.copy(peaks[0])print (' Trying: '+controls[13],ssopt['ssSymb']+' maxH: 1')dlg = wx.ProgressDialog('Elapsed time','Modulation vector search',style = wx.PD_ELAPSED_TIME|wx.PD_AUTO_HIDE)try:ssopt['ModVec'],result = G2indx.findMV(Peaks,controls,ssopt,Inst,deltM,dlg)if len(result[0]) == 2:G2... | 4 | 18 | 1 | 227 | 0 | 6,087 | 6,105 | 6,087 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnFindOneMV) defined within the public class called public.The function start at line 6087 and ends at 6105. 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnFindMV | def OnFindMV(event):best = 1.bestSS = ''ssopt['SSgResults'] = []for ssSym in ssChoice:Vref = [x for x in ['a','b','g'] if x in ssSym]if len(Vref) > 1:print(' %s skipped - too many variables to search this way'%ssSym)continuessopt['ssSymb'] = ssSymPeaks = np.copy(peaks[0])ssopt['ModVec'] = G2spc.SSGModCheck(ssopt['ModVe... | 8 | 31 | 1 | 331 | 0 | 6,107 | 6,139 | 6,107 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnFindMV) defined within the public class called public.The function start at line 6107 and ends at 6139. It contains 31 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnBravSel | def OnBravSel(event):brav = bravSel.GetString(bravSel.GetSelection())controls[5] = bravcontrols[13] = SPGlist[brav][0]ssopt['Use'] = FalseOnHklShow(event,indexFrom=' Indexing from Bravais lattice %s'%brav)wx.CallLater(100,UpdateUnitCellsGrid,G2frame,data) | 1 | 7 | 1 | 63 | 0 | 6,141 | 6,147 | 6,141 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnBravSel) defined within the public class called public.The function start at line 6141 and ends at 6147. It contains 7 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnSpcSel | def OnSpcSel(event):controls[13] = spcSel.GetString(spcSel.GetSelection())ssopt['SGData'] = G2spc.SpcGroup(controls[13])[1]# ssopt['Use'] = FalseG2frame.dataWindow.RefineCell.Enable(True)OnHklShow(event,indexFrom=' Indexing from space group %s'%controls[13])wx.CallLater(100,UpdateUnitCellsGrid,G2frame,data) | 1 | 6 | 1 | 72 | 0 | 6,149 | 6,155 | 6,149 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnSpcSel) defined within the public class called public.The function start at line 6149 and ends at 6155. 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnTryAllSG | def OnTryAllSG(event):'''Computes extinctions for all possible space groupscreates data for a table that is displayed in the subsequentUpdateUnitCellsGrid call.'''ssopt['SgResults'] = []ssopt['SgSettings'] = ''for controls[13] in SPGlist[controls[5]]:ssopt['SGData'] = G2spc.SpcGroup(controls[13])[1]ssopt['Use'] = False... | 4 | 19 | 1 | 218 | 0 | 6,157 | 6,179 | 6,157 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnTryAllSG) defined within the public class called public.The function start at line 6157 and ends at 6179. It contains 19 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.SetCellValue | def SetCellValue(Obj,ObjId,value):if hasattr(Obj,'ChangeValue'):setval = Obj.ChangeValueelse:setval = Obj.SetValueif controls[5] in ['Fm3m','Im3m','Pm3m']:controls[6] = controls[7] = controls[8] = valuecontrols[9] = controls[10] = controls[11] = 90.0setval(controls[6])elif controls[5] in ['R3-H','P6/mmm','I4/mmm','P4/m... | 10 | 39 | 3 | 361 | 0 | 6,181 | 6,219 | 6,181 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.SetCellValue) defined within the public class called public.The function start at line 6181 and ends at 6219. It contains 39 lines of code and it has a cyclomatic complexity of 10. It takes 3 parameters, represented as [6181.0] and does not return any valu... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnMoveCell | def OnMoveCell(event):Obj = event.GetEventObject()ObjId = cellList.index(Obj.GetId())valObj = valDict[Obj.GetId()]inc = float(shiftChoices[shiftSel.GetSelection()][:-1])move = Obj.GetValue()# +1 or -1Obj.SetValue(0)value = float(valObj.GetValue()) * (1. + move*inc/100.)SetCellValue(valObj,ObjId//2,value)OnHklShow(event... | 1 | 10 | 1 | 101 | 0 | 6,221 | 6,230 | 6,221 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnMoveCell) defined within the public class called public.The function start at line 6221 and ends at 6230. 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnCellChange | def OnCellChange(invalid,value,tc):if invalid:returntry: # fails when zero is updatedSetCellValue(tc,Info[tc.GetId()],value)except:passOnHklShow(tc.event,indexFrom=' Indexing from new cell ')wx.CallAfter(UpdateUnitCellsGrid,G2frame,data) | 3 | 9 | 3 | 53 | 0 | 6,232 | 6,240 | 6,232 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnCellChange) defined within the public class called public.The function start at line 6232 and ends at 6240. It contains 9 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [6232.0] and does not return any value.... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnMagSel | def OnMagSel(event):Obj = event.GetEventObject()if Obj.GetValue():SGData['SGSpin'] = [1,]*len(SGData['SGSpin'])GenSym,GenFlg,BNSsym = G2spc.GetGenSym(SGData)SGData['GenSym'] = GenSymSGData['GenFlg'] = GenFlgOprNames,SpnFlp = G2spc.GenMagOps(SGData)SGData['SpnFlp'] = SpnFlpSGData['MagSpGrp'] = G2spc.MagSGSym(SGData)else... | 2 | 15 | 1 | 118 | 0 | 6,242 | 6,256 | 6,242 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnMagSel) defined within the public class called public.The function start at line 6242 and ends at 6256. It contains 15 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnSpinOp | def OnSpinOp(event):Obj = event.GetEventObject()isym = Indx[Obj.GetId()]+1spCode = {'red':-1,'black':1}SGData['SGSpin'][isym] = spCode[Obj.GetValue()]G2spc.CheckSpin(isym,SGData)GenSym,GenFlg,BNSsym = G2spc.GetGenSym(SGData)SGData['GenSym'] = GenSymSGData['GenFlg'] = GenFlgOprNames,SpnFlp = G2spc.GenMagOps(SGData)SGDat... | 1 | 13 | 1 | 119 | 0 | 6,258 | 6,270 | 6,258 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnSpinOp) defined within the public class called public.The function start at line 6258 and ends at 6270. It contains 13 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnBNSlatt | def OnBNSlatt(event):Obj = event.GetEventObject()SGData.update(G2spc.SpcGroup(SGData['SpGrp'])[1])BNSlatt = Obj.GetValue()if '_' in BNSlatt:SGData['BNSlattsym'] = [BNSlatt,BNSsym[BNSlatt]]else:SGData['BNSlattsym'] = [SGData['SGLatt'],[0.,0.,0.]]SGData['SGSpin'] = [1,]*len(SGData['SGSpin'])GenSym,GenFlg = G2spc.GetGenSy... | 2 | 17 | 1 | 167 | 0 | 6,272 | 6,288 | 6,272 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnBNSlatt) defined within the public class called public.The function start at line 6272 and ends at 6288. It contains 17 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnShowSpins | def OnShowSpins(event):msg = 'Magnetic space group information'text,table = G2spc.SGPrint(SGData,AddInv=True)text[0] = ' Magnetic Space Group: '+SGData['MagSpGrp']text[3] = ' The magnetic lattice point group is '+SGData['MagPtGp']G2G.SGMagSpinBox(G2frame.dataWindow,msg,text,table,SGData['SGCen'],OprNames,SGData['SpnFlp... | 1 | 7 | 1 | 76 | 0 | 6,290 | 6,296 | 6,290 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnShowSpins) defined within the public class called public.The function start at line 6290 and ends at 6296. It contains 7 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnMakePks | def OnMakePks(event):msg = ('This will replace the current contents of the Peaks List'+ ' with peak positions generated from the current cell.'+ ' Are you sure you want to delete the previous Peak List'+ ' contents?')dlg = wx.MessageDialog(G2frame, msg,'Replace peaks?',wx.YES_NO|wx.ICON_QUESTION)try:result = dlg.ShowMo... | 11 | 44 | 1 | 471 | 0 | 6,298 | 6,342 | 6,298 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnMakePks) defined within the public class called public.The function start at line 6298 and ends at 6342. It contains 44 lines of code and it has a cyclomatic complexity of 11. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnNewHklShow | def OnNewHklShow(event):disableCellEntries(True)clearShowFlags()OnHklShow(event,indexFrom=' Indexing from unit cell & symmetry settings') | 1 | 4 | 1 | 20 | 0 | 6,344 | 6,347 | 6,344 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnNewHklShow) defined within the public class called public.The function start at line 6344 and ends at 6347. 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnExtHklShow | def OnExtHklShow(event):Obj = event.GetEventObject()if Obj.GetValue():OnHklShow(event,indexFrom=' Indexing including extinct hkls')else:OnHklShow(event,indexFrom=' Indexing from unit cell & symmetry settings') | 2 | 6 | 1 | 37 | 0 | 6,349 | 6,354 | 6,349 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnExtHklShow) defined within the public class called public.The function start at line 6349 and ends at 6354. 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnAxHklShow | def OnAxHklShow():mode = Sel.GetStringSelection()if 'None' not in mode:OnHklShow(None,indexFrom=' Indexing showing only %s hkls'%mode)else:OnHklShow(None,indexFrom=' Indexing from unit cell & symmetry settings') | 2 | 6 | 0 | 37 | 0 | 6,356 | 6,361 | 6,356 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.unitSizer.OnAxHklShow) defined within the public class called public.The function start at line 6356 and ends at 6361. 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 | UpdateUnitCellsGrid.unitSizer | def unitSizer():def OnSSselect(event):if controls[5] in ['Fm3m','Im3m','Pm3m']:SSselect.SetValue(False)G2frame.ErrorDialog('Cubic lattice','Incommensurate superlattice not possible with a cubic lattice')returnssopt['Use'] = SSselect.GetValue()if 'ssSymb' not in ssopt:ssopt.update({'ssSymb':'(abg)','ModVec':[0.1,0.1,0.1... | 27 | 243 | 0 | 2,613 | 0 | 6,030 | 6,588 | 6,030 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.unitSizer) defined within the public class called public.The function start at line 6030 and ends at 6588. It contains 243 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.SpGrpGrid.OnSelectSgrp | def OnSelectSgrp(event):'Called when the Space Group Search Results show column is checked'if event is not None:clearShowFlags()r = event.GetRow()for i in range(len(ssopt['SgResults'])):ssopt['SgResults'][i][1] = FalseSgTable.SetValue(i,1,False)SgTable.SetValue(r,1,True)controls[13] = ssopt['SgResults'][r][0]else:for r... | 5 | 19 | 1 | 178 | 0 | 6,593 | 6,611 | 6,593 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.SpGrpGrid.OnSelectSgrp) defined within the public class called public.The function start at line 6593 and ends at 6611. 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 | UpdateUnitCellsGrid.SpGrpGrid | def SpGrpGrid():def OnSelectSgrp(event):'Called when the Space Group Search Results show column is checked'if event is not None:clearShowFlags()r = event.GetRow()for i in range(len(ssopt['SgResults'])):ssopt['SgResults'][i][1] = FalseSgTable.SetValue(i,1,False)SgTable.SetValue(r,1,True)controls[13] = ssopt['SgResults']... | 5 | 30 | 0 | 257 | 0 | 6,591 | 6,640 | 6,591 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.SpGrpGrid) defined within the public class called public.The function start at line 6591 and ends at 6640. It contains 30 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.SSGrid.OnSelectSSG | def OnSelectSSG(event):'Called when the Super Space Group Search Results show column is checked'if event is not None:if event.GetCol() != 1:returnclearShowFlags()r = event.GetRow()for i in range(len(ssopt['SSgResults'])):results[i][1] = FalseSSgTable.SetValue(r,1,True)ssopt['ModVec'] = results[r][4:]ssopt['ssSymb'] = r... | 4 | 15 | 1 | 125 | 0 | 6,644 | 6,667 | 6,644 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.SSGrid.OnSelectSSG) defined within the public class called public.The function start at line 6644 and ends at 6667. It contains 15 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 | UpdateUnitCellsGrid.SSGrid | def SSGrid():def OnSelectSSG(event):'Called when the Super Space Group Search Results show column is checked'if event is not None:if event.GetCol() != 1:returnclearShowFlags()r = event.GetRow()for i in range(len(ssopt['SSgResults'])):results[i][1] = FalseSSgTable.SetValue(r,1,True)ssopt['ModVec'] = results[r][4:]ssopt[... | 7 | 38 | 0 | 341 | 0 | 6,642 | 6,704 | 6,642 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.SSGrid) defined within the public class called public.The function start at line 6642 and ends at 6704. It contains 38 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.MagSubGrid.ClearCurrentShowNext | def ClearCurrentShowNext():KeepShowNext(False) | 1 | 2 | 0 | 8 | 0 | 6,709 | 6,710 | 6,709 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.MagSubGrid.ClearCurrentShowNext) defined within the public class called public.The function start at line 6709 and ends at 6710. 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 va... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.MagSubGrid.KeepCurrentShowNext | def KeepCurrentShowNext():KeepShowNext(True) | 1 | 2 | 0 | 8 | 0 | 6,714 | 6,715 | 6,714 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.MagSubGrid.KeepCurrentShowNext) defined within the public class called public.The function start at line 6714 and ends at 6715. 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 val... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.MagSubGrid.KeepShowNext | def KeepShowNext(KeepCurrent=True):'''Show next "keep" item in Magnetic Space Group list, possibly resetting thekeep flag for the current displayed cell'''for i in range(len(magcells)): # find plotted settingif magcells[i]['Use']: breakelse:return # no Try is setif not KeepCurrent:# clear currentmagcells[i]['Keep'] = F... | 8 | 25 | 1 | 246 | 0 | 6,719 | 6,749 | 6,719 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.MagSubGrid.KeepShowNext) defined within the public class called public.The function start at line 6719 and ends at 6749. It contains 25 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 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.MagSubGrid.RefreshMagCellsGrid | def RefreshMagCellsGrid(event):'Display results from k-SUBGROUPSMAG in the Unit Cells tab & allow inspection of results'controls,bravais,cells,dminx,ssopt,magcells = G2frame.GPXtree.GetItemPyData(UnitCellsId)r,c =event.GetRow(),event.GetCol()rLab = magDisplay.GetRowLabelValue(r)br = baseList[r]phase = phaseDict[br]pnam... | 21 | 100 | 1 | 861 | 0 | 6,751 | 6,850 | 6,751 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.MagSubGrid.RefreshMagCellsGrid) defined within the public class called public.The function start at line 6751 and ends at 6850. It contains 100 lines of code and it has a cyclomatic complexity of 21. The function does not take any parameters and does not return any ... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateUnitCellsGrid.UpdateUnitCellsGrid.MagSubGrid.OnRefreshKeep | def OnRefreshKeep(event):controls,bravais,cells,dminx,ssopt,magcells = G2frame.GPXtree.GetItemPyData(UnitCellsId)c =event.GetCol()E,SGData = G2spc.SpcGroup(controls[13])if c == 2:testAtoms = ['',]+list(set([atom[1] for atom in controls[15]]))ifMag = Falsemaxequiv = magcells[0]['maxequiv']maximal = Falseif 'magAtms' in ... | 10 | 42 | 1 | 477 | 0 | 6,852 | 6,893 | 6,852 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.UpdateUnitCellsGrid.MagSubGrid.OnRefreshKeep) defined within the public class called public.The function start at line 6852 and ends at 6893. It contains 42 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 | UpdateUnitCellsGrid.MagSubGrid | def MagSubGrid():global KeyListdef ClearCurrentShowNext():KeepShowNext(False)KeyList += [['j',ClearCurrentShowNext,'Show next Mag. Spc. Group, clear keep flag on current']]def KeepCurrentShowNext():KeepShowNext(True)KeyList += [['k',KeepCurrentShowNext,'Show next Mag. Spc. Group, keep current']]def KeepShowNext(KeepCur... | 11 | 66 | 0 | 638 | 0 | 6,706 | 6,951 | 6,706 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid.MagSubGrid) defined within the public class called public.The function start at line 6706 and ends at 6951. It contains 66 lines of code and it has a cyclomatic complexity of 11. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateUnitCellsGrid | def UpdateUnitCellsGrid(G2frame, data, callSeaResSelected=False,New=False,showUse=False):'''respond to selection of PWDR Unit Cells data tree item.:param wx.Frame G2frame: Main GSAS-II window:param dict data: contents of "Unit Cells List" data tree item:param bool callSeaResSelected: when True, selects first entry inUn... | 45 | 234 | 5 | 2,117 | 385 | 4,287 | 7,201 | 4,287 | null | ['tol', 'useGUI', 'isocifformsite', 'kparam1', 'tolVal', 'ch', 'magAtms', 'hkl', 'filterby', 'isym', 'ssChoice', 'r', 'pName', 'cell_params', 'M20', 'hist_name', 'isocif_form', 'valSizer', 'tol_val', 'SPGlist', 'spc', 'File', 'modSpin', 'spcSel', 'br', 'CSI', 'x0', 'maxH', 'tolerance', 'testAtoms', 'bestCell', 'btnsize... | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateUnitCellsGrid) defined within the public class called public.The function start at line 4287 and ends at 7201. It contains 234 lines of code and it has a cyclomatic complexity of 45. It takes 5 parameters, represented as [4287.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateReflectionGrid.OnPlot1DHKL | def OnPlot1DHKL(event):phaseName = G2frame.RefListif phaseName not in ['Unknown',]:pId = G2gd.GetGPXtreeItemId(G2frame,G2frame.root,'Phases')phaseId =G2gd.GetGPXtreeItemId(G2frame,pId,phaseName)General = G2frame.GPXtree.GetItemPyData(phaseId)['General']Super = General.get('Super',0)else:Super = 0if 'list' in str(type(d... | 4 | 18 | 1 | 152 | 0 | 7,219 | 7,236 | 7,219 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateReflectionGrid.OnPlot1DHKL) defined within the public class called public.The function start at line 7219 and ends at 7236. 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 | UpdateReflectionGrid.OnPlotHKL | def OnPlotHKL(event):'''Plots a layer of reflections'''phaseName = G2frame.RefListif phaseName not in ['Unknown',]:pId = G2gd.GetGPXtreeItemId(G2frame,G2frame.root,'Phases')phaseId =G2gd.GetGPXtreeItemId(G2frame,pId,phaseName)General = G2frame.GPXtree.GetItemPyData(phaseId)['General']Super = General.get('Super',0)Super... | 4 | 25 | 1 | 334 | 0 | 7,238 | 7,264 | 7,238 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateReflectionGrid.OnPlotHKL) defined within the public class called public.The function start at line 7238 and ends at 7264. It contains 25 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 | UpdateReflectionGrid.OnPlot3DHKL | def OnPlot3DHKL(event):'''Plots the reflections in 3D'''phaseName = G2frame.RefListSuper = 0SuperVec = []if phaseName not in ['Unknown',]:pId = G2gd.GetGPXtreeItemId(G2frame,G2frame.root,'Phases')phaseId =G2gd.GetGPXtreeItemId(G2frame,pId,phaseName)General = G2frame.GPXtree.GetItemPyData(phaseId)['General']if General.g... | 5 | 29 | 1 | 508 | 0 | 7,266 | 7,296 | 7,266 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateReflectionGrid.OnPlot3DHKL) defined within the public class called public.The function start at line 7266 and ends at 7296. It contains 29 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 | UpdateReflectionGrid.OnWilsonStat | def OnWilsonStat(event):''' Show Wilson plot for PWDR and HKLF & return Wilson statistics <<E>, <E^2> & <E^2-1> to console'''phaseName = G2frame.RefListif phaseName not in ['Unknown',]:pId = G2gd.GetGPXtreeItemId(G2frame,G2frame.root,'Phases')phaseId =G2gd.GetGPXtreeItemId(G2frame,pId,phaseName)General = G2frame.GPXtre... | 5 | 28 | 1 | 281 | 0 | 7,298 | 7,328 | 7,298 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateReflectionGrid.OnWilsonStat) defined within the public class called public.The function start at line 7298 and ends at 7328. It contains 28 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 | UpdateReflectionGrid.OnMakeCSV | def OnMakeCSV(event):'''Make csv file from displayed ref table.'''phaseName = G2frame.RefListpth = G2G.GetExportPath(G2frame)dlg = wx.FileDialog(G2frame, 'Choose Reflection List csv file', pth, '','Reflection List (*.csv)|*.csv',wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)try:if dlg.ShowModal() == wx.ID_OK:filename = dlg.GetPath... | 6 | 21 | 1 | 198 | 0 | 7,330 | 7,352 | 7,330 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateReflectionGrid.OnMakeCSV) defined within the public class called public.The function start at line 7330 and ends at 7352. 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 | UpdateReflectionGrid.MakeReflectionTable | def MakeReflectionTable(phaseName):'''Returns a wx.grid table (G2G.Table) containing a list of all reflectionsfor a phase.'''Super = 0if phaseName not in ['Unknown',]:pId = G2gd.GetGPXtreeItemId(G2frame,G2frame.root,'Phases')if pId: # phase section missing from file (unusual)phaseId =G2gd.GetGPXtreeItemId(G2frame,pId,p... | 30 | 82 | 1 | 1,064 | 0 | 7,354 | 7,438 | 7,354 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateReflectionGrid.MakeReflectionTable) defined within the public class called public.The function start at line 7354 and ends at 7438. It contains 82 lines of code and it has a cyclomatic complexity of 30. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateReflectionGrid.UpdateReflectionGrid.ShowReflTable.setBackgroundColors | def setBackgroundColors(im,it):for r in range(G2frame.refTable[phaseName].GetNumberRows()):if HKLF:if float(G2frame.refTable[phaseName].GetCellValue(r,3+im)) <= 0.:G2frame.refTable[phaseName].SetCellBackgroundColour(r,3+im,wx.RED)Fosq = float(G2frame.refTable[phaseName].GetCellValue(r,5+im))Fcsq = float(G2frame.refTabl... | 9 | 20 | 2 | 293 | 0 | 7,444 | 7,463 | 7,444 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateReflectionGrid.UpdateReflectionGrid.ShowReflTable.setBackgroundColors) defined within the public class called public.The function start at line 7444 and ends at 7463. It contains 20 lines of code and it has a cyclomatic complexity of 9. It takes 2 parameters, represented as [7444.0] and does not ret... |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateReflectionGrid.ShowReflTable | def ShowReflTable(phaseName):'''Posts a table of reflections for a phase, creating the tableif needed using MakeReflectionTable'''def setBackgroundColors(im,it):for r in range(G2frame.refTable[phaseName].GetNumberRows()):if HKLF:if float(G2frame.refTable[phaseName].GetCellValue(r,3+im)) <= 0.:G2frame.refTable[phaseName... | 16 | 40 | 1 | 354 | 0 | 7,440 | 7,505 | 7,440 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateReflectionGrid.ShowReflTable) defined within the public class called public.The function start at line 7440 and ends at 7505. It contains 40 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 | UpdateReflectionGrid.OnToggleExt | def OnToggleExt(event):G2frame.Hide = not G2frame.HideUpdateReflectionGrid(G2frame,data,HKLF=True,Name=Name) | 1 | 3 | 1 | 27 | 0 | 7,507 | 7,509 | 7,507 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateReflectionGrid.OnToggleExt) defined within the public class called public.The function start at line 7507 and ends at 7509. 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 | UpdateReflectionGrid.OnPageChanged | def OnPageChanged(event):'''Respond to a press on a phase tab by displaying the reflections. Thisroutine is needed because the reflection table may not have been created yet.'''G2frame.refBook.SetSize(G2frame.dataWindow.GetClientSize())#TODO -almost rightpage = event.GetSelection()phaseName = G2frame.refBook.GetPageTex... | 1 | 5 | 1 | 41 | 0 | 7,511 | 7,518 | 7,511 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateReflectionGrid.OnPageChanged) defined within the public class called public.The function start at line 7511 and ends at 7518. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateReflectionGrid.OnSelectPhase | def OnSelectPhase(event):'''For PWDR, selects a phase with a selection box. Called from menu.'''if len(phases) < 2: returndlg = wx.SingleChoiceDialog(G2frame,'Select','Phase',phases)try:if dlg.ShowModal() == wx.ID_OK:sel = dlg.GetSelection()ShowReflTable(phases[sel])finally:dlg.Destroy() | 4 | 9 | 1 | 63 | 0 | 7,520 | 7,530 | 7,520 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateReflectionGrid.OnSelectPhase) defined within the public class called public.The function start at line 7520 and ends at 7530. It contains 9 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateReflectionGrid | def UpdateReflectionGrid(G2frame,data,HKLF=False,Name=''):'''respond to selection of PWDR or HKLF Reflections data treeitem by displaying a table of reflections in the data window.Note that this is used for Single Xtal even though in pwdGUI.'''Controls = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2fra... | 14 | 86 | 4 | 762 | 52 | 7,206 | 7,602 | 7,206 | null | ['im', 'normEle', 'colLabels', 'dMin', 'pId', 'Controls', 'XY', 'File', 'rowLabels', 'Histograms', 'refList', 'CrSize', 'I100', 'topSizer', 'Super', 'Fosq', 'Vpoint', 'Fcsq', 'MuStr', 'phaseId', 'page', 'parent', 'Hmax', 'PE', 'filename', 'Inst', 'phases', 'dlg', 'strLine', 'SGData', 'rat', 'pth', 'nRows', 'lbl', 'itof... | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateReflectionGrid) defined within the public class called public.The function start at line 7206 and ends at 7602. It contains 86 lines of code and it has a cyclomatic complexity of 14. It takes 4 parameters, represented as [7206.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateSubstanceGrid.LoadSubstance | def LoadSubstance(name):subst = substFile.Substances[name]ElList = subst['Elements'].keys()for El in ElList:Info = G2elem.GetAtomInfo(El.strip().capitalize())Info.update(subst['Elements'][El])data['Substances'][name]['Elements'][El] = Infoif 'Volume' in subst:data['Substances'][name]['Volume'] = subst['Volume']data['Su... | 6 | 33 | 1 | 501 | 0 | 7,612 | 7,644 | 7,612 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateSubstanceGrid.LoadSubstance) defined within the public class called public.The function start at line 7612 and ends at 7644. 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 | UpdateSubstanceGrid.OnReloadSubstances | def OnReloadSubstances(event):for name in data['Substances'].keys():if name not in ['vacuum','unit scatter']:if 'X' in Inst['Type'][0]:data['Substances'][name]['Scatt density'] = \G2mth.XScattDen(data['Substances'][name]['Elements'],data['Substances'][name]['Volume'])[0]recontrst,absorb,imcontrst = G2mth.XScattDen(data... | 5 | 15 | 1 | 241 | 0 | 7,646 | 7,661 | 7,646 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateSubstanceGrid.OnReloadSubstances) defined within the public class called public.The function start at line 7646 and ends at 7661. It contains 15 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateSubstanceGrid.OnLoadSubstance | def OnLoadSubstance(event):names = list(substFile.Substances.keys())names.sort()dlg = wx.SingleChoiceDialog(G2frame, 'Which substance?', 'Select substance', names, wx.CHOICEDLG_STYLE)try:if dlg.ShowModal() == wx.ID_OK:name = names[dlg.GetSelection()]else:returnfinally:dlg.Destroy()data['Substances'][name] = {'Elements'... | 3 | 15 | 1 | 133 | 0 | 7,663 | 7,679 | 7,663 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateSubstanceGrid.OnLoadSubstance) defined within the public class called public.The function start at line 7663 and ends at 7679. 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 | UpdateSubstanceGrid.OnCopySubstance | def OnCopySubstance(event):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 substances from\n'+hst[5:]+' to...','Copy substances', h... | 10 | 30 | 1 | 328 | 0 | 7,681 | 7,710 | 7,681 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateSubstanceGrid.OnCopySubstance) defined within the public class called public.The function start at line 7681 and ends at 7710. It contains 30 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 | UpdateSubstanceGrid.OnAddSubstance | def OnAddSubstance(event):dlg = wx.TextEntryDialog(None,'Enter a name for this substance','Substance Name Entry','New substance',style=wx.OK|wx.CANCEL)if dlg.ShowModal() == wx.ID_OK:Name = dlg.GetValue()data['Substances'][Name] = {'Elements':{},'Volume':1.0,'Density':1.0,'Scatt density':0.0,'XAnom density':0.,'XAbsorpt... | 3 | 14 | 1 | 133 | 0 | 7,712 | 7,725 | 7,712 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateSubstanceGrid.OnAddSubstance) defined within the public class called public.The function start at line 7712 and ends at 7725. It contains 14 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 | UpdateSubstanceGrid.OnDeleteSubstance | def OnDeleteSubstance(event):TextList = []for name in data['Substances']:if name not in ['vacuum','unit scatter']:TextList += [name,]if not TextList:returndlg = wx.SingleChoiceDialog(G2frame, 'Which substance?', 'Select substance to delete', TextList, wx.CHOICEDLG_STYLE)try:if dlg.ShowModal() == wx.ID_OK:name = TextLis... | 6 | 17 | 1 | 105 | 0 | 7,727 | 7,743 | 7,727 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateSubstanceGrid.OnDeleteSubstance) defined within the public class called public.The function start at line 7727 and ends at 7743. It contains 17 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 | UpdateSubstanceGrid.OnAddElement | def OnAddElement(event):TextList = []for name in data['Substances']:if name not in ['vacuum','unit scatter']:TextList += [name,]if not TextList:returndlg = wx.SingleChoiceDialog(G2frame, 'Which substance?', 'Select substance', TextList, wx.CHOICEDLG_STYLE)try:if dlg.ShowModal() == wx.ID_OK:name = TextList[dlg.GetSelect... | 6 | 17 | 1 | 99 | 0 | 7,745 | 7,761 | 7,745 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateSubstanceGrid.OnAddElement) defined within the public class called public.The function start at line 7745 and ends at 7761. It contains 17 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 | UpdateSubstanceGrid.AddElement | def AddElement(name):ElList = list(data['Substances'][name]['Elements'].keys())dlg = G2elemGUI.PickElements(G2frame,ElList)if dlg.ShowModal() == wx.ID_OK:for El in dlg.Elem:El = El.strip().capitalize()Info = G2elem.GetAtomInfo(El)Info.update({'Num':1.})data['Substances'][name]['Elements'][El] = Infoisotopes = list(Info... | 5 | 29 | 1 | 417 | 0 | 7,763 | 7,791 | 7,763 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateSubstanceGrid.AddElement) defined within the public class called public.The function start at line 7763 and ends at 7791. It contains 29 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 | UpdateSubstanceGrid.OnDeleteElement | def OnDeleteElement(event):TextList = []for name in data['Substances']:if name not in ['vacuum','unit scatter']:TextList += [name,]if not TextList:returndlg = wx.SingleChoiceDialog(G2frame, 'Which substance?', 'Select substance', TextList, wx.CHOICEDLG_STYLE)try:if dlg.ShowModal() == wx.ID_OK:name = TextList[dlg.GetSel... | 10 | 36 | 1 | 444 | 0 | 7,793 | 7,828 | 7,793 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateSubstanceGrid.OnDeleteElement) defined within the public class called public.The function start at line 7793 and ends at 7828. It contains 36 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 | UpdateSubstanceGrid.UpdateSubstanceGrid.SubstSizer.OnNum | def OnNum(invalid,value,tc):if invalid: returnname,El,keyId = Indx[tc.GetId()]data['Substances'][name]['Volume'] = G2mth.El2EstVol(data['Substances'][name]['Elements'])data['Substances'][name]['Density'] = \G2mth.Vol2Den(data['Substances'][name]['Elements'],data['Substances'][name]['Volume'])if 'X' in Inst['Type'][0]:r... | 4 | 14 | 3 | 227 | 0 | 7,832 | 7,845 | 7,832 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateSubstanceGrid.UpdateSubstanceGrid.SubstSizer.OnNum) defined within the public class called public.The function start at line 7832 and ends at 7845. It contains 14 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [7832.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateSubstanceGrid.UpdateSubstanceGrid.SubstSizer.OnVolDen | def OnVolDen(invalid,value,tc):if invalid: returnname,keyId = Indx[tc.GetId()]if keyId in 'Volume':data['Substances'][name]['Density'] = \G2mth.Vol2Den(data['Substances'][name]['Elements'],value)elif keyId in 'Density':data['Substances'][name]['Volume'] = \G2mth.Den2Vol(data['Substances'][name]['Elements'],value)if 'X'... | 6 | 21 | 3 | 311 | 0 | 7,847 | 7,867 | 7,847 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateSubstanceGrid.UpdateSubstanceGrid.SubstSizer.OnVolDen) defined within the public class called public.The function start at line 7847 and ends at 7867. It contains 21 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [7847.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateSubstanceGrid.UpdateSubstanceGrid.SubstSizer.OnIsotope | def OnIsotope(event):Obj = event.GetEventObject()El,name = Indx[Obj.GetId()]data['Substances'][name]['Elements'][El]['Isotope'] = Obj.GetValue()recontrst,absorb,imcontrst = G2mth.NCScattDen(data['Substances'][name]['Elements'],data['Substances'][name]['Volume'],wave)data['Substances'][name]['XAnom density'] = recontrst... | 1 | 9 | 1 | 126 | 0 | 7,869 | 7,877 | 7,869 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateSubstanceGrid.UpdateSubstanceGrid.SubstSizer.OnIsotope) defined within the public class called public.The function start at line 7869 and ends at 7877. It contains 9 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 | UpdateSubstanceGrid.SubstSizer | def SubstSizer():def OnNum(invalid,value,tc):if invalid: returnname,El,keyId = Indx[tc.GetId()]data['Substances'][name]['Volume'] = G2mth.El2EstVol(data['Substances'][name]['Elements'])data['Substances'][name]['Density'] = \G2mth.Vol2Den(data['Substances'][name]['Elements'],data['Substances'][name]['Volume'])if 'X' in ... | 6 | 57 | 0 | 838 | 0 | 7,830 | 7,931 | 7,830 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateSubstanceGrid.SubstSizer) defined within the public class called public.The function start at line 7830 and ends at 7931. It contains 57 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 | UpdateSubstanceGrid | def UpdateSubstanceGrid(G2frame,data):'''respond to selection of SASD/REFD Substance data tree item.'''import Substances as substFiledef LoadSubstance(name):subst = substFile.Substances[name]ElList = subst['Elements'].keys()for El in ElList:Info = G2elem.GetAtomInfo(El.strip().capitalize())Info.update(subst['Elements']... | 1 | 33 | 2 | 317 | 33 | 7,607 | 7,955 | 7,607 | null | ['isotopes', 'Obj', 'topSizer', 'ndata', 'den', 'histList', 'names', 'copyList', 'wave', 'DE', 'parent', 'Info', 'vol', 'El', 'Inst', 'elSizer', 'subst', 'dlg', 'hst', 'num', 'TextList', 'Indx', 'denSizer', 'Elems', 'name', 'substSizer', 'isotope', 'vdsSizer', 'mainSizer', 'Id', 'Name', 'ElList', 'Substance'] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateSubstanceGrid) defined within the public class called public.The function start at line 7607 and ends at 7955. It contains 33 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [7607.0] and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateModelsGrid.RefreshPlots | def RefreshPlots(newPlot=False):PlotText = G2frame.G2plotNB.nb.GetPageText(G2frame.G2plotNB.nb.GetSelection())if 'Powder' in PlotText:G2pwpl.PlotPatterns(G2frame,plotType='SASD',newPlot=newPlot)elif 'Size' in PlotText:G2plt.PlotSASDSizeDist(G2frame)elif 'Pair' in PlotText:G2plt.PlotSASDPairDist(G2frame) | 4 | 8 | 1 | 68 | 0 | 7,993 | 8,000 | 7,993 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateModelsGrid.RefreshPlots) defined within the public class called public.The function start at line 7993 and ends at 8000. 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 | UpdateModelsGrid.OnAddModel | def OnAddModel(event):if data['Current'] == 'Particle fit':material = 'vacuum'if len(data['Particle']['Levels']):material = data['Particle']['Levels'][-1]['Controls']['Material']data['Particle']['Levels'].append({'Controls':{'FormFact':'Sphere','DistType':'LogNormal','Material':material,'FFargs':{},'SFargs':{},'NumPoin... | 3 | 22 | 1 | 439 | 0 | 8,003 | 8,025 | 8,003 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateModelsGrid.OnAddModel) defined within the public class called public.The function start at line 8003 and ends at 8025. It contains 22 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 | UpdateModelsGrid.OnCopyModel | def OnCopyModel(event):hst = G2frame.GPXtree.GetItemText(G2frame.PatternId)wtFactor = G2frame.GPXtree.GetItemPyData(G2frame.PatternId)[0]['wtFactor']histList = GetHistsLikeSelected(G2frame)if not histList:G2frame.ErrorDialog('No match','No histograms match '+hst,G2frame)returncopyList = []dlg = G2G.G2MultiChoiceDialog(... | 7 | 30 | 1 | 289 | 0 | 8,027 | 8,056 | 8,027 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateModelsGrid.OnCopyModel) defined within the public class called public.The function start at line 8027 and ends at 8056. It contains 30 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 | UpdateModelsGrid.OnCopyFlags | def OnCopyFlags(event):thisModel = copy.deepcopy(data)hst = G2frame.GPXtree.GetItemText(G2frame.PatternId)histList = GetHistsLikeSelected(G2frame)if not histList:G2frame.ErrorDialog('No match','No histograms match '+hst,G2frame)returndlg = G2G.G2MultiChoiceDialog(G2frame,'Copy sample ref. flags from\n'+str(hst[5:])+' t... | 13 | 35 | 1 | 351 | 0 | 8,058 | 8,092 | 8,058 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateModelsGrid.OnCopyFlags) defined within the public class called public.The function start at line 8058 and ends at 8092. It contains 35 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 | UpdateModelsGrid.OnFitModelAll | def OnFitModelAll(event):choices = G2gd.GetGPXtreeDataNames(G2frame,['SASD',])od = {'label_1':'Copy to next','value_1':False,'label_2':'Reverse order','value_2':False}dlg = G2G.G2MultiChoiceDialog(G2frame, 'Sequential SASD refinement', 'Select dataset to include',choices,extraOpts=od)names = []if dlg.ShowModal() == wx.... | 14 | 68 | 1 | 622 | 0 | 8,094 | 8,162 | 8,094 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateModelsGrid.OnFitModelAll) defined within the public class called public.The function start at line 8094 and ends at 8162. It contains 68 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 | UpdateModelsGrid.OnFitModel | def OnFitModel(event):if data['Current'] == 'Size dist.':if not any(Sample['Contrast']):G2frame.ErrorDialog('No contrast; your sample is a vacuum!','You need to define a scattering substance!\n'+\' Do Substances and then Sample parameters')returnG2sasd.SizeDistribution(Profile,ProfDict,Limits,Sample,data)G2plt.PlotSASD... | 7 | 36 | 1 | 287 | 0 | 8,164 | 8,203 | 8,164 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateModelsGrid.OnFitModel) defined within the public class called public.The function start at line 8164 and ends at 8203. It contains 36 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 | UpdateModelsGrid.OnUnDo | def OnUnDo(event):DoUnDo()data = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId,'Models'))G2frame.dataWindow.SasdUndo.Enable(False)UpdateModelsGrid(G2frame,data)G2sasd.ModelFxn(Profile,ProfDict,Limits,Sample,data)RefreshPlots(True) | 1 | 8 | 1 | 63 | 0 | 8,205 | 8,212 | 8,205 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateModelsGrid.OnUnDo) defined within the public class called public.The function start at line 8205 and ends at 8212. 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 | UpdateModelsGrid.DoUnDo | def DoUnDo():print ('Undo last refinement')file = open(G2frame.undosasd,'rb')PatternId = G2frame.PatternIdG2frame.GPXtree.SetItemPyData(G2gd.GetGPXtreeItemId(G2frame,PatternId, 'Models'),pickle.load(file))print (' Models recovered')file.close() | 1 | 7 | 0 | 56 | 0 | 8,214 | 8,220 | 8,214 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateModelsGrid.DoUnDo) defined within the public class called public.The function start at line 8214 and ends at 8220. It contains 7 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 | UpdateModelsGrid.SaveState | def SaveState():G2frame.undosasd = os.path.join(G2frame.dirname,'GSASIIsasd.save')file = open(G2frame.undosasd,'wb')PatternId = G2frame.PatternIdfor item in ['Models']:pickle.dump(G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,PatternId,item)),file,1)file.close()G2frame.dataWindow.SasdUndo.Enable(True) | 2 | 8 | 0 | 83 | 0 | 8,222 | 8,229 | 8,222 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateModelsGrid.SaveState) defined within the public class called public.The function start at line 8222 and ends at 8229. 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 | UpdateModelsGrid.OnSelectFit | def OnSelectFit(event):data['Current'] = fitSel.GetValue()wx.CallAfter(UpdateModelsGrid,G2frame,data) | 1 | 3 | 1 | 25 | 0 | 8,231 | 8,233 | 8,231 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateModelsGrid.OnSelectFit) defined within the public class called public.The function start at line 8231 and ends at 8233. 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 | UpdateModelsGrid.OnCheckBox | def OnCheckBox(event):Obj = event.GetEventObject()item,ind = Indx[Obj.GetId()]item[ind] = Obj.GetValue() | 1 | 4 | 1 | 34 | 0 | 8,235 | 8,238 | 8,235 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateModelsGrid.OnCheckBox) defined within the public class called public.The function start at line 8235 and ends at 8238. 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 | UpdateModelsGrid.OnIntVal | def OnIntVal(event):event.Skip()Obj = event.GetEventObject()item,ind,minVal = Indx[Obj.GetId()]try:value = int(Obj.GetValue())if value <= minVal:raise ValueErrorexcept ValueError:value = item[ind]Obj.SetValue(str(value))item[ind] = value | 3 | 12 | 1 | 74 | 0 | 8,240 | 8,251 | 8,240 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateModelsGrid.OnIntVal) defined within the public class called public.The function start at line 8240 and ends at 8251. It contains 12 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value.. |
AdvancedPhotonSource_GSAS-II | public | public | 0 | 0 | UpdateModelsGrid.UpdateModelsGrid.SizeSizer.OnShape | def OnShape(event):data['Size']['Shape'][0] = partsh.GetValue()wx.CallAfter(UpdateModelsGrid,G2frame,data) | 1 | 3 | 1 | 31 | 0 | 8,255 | 8,257 | 8,255 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateModelsGrid.UpdateModelsGrid.SizeSizer.OnShape) defined within the public class called public.The function start at line 8255 and ends at 8257. 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 | UpdateModelsGrid.UpdateModelsGrid.SizeSizer.OnMethod | def OnMethod(event):data['Size']['Method'] = method.GetValue()wx.CallAfter(UpdateModelsGrid,G2frame,data) | 1 | 3 | 1 | 28 | 0 | 8,259 | 8,261 | 8,259 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateModelsGrid.UpdateModelsGrid.SizeSizer.OnMethod) defined within the public class called public.The function start at line 8259 and ends at 8261. 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 | UpdateModelsGrid.SizeSizer | def SizeSizer():def OnShape(event):data['Size']['Shape'][0] = partsh.GetValue()wx.CallAfter(UpdateModelsGrid,G2frame,data)def OnMethod(event):data['Size']['Method'] = method.GetValue()wx.CallAfter(UpdateModelsGrid,G2frame,data)sizeSizer = wx.BoxSizer(wx.VERTICAL)sizeSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Si... | 6 | 87 | 0 | 1,246 | 0 | 8,253 | 8,347 | 8,253 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateModelsGrid.SizeSizer) defined within the public class called public.The function start at line 8253 and ends at 8347. It contains 87 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 | UpdateModelsGrid.UpdateModelsGrid.PairSizer.OnMethod | def OnMethod(event):data['Pair']['Method'] = method.GetValue()wx.CallAfter(UpdateModelsGrid,G2frame,data) | 1 | 3 | 1 | 28 | 0 | 8,351 | 8,353 | 8,351 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (UpdateModelsGrid.UpdateModelsGrid.PairSizer.OnMethod) defined within the public class called public.The function start at line 8351 and ends at 8353. 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.. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.