- Timestamp:
- Jul 22, 2017 11:51:59 AM (6 years ago)
- Location:
- branch/2frame
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branch/2frame/GSASIIconstrGUI.py
r2917 r2940 1310 1310 resList = [] 1311 1311 plotDefaults = {'oldxy':[0.,0.],'Quaternion':[0.,0.,0.,1.],'cameraPos':30.,'viewDir':[0,0,1],} 1312 1313 G2frame.rbBook = G2G.GSNoteBook(parent=G2frame.dataWindow) 1314 G2frame.dataWindow.GetSizer().Add(G2frame.rbBook,1,wx.ALL|wx.EXPAND) 1315 VectorRB = wx.ScrolledWindow(G2frame.rbBook) 1316 VectorRBDisplay = wx.Panel(VectorRB) 1317 G2frame.rbBook.AddPage(VectorRB,'Vector rigid bodies') 1318 ResidueRB = wx.ScrolledWindow(G2frame.rbBook) 1319 ResidueRBDisplay = wx.Panel(ResidueRB) 1320 G2frame.rbBook.AddPage(ResidueRB,'Residue rigid bodies') 1312 1321 1313 1322 def OnPageChanged(event): … … 1759 1768 for col in [4,5,6]: 1760 1769 vecGrid.SetCellStyle(row,col,VERY_LIGHT_GREY,True) 1761 vecGrid.Set Margins(0,0)1770 vecGrid.SetScrollRate(0,0) 1762 1771 vecGrid.AutoSizeColumns(False) 1763 1772 vecSizer.Add(vecGrid) … … 1776 1785 1777 1786 if VectorRB.GetSizer(): VectorRB.GetSizer().Clear(True) 1778 VectorRBDisplay = wx.Panel(VectorRB)1779 1787 VectorRBSizer = wx.BoxSizer(wx.VERTICAL) 1780 1788 for rbId in data['RBIds']['Vector']: … … 1922 1930 for col in range(5): 1923 1931 vecGrid.SetCellStyle(row,col,VERY_LIGHT_GREY,True) 1924 vecGrid.Set Margins(0,0)1932 vecGrid.SetScrollRate(0,0) 1925 1933 vecGrid.AutoSizeColumns(False) 1926 1934 vecSizer = wx.BoxSizer() … … 2051 2059 refChoice[rbId][i].sort() 2052 2060 2053 if ResidueRB.GetSizer(): ResidueRB.GetSizer().Clear(True) 2054 ResidueRBDisplay = wx.Panel(ResidueRB) 2061 ResidueRBDisplay.DestroyChildren() 2055 2062 ResidueRBSizer = wx.BoxSizer(wx.VERTICAL) 2056 2063 for rbId in data['RBIds']['Residue']: … … 2085 2092 2086 2093 G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.RigidBodyMenu) 2087 #G2frame.SetLabel(G2frame.GetLabel().split('||')[0]+' || '+'Rigid bodies')2088 2094 G2frame.SetTitle('Rigid bodies') 2089 2095 SetStatusLine('') 2090 #G2frame.rbBook = G2G.GSNoteBook(parent=G2frame.dataWindow,size=G2frame.dataWindow.GetClientSize())2091 G2frame.rbBook = G2G.GSNoteBook(parent=G2frame.dataWindow)2092 G2frame.dataWindow.GetSizer().Add(G2frame.rbBook,1,wx.ALL|wx.EXPAND)2093 2094 VectorRB = wx.ScrolledWindow(G2frame.rbBook)2095 G2frame.rbBook.AddPage(VectorRB,'Vector rigid bodies')2096 ResidueRB = wx.ScrolledWindow(G2frame.rbBook)2097 G2frame.rbBook.AddPage(ResidueRB,'Residue rigid bodies')2098 2096 UpdateVectorRB() 2099 2097 G2frame.rbBook.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CHANGED, OnPageChanged) -
branch/2frame/GSASIIdataGUI.py
r2937 r2940 6099 6099 mainSizer.FitInside(G2frame.dataWindow) 6100 6100 G2frame.dataWindow.SetSizer(mainSizer) 6101 G2frame.dataWindow.SetAutoLayout(1)6102 6101 G2frame.SetDataSize() 6103 6102 -
branch/2frame/GSASIImath.py
r2937 r2940 4019 4019 sched.slope = data['log slope'] 4020 4020 sched.T0 = data['Annealing'][0] 4021 if not sched.T0: 4022 sched.T0 = 50. 4021 4023 Tf = data['Annealing'][1] 4024 if not Tf: 4025 Tf = 0.001 4022 4026 Tsched = [sched.T0,] 4023 4027 while Tsched[-1] > Tf: … … 4646 4650 'args':(refs,rcov,cosTable,ifInv,allFF,RBdata,varyList,parmDict)},callback=MCSAcallback) 4647 4651 else: 4652 T0 = MCSA['Annealing'][0] 4653 if not T0: 4654 T0 = None 4648 4655 results = anneal(mcsaCalc,x0,args=(refs,rcov,cosTable,ifInv,allFF,RBdata,varyList,parmDict), 4649 4656 schedule=MCSA['Algorithm'], full_output=True,dwell=MCSA['Annealing'][2],maxiter=10000, 4650 T0= MCSA['Annealing'][0], Tf=MCSA['Annealing'][1],4657 T0=T0, Tf=MCSA['Annealing'][1], 4651 4658 quench=MCSA['fast parms'][0], c=MCSA['fast parms'][1], 4652 4659 lower=lower, upper=upper, slope=MCSA['log slope'],ranStart=MCSA.get('ranStart',False), -
branch/2frame/GSASIIphsGUI.py
r2938 r2940 7850 7850 data['MCSA']['rbData'] = rbData 7851 7851 data['MCSA']['AtInfo'].update(rbData[rbType]['AtInfo']) 7852 G2plt.PlotStructure(G2frame,data)7853 7852 UpdateMCSA() 7853 wx.CallAfter(G2plt.PlotStructure,G2frame,data) 7854 7854 7855 7855 def OnMCSAclear(event): -
branch/2frame/GSASIIplot.py
r2937 r2940 5450 5450 5451 5451 # PlotStructure initialization here 5452 global mcsaXYZ,mcsaTypes,mcsaBonds 5452 5453 ForthirdPI = 4.0*math.pi/3.0 5453 5454 generalData = data['General'] -
branch/2frame/GSASIIrestrGUI.py
r2917 r2940 881 881 882 882 BondRestr.SetSizer(mainSizer) 883 #Size = mainSizer.GetMinSize()884 #print 'BondRestr',Size885 #Size = mainSizer.Fit(BondRestr)886 #Size[0] = 600887 #Size[1] = min(Size[1]+50,500) #make room for tab, but not too big888 #BondRestr.SetSize(Size)889 #Size[0] += 40890 #BondRestr.SetScrollbars(10,10,Size[0]/10-4,Size[1]/10-1)891 #BondRestr.Scroll(0,0)892 883 G2phsGUI.SetPhaseWindow(BondRestr,mainSizer,Scroll=0) 893 884 -
branch/2frame/imports/G2phase_GPX.py
r2817 r2940 57 57 selblk = 0 58 58 else: # choose from options 59 selblk = G2IO.PhaseSelector( 60 phasenames, 61 ParentFrame=ParentFrame, 62 title= 'Select a phase from the list below', 63 ) 59 selblk = G2IO.PhaseSelector(phasenames,ParentFrame=ParentFrame, 60 title= 'Select a phase from the list below',) 64 61 if selblk is None: 65 62 self.errors = 'No phase selected' … … 68 65 self.Phase['Histograms'] = {} #remove any histograms 69 66 self.Phase['Pawley ref'] = [] # & any Pawley refl. 67 self.Phase['RBModels'] = {} 68 del self.Phase['MCSA'] 69 del self.Phase['Map Peaks'] 70 del self.Phase['General']['Map'] 70 71 self.Phase['ranId'] = ran.randint(0,sys.maxint) 71 72 return True
Note: See TracChangeset
for help on using the changeset viewer.