Ignore:
Timestamp:
Jul 1, 2017 6:22:10 AM (5 years ago)
Author:
vondreele
Message:
 
Location:
branch/2frame
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branch/2frame/GSASIIphsGUI.py

    r2873 r2888  
    7676    phasePage.SetScrollbars(10,10,Size[0]/10-4,Size[1]/10-1)
    7777    phasePage.Scroll(0,Scroll)
    78     if size is None:
    79         Size[1] = min(Size[1]+ 150,500)
    80 #        Size[1] = min(500,Size[1])
    81         mainFrame.setSizePosLeft(Size)
    82     else:
    83         size[1] = min(500,size[1])
    84         mainFrame.setSizePosLeft(size)
    8578   
    8679def FindBondsDraw(data):   
     
    371364                    generalData['Name'] = newName
    372365                    G2frame.G2plotNB.Rename(oldName,generalData['Name'])
    373                     G2frame.dataFrame.SetLabel('Phase Data for '+generalData['Name'])
     366                    G2frame.SetLabel(G2frame.GetLabel().split('||')[0]+' || '+'Phase Data for '+generalData['Name'])
    374367                    G2frame.PatternTree.SetItemText(Item,generalData['Name'])
    375368                    # change phase name key in Reflection Lists for each histogram
     
    390383                if not len(generalData['AtomTypes']):             #can change only if no atoms!
    391384                    generalData['Type'] = TypeTxt.GetValue()
    392                     pages = [G2frame.dataDisplay.GetPageText(PageNum) for PageNum in range(G2frame.dataDisplay.GetPageCount())]
     385                    pages = [G2frame.phaseDisplay.GetPageText(PageNum) for PageNum in range(G2frame.phaseDisplay.GetPageCount())]
    393386                    if generalData['Type'] == 'faulted':
    394387                        G2frame.dataFrame.Bind(wx.EVT_MENU, OnLoadDIFFaX, id=G2gd.wxID_LOADDIFFAX)
     
    398391                        if 'Wave Data' in pages:
    399392                            pass
    400 #                            G2frame.dataDisplay.DeletePage(pages.index('Wave Data'))
     393#                            G2frame.phaseDisplay.DeletePage(pages.index('Wave Data'))
    401394                        if 'MC/SA' in pages:
    402395                            pass
    403 #                            G2frame.dataDisplay.DeletePage(pages.index('MC/SA'))
     396#                            G2frame.phaseDisplay.DeletePage(pages.index('MC/SA'))
    404397                        if 'RB Models' in pages:
    405398                            pass
    406 #                            G2frame.dataDisplay.DeletePage(pages.index('RB Models'))
     399#                            G2frame.phaseDisplay.DeletePage(pages.index('RB Models'))
    407400                        if 'Layers' not in pages:
    408401                            if 'Layers' not in data:
     
    410403                                    'Width':[[1.,1.],[False,False]],'Toler':0.01,'AtInfo':{},
    411404                                    'Layers':[],'Stacking':[],'Transitions':[]}
    412                             G2frame.layerData = wx.ScrolledWindow(G2frame.dataDisplay)
    413                             G2frame.dataDisplay.InsertPage(3,G2frame.layerData,'Layers')
     405                            G2frame.layerData = wx.ScrolledWindow(G2frame.phaseDisplay)
     406                            G2frame.phaseDisplay.InsertPage(3,G2frame.layerData,'Layers')
    414407                            Id = wx.NewId()
    415408                            TabSelectionIdDict[Id] = 'Layers'
     
    423416                    else:
    424417                        if 'Wave Data' in pages:
    425                             G2frame.dataDisplay.DeletePage(pages.index('Wave Data'))
     418                            G2frame.phaseDisplay.DeletePage(pages.index('Wave Data'))
    426419                        if 'MC/SA' not in pages:
    427                             G2frame.MCSA = wx.ScrolledWindow(G2frame.dataDisplay)
    428                             G2frame.dataDisplay.InsertPage(7,G2frame.MCSA,'MC/SA')
     420                            G2frame.MCSA = wx.ScrolledWindow(G2frame.phaseDisplay)
     421                            G2frame.phaseDisplay.InsertPage(7,G2frame.MCSA,'MC/SA')
    429422                            Id = wx.NewId()
    430423                            TabSelectionIdDict[Id] = 'MC/SA'
     
    513506            def OnModulated(event):
    514507                if not len(generalData['AtomTypes']):             #can change only if no atoms!
    515                     pages = [G2frame.dataDisplay.GetPageText(PageNum) for PageNum in range(G2frame.dataDisplay.GetPageCount())]
     508                    pages = [G2frame.phaseDisplay.GetPageText(PageNum) for PageNum in range(G2frame.phaseDisplay.GetPageCount())]
    516509                    if generalData['Type'] in ['nuclear','magnetic']:
    517510                        generalData['Modulated'] = modulated.GetValue()
     
    529522                            if 'MC/SA' in pages:
    530523                                pass
    531     #                            G2frame.dataDisplay.DeletePage(pages.index('MC/SA'))   #this crashes!!
     524    #                            G2frame.phaseDisplay.DeletePage(pages.index('MC/SA'))   #this crashes!!
    532525                            if 'Layers' in pages:
    533526                                pass
    534     #                            G2frame.dataDisplay.DeletePage(pages.index('Layers'))
     527    #                            G2frame.phaseDisplay.DeletePage(pages.index('Layers'))
    535528                            if 'Wave Data' not in pages:
    536                                 G2frame.waveData = wx.ScrolledWindow(G2frame.dataDisplay)
    537                                 G2frame.dataDisplay.InsertPage(3,G2frame.waveData,'Wave Data')
     529                                G2frame.waveData = wx.ScrolledWindow(G2frame.phaseDisplay)
     530                                G2frame.phaseDisplay.InsertPage(3,G2frame.waveData,'Wave Data')
    538531                                Id = wx.NewId()
    539532                                TabSelectionIdDict[Id] = 'Wave Data'
    540533                        else:
    541534                            if 'Wave Data' in pages:
    542                                 G2frame.dataDisplay.DeletePage(pages.index('Wave Data'))
     535                                G2frame.phaseDisplay.DeletePage(pages.index('Wave Data'))
    543536                        wx.CallAfter(UpdateGeneral)
    544537                else:
     
    685678                cellSizer.Add(wx.StaticText(General,label=txt),0,WACV)
    686679                if ifEdit:          #a,b,c,etc.
    687 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     680#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    688681                    cellVal = wx.TextCtrl(General,value=(fmt%(cell[Id+1])),
    689682                        style=wx.TE_PROCESS_ENTER)
     
    848841            dminSizer = wx.BoxSizer(wx.HORIZONTAL)
    849842            dminSizer.Add(wx.StaticText(General,label=' Magnetic reflection d-min: '),0,WACV)
    850 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     843#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    851844            dminVal = wx.TextCtrl(General,value='%.4f'%(generalData['MagDmin']),style=wx.TE_PROCESS_ENTER)
    852845            dminVal.Bind(wx.EVT_TEXT_ENTER,OnDminVal)       
     
    947940            for i,[val,show] in enumerate(zip(generalData['SuperVec'][0],ifShow)):
    948941                if show:
    949 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     942#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    950943                    modVal = wx.TextCtrl(General,value=('%.4f'%(val)),
    951944                        size=wx.Size(50,20),style=wx.TE_PROCESS_ENTER)
     
    10371030            line2Sizer = wx.BoxSizer(wx.HORIZONTAL)
    10381031            line2Sizer.Add(wx.StaticText(General,label=' Resolution: '),0,WACV)
    1039 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     1032#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    10401033            mapRes =  wx.TextCtrl(General,value='%.2f'%(Map['Resolution']),style=wx.TE_PROCESS_ENTER)
    10411034            mapRes.Bind(wx.EVT_TEXT_ENTER,OnResVal)       
     
    10431036            line2Sizer.Add(mapRes,0,WACV)
    10441037            line2Sizer.Add(wx.StaticText(General,label=' Peak cutoff %: '),0,WACV)
    1045 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     1038#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    10461039            cutOff =  wx.TextCtrl(General,value='%.1f'%(Map['cutOff']),style=wx.TE_PROCESS_ENTER)
    10471040            cutOff.Bind(wx.EVT_TEXT_ENTER,OnCutOff)       
     
    11381131            line2Sizer = wx.BoxSizer(wx.HORIZONTAL)
    11391132            line2Sizer.Add(wx.StaticText(General,label=' Resolution: '),0,WACV)
    1140 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     1133#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    11411134            flipRes =  wx.TextCtrl(General,value='%.2f'%(Flip['Resolution']),style=wx.TE_PROCESS_ENTER)
    11421135            flipRes.Bind(wx.EVT_TEXT_ENTER,OnResVal)       
     
    11441137            line2Sizer.Add(flipRes,0,WACV)
    11451138            line2Sizer.Add(wx.StaticText(General,label=' k-Factor (0.1-1.2): '),0,WACV)
    1146 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     1139#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    11471140            kFactor =  wx.TextCtrl(General,value='%.3f'%(Flip['k-factor']),style=wx.TE_PROCESS_ENTER)
    11481141            kFactor.Bind(wx.EVT_TEXT_ENTER,OnkFactor)       
     
    11501143            line2Sizer.Add(kFactor,0,WACV)
    11511144            line2Sizer.Add(wx.StaticText(General,label=' k-Max (>=10.0): '),0,WACV)
    1152 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     1145#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    11531146            kMax = wx.TextCtrl(General,value='%.1f'%(Flip['k-Max']),style=wx.TE_PROCESS_ENTER)
    11541147            kMax.Bind(wx.EVT_TEXT_ENTER,OnkMax)       
     
    12661259            lineSizer.Add(refList,0,WACV)
    12671260            lineSizer.Add(wx.StaticText(General,label=' d-min: '),0,WACV)
    1268 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     1261#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    12691262            dmin = wx.TextCtrl(General,-1,value='%.3f'%(MCSAdata['dmin']),style=wx.TE_PROCESS_ENTER)
    12701263            dmin.Bind(wx.EVT_TEXT_ENTER,OnDmin)       
     
    12851278            ranStart.SetValue(MCSAdata.get('ranStart',False))
    12861279            line2Sizer.Add(ranStart,0,WACV)
    1287 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     1280#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    12881281            ranRange = wx.TextCtrl(General,-1,value='%.1f'%(MCSAdata.get('ranRange',0.10)*100),style=wx.TE_PROCESS_ENTER)
    12891282            ranRange.Bind(wx.EVT_TEXT_ENTER,OnRanRange)       
     
    13151308                for i,name in enumerate(Names):
    13161309                    line3Sizer.Add(wx.StaticText(General,label=name),0,WACV)
    1317 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     1310#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    13181311                    Ajump =  wx.TextCtrl(General,-1,value='%.3f'%(MCSAdata[parms][i]),style=wx.TE_PROCESS_ENTER)
    13191312                    Ajump.Bind(wx.EVT_TEXT_ENTER,OnAjump)       
     
    13231316            elif 'log' in MCSAdata['Algorithm']:
    13241317                line3Sizer.Add(wx.StaticText(General,label=' slope: '),0,WACV)
    1325 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     1318#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    13261319                slope =  wx.TextCtrl(General,-1,value='%.3f'%(MCSAdata['log slope']),style=wx.TE_PROCESS_ENTER)
    13271320                slope.Bind(wx.EVT_TEXT_ENTER,OnSlope)       
     
    13951388            G2G.HorizontalLine(mainSizer,General)
    13961389            mainSizer.Add(MCSASizer())
    1397         G2frame.dataFrame.SetStatusText('')
     1390        G2frame.GetStatusBar().SetStatusText('')
    13981391        SetPhaseWindow(G2frame.dataFrame,General,mainSizer,Scroll=Scroll)
    13991392       
     
    16951688            if not (event.AltDown() or (event.ShiftDown() and event.ControlDown())):
    16961689                Atoms.frm = -1
    1697                 G2frame.dataFrame.SetStatusText('')                   
     1690                G2frame.GetStatusBar().SetStatusText('')                   
    16981691            if r < 0 and c < 0:
    16991692                if Atoms.IsSelection():
     
    17241717                            Atoms.SelectRow(r,True)
    17251718                            n = colLabels.index('Name')
    1726                             G2frame.dataFrame.SetStatusText('Atom '+atomData[r][n]+' is to be moved')
     1719                            G2frame.GetStatusBar().SetStatusText('Atom '+atomData[r][n]+' is to be moved')
    17271720                        else:                       #move it
    17281721                            item = atomData.pop(Atoms.frm)
    17291722                            atomData.insert(r,item)
    17301723                            Atoms.frm = -1
    1731                             G2frame.dataFrame.SetStatusText('')
     1724                            G2frame.GetStatusBar().SetStatusText('')
    17321725                            wx.CallAfter(Paint)
    17331726                else:
     
    18911884            Types = Types[:7]+3*[wg.GRID_VALUE_FLOAT+':10,4',]+Types[7:]
    18921885        SGData = data['General']['SGData']
    1893         G2frame.dataFrame.SetStatusText('')
     1886        G2frame.GetStatusBar().SetStatusText('')
    18941887        if SGData['SGPolax']:
    1895             G2frame.dataFrame.SetStatusText('Warning: The location of the origin is arbitrary in '+SGData['SGPolax'])
     1888            G2frame.GetStatusBar().SetStatusText('Warning: The location of the origin is arbitrary in '+SGData['SGPolax'])
    18961889        Atoms.Bind(wg.EVT_GRID_CELL_CHANGE, ChangeAtomCell)
    18971890        Atoms.Bind(wg.EVT_GRID_CELL_LEFT_DCLICK, AtomTypeSelect)
     
    22042197            atom = atomData[ind]
    22052198            if atom[ci+8] in rbAtmDict:
    2206                 G2frame.dataFrame.SetStatusText('**** ERROR - atom is in a rigid body and can not be deleted ****')
     2199                G2frame.GetStatusBar().SetStatusText('**** ERROR - atom is in a rigid body and can not be deleted ****')
    22072200            else:
    22082201                if atom[ci+8] in HydIds:    #remove Hs from Hatom update dict
     
    29312924            for txt,fmt,ifEdit,Id in useGUI[2]:
    29322925                cellSizer.Add(wx.StaticText(layerData,label=txt),0,WACV)
    2933 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     2926#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    29342927                cellVal = wx.TextCtrl(layerData,value=(fmt%(cell[Id+1])),
    29352928                    style=wx.TE_PROCESS_ENTER)
     
    29642957            for i in range(2):
    29652958                widthSizer.Add(wx.StaticText(layerData,label=u' layer width(%s) (<= 1\xb5m): '%(Labels[i])),0,WACV)
    2966 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     2959#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    29672960                widthVal = wx.TextCtrl(layerData,value='%.3f'%(widths[i]),style=wx.TE_PROCESS_ENTER)
    29682961                widthVal.Bind(wx.EVT_TEXT_ENTER,OnWidthChange)       
     
    33503343            if Layers['Stacking'][0] == 'recursive':
    33513344                topLine.Add(wx.StaticText(layerData,label=' number of layers (<1022 or "infinite"): '),0,WACV)
    3352 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     3345#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    33533346                numLayers = wx.TextCtrl(layerData,value=data['Layers']['Stacking'][1],style=wx.TE_PROCESS_ENTER)
    33543347                numLayers.Bind(wx.EVT_TEXT_ENTER,OnNumLayers)       
     
    33903383        if len(Layers['Layers']):
    33913384            layerNames = [layer['Name'] for layer in Layers['Layers']]
    3392         G2frame.dataFrame.SetStatusText('')
     3385        G2frame.GetStatusBar().SetStatusText('')
    33933386        layerData = G2frame.layerData
    33943387        if layerData.GetSizer():
     
    34163409        if Layers['Laue'] == 'unknown':
    34173410            laueSizer.Add(wx.StaticText(layerData,label=' Diffraction symmetry tolerance: '),0,WACV)
    3418 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     3411#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    34193412            toler = wx.TextCtrl(layerData,value='%.3f'%(Layers['Toler']),style=wx.TE_PROCESS_ENTER)
    34203413            toler.Bind(wx.EVT_TEXT_ENTER,OnToler)       
     
    36933686        Indx = {}
    36943687        waveData = G2frame.waveData
    3695         G2frame.dataFrame.SetStatusText('')
     3688        G2frame.GetStatusBar().SetStatusText('')
    36963689        generalData = data['General']
    36973690        SGData = generalData['SGData']
     
    38383831                        for ival,val in enumerate(wave[0]):
    38393832                            if np.any(CSI[Stype][0][ival]):
    3840 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     3833#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    38413834                                waveVal = wx.TextCtrl(waveData,value='%.5f'%(val),style=wx.TE_PROCESS_ENTER)
    38423835                                waveVal.Bind(wx.EVT_TEXT_ENTER,OnWaveVal)
     
    40594052            'atNames':atNames,'rbRef':[0,1,2,False],'rbSeq':[],'SelSeq':[0,0],'useCount':0}
    40604053        RBData['RBIds']['Residue'].append(rbId)
    4061         G2frame.dataFrame.SetStatusText('New rigid body UNKRB added to set of Residue rigid bodies')
     4054        G2frame.GetStatusBar().SetStatusText('New rigid body UNKRB added to set of Residue rigid bodies')
    40624055
    40634056################################################################################
     
    41984191
    41994192        # UpdateDrawAtoms executable code starts here
    4200         G2frame.dataFrame.SetStatusText('')
     4193        G2frame.GetStatusBar().SetStatusText('')
    42014194        generalData = data['General']
    42024195        SetupDrawingData()
     
    43094302        if indx:
    43104303            if len(indx) > 1:
    4311                 G2frame.dataFrame.SetStatusText('Select Custom Color, change color, Add to Custom Colors, then OK')
     4304                G2frame.GetStatusBar().SetStatusText('Select Custom Color, change color, Add to Custom Colors, then OK')
    43124305            else:
    4313                 G2frame.dataFrame.SetStatusText('Change color, Add to Custom Colors, then OK')
     4306                G2frame.GetStatusBar().SetStatusText('Change color, Add to Custom Colors, then OK')
    43144307            atomData = data['Drawing']['Atoms']
    43154308            cx,ct,cs,ci = data['Drawing']['atomPtrs']
     
    43384331            drawAtoms.ClearSelection()
    43394332            dlg.Destroy()
    4340             G2frame.dataFrame.SetStatusText('')
     4333            G2frame.GetStatusBar().SetStatusText('')
    43414334            G2plt.PlotStructure(G2frame,data)
    43424335           
     
    48474840            cameraPosTxt = wx.StaticText(drawOptions,-1,
    48484841                ' Camera Distance: '+'%.2f'%(drawingData['cameraPos']),name='cameraPos')
    4849             G2frame.dataDisplay.cameraPosTxt = cameraPosTxt
     4842            G2frame.phaseDisplay.cameraPosTxt = cameraPosTxt
    48504843            slideSizer.Add(cameraPosTxt,0,WACV)
    48514844            cameraPos = wx.Slider(drawOptions,style=wx.SL_HORIZONTAL,value=drawingData['cameraPos'],name='cameraSlider')
    48524845            cameraPos.SetRange(10,500)
    48534846            cameraPos.Bind(wx.EVT_SLIDER, OnCameraPos)
    4854             G2frame.dataDisplay.cameraSlider = cameraPos
     4847            G2frame.phaseDisplay.cameraSlider = cameraPos
    48554848            slideSizer.Add(cameraPos,1,wx.EXPAND|wx.RIGHT)
    48564849           
     
    48644857            ZstepSizer = wx.BoxSizer(wx.HORIZONTAL)
    48654858            ZstepSizer.Add(wx.StaticText(drawOptions,-1,' Z step:'),0,WACV)
    4866 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     4859#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    48674860            Zstep = wx.TextCtrl(drawOptions,value='%.2f'%(drawingData['Zstep']),
    48684861                style=wx.TE_PROCESS_ENTER)
     
    49964989            viewDir.Bind(wx.EVT_TEXT_ENTER,OnViewDir)
    49974990            viewDir.Bind(wx.EVT_KILL_FOCUS,OnViewDir)
    4998             G2frame.dataDisplay.viewDir = viewDir
     4991            G2frame.phaseDisplay.viewDir = viewDir
    49994992            lineSizer.Add(viewDir,0,WACV)
    50004993            showSizer.Add(lineSizer)
     
    50105003            viewPoint = wx.TextCtrl(drawOptions,value='%.3f %.3f %.3f'%(VP[0],VP[1],VP[2]),
    50115004                style=wx.TE_PROCESS_ENTER,size=wx.Size(140,20),name='viewPoint')
    5012             G2frame.dataDisplay.viewPoint = viewPoint
     5005            G2frame.phaseDisplay.viewPoint = viewPoint
    50135006            viewPoint.Bind(wx.EVT_TEXT_ENTER,OnViewPoint)
    50145007            viewPoint.Bind(wx.EVT_KILL_FOCUS,OnViewPoint)
     
    50625055            radSizer = wx.BoxSizer(wx.HORIZONTAL)
    50635056            radSizer.Add(wx.StaticText(drawOptions,-1,' Hydrogen radius, A:  '),0,WACV)
    5064 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     5057#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    50655058            sizeH = wx.TextCtrl(drawOptions,-1,value='%.2f'%(drawingData['sizeH']),size=wx.Size(60,20),style=wx.TE_PROCESS_ENTER)
    50665059            sizeH.Bind(wx.EVT_TEXT_ENTER,OnSizeHatoms)
     
    50695062   
    50705063            radSizer.Add(wx.StaticText(drawOptions,-1,' Bond search factor:  '),0,WACV)
    5071 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     5064#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    50725065            radFactor = wx.TextCtrl(drawOptions,value='%.2f'%(drawingData['radiusFactor']),size=wx.Size(60,20),style=wx.TE_PROCESS_ENTER)
    50735066            radFactor.Bind(wx.EVT_TEXT_ENTER,OnRadFactor)
     
    51325125            planeSizer2 = wx.BoxSizer(wx.HORIZONTAL)
    51335126            planeSizer2.Add(wx.StaticText(drawOptions,label=' Phase shift (deg): '),0,WACV)
    5134 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     5127#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    51355128            phase = wx.TextCtrl(drawOptions,value='%.2f'%(drawingData['Plane'][3]),
    51365129                style=wx.TE_PROCESS_ENTER)
     
    51535146        drawingData = data['Drawing']
    51545147
    5155         G2frame.dataFrame.SetStatusText('')
     5148        G2frame.GetStatusBar().SetStatusText('')
    51565149        if drawOptions.GetSizer():
    51575150            drawOptions.GetSizer().Clear(True)
     
    54115404            shPenalty.Add(hklList,0,WACV)
    54125405            shPenalty.Add(wx.StaticText(Texture,wx.ID_ANY,' Zero MRD tolerance: '),0,WACV)
    5413 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     5406#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    54145407            shToler = wx.TextCtrl(Texture,wx.ID_ANY,'%.2f'%(Penalty[1]),style=wx.TE_PROCESS_ENTER)
    54155408            shToler.Bind(wx.EVT_TEXT_ENTER,OnshToler)
     
    54225415        if Texture.GetSizer():
    54235416            Texture.GetSizer().Clear(True)
    5424         G2frame.dataFrame.SetStatusText('')
     5417        G2frame.GetStatusBar().SetStatusText('')
    54255418        generalData = data['General']       
    54265419        SGData = generalData['SGData']
     
    54925485            PTSizer.Add(wx.StaticText(Texture,-1,' Inverse pole figure XYZ: '),0,WACV)
    54935486            PX = textureData['PFxyz']
    5494 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     5487#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    54955488            pfVal = wx.TextCtrl(Texture,-1,'%3.1f %3.1f %3.1f'%(PX[0],PX[1],PX[2]),style=wx.TE_PROCESS_ENTER)
    54965489        pfVal.Bind(wx.EVT_TEXT_ENTER,OnPFValue)
     
    55205513            for item in ODFkeys:
    55215514                ODFSizer.Add(wx.StaticText(Texture,-1,item),0,WACV)
    5522 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     5515#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    55235516                ODFval = wx.TextCtrl(Texture,wx.ID_ANY,'%8.3f'%(textureData['SH Coeff'][1][item]),style=wx.TE_PROCESS_ENTER)
    55245517                ODFIndx[ODFval.GetId()] = item
     
    55405533            angRef.Bind(wx.EVT_CHECKBOX, OnAngRef)
    55415534            angSizer.Add(angRef,0,WACV)
    5542 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     5535#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    55435536            angVal = wx.TextCtrl(Texture,wx.ID_ANY,'%8.2f'%(textureData[item][1]),style=wx.TE_PROCESS_ENTER)
    55445537            valIndx[angVal.GetId()] = item
     
    59305923            for i,name in enumerate(names):
    59315924                thermSizer.Add(wx.StaticText(RigidBodies,-1,name+': '),0,WACV)
    5932 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     5925#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    59335926                thermVal = wx.TextCtrl(RigidBodies,-1,value='%8.4f'%(model[1][i]),
    59345927                    style=wx.TE_PROCESS_ENTER)
     
    60035996            topSizer.Add(wx.StaticText(RigidBodies,-1,'Origin x,y,z:'),0,WACV)
    60045997            for ix,x in enumerate(Orig):
    6005 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     5998#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    60065999                origX = wx.TextCtrl(RigidBodies,-1,value='%8.5f'%(x),style=wx.TE_PROCESS_ENTER)
    60076000                origX.Bind(wx.EVT_TEXT_ENTER,OnOrigX)
     
    60166009            topSizer.Add(wx.StaticText(RigidBodies,-1,'Rotation angle, vector:'),0,WACV)
    60176010            for ix,x in enumerate(Orien):
    6018 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     6011#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    60196012                orien = wx.TextCtrl(RigidBodies,-1,value='%8.4f'%(x),style=wx.TE_PROCESS_ENTER)
    60206013                orien.Bind(wx.EVT_TEXT_ENTER,OnOrien)
     
    60816074            for itors,tors in enumerate(RBObj['Torsions']):
    60826075                torSizer.Add(wx.StaticText(RigidBodies,-1,'Torsion '+'%d'%(itors)),0,WACV)
    6083 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     6076#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    60846077                torsTxt = wx.TextCtrl(RigidBodies,-1,value='%.3f'%(tors[0]),style=wx.TE_PROCESS_ENTER)
    60856078                torsTxt.Bind(wx.EVT_TEXT_ENTER,OnTorsion)
     
    61086101           
    61096102        def VecrbSizer(RBObj):
    6110             G2frame.dataFrame.SetStatusText('NB: Rotation vector is in crystallographic space')
     6103            G2frame.GetStatusBar().SetStatusText('NB: Rotation vector is in crystallographic space')
    61116104                   
    61126105            def OnDelVecRB(event):
     
    61866179        if 'macro' in general['Type']:
    61876180            atomStyle = 'sticks'
    6188         G2frame.dataFrame.SetStatusText('')
     6181        G2frame.GetStatusBar().SetStatusText('')
    61896182        mainSizer = wx.BoxSizer(wx.VERTICAL)
    61906183        if not data['RBModels']:
     
    62116204            G2frame.bottomSizer.Add(ResrbSizer(rbObj))
    62126205            mainSizer.Add(G2frame.bottomSizer)
    6213             G2frame.dataFrame.SetStatusText('NB: Rotation vector is in crystallographic space')
     6206            G2frame.GetStatusBar().SetStatusText('NB: Rotation vector is in crystallographic space')
    62146207            G2plt.PlotStructure(G2frame,data)
    62156208        if 'Vector' in data['RBModels'] and len(data['RBModels']['Vector']):
     
    62546247    def OnRBAssign(event):
    62556248       
    6256         G2frame.dataFrame.SetStatusText('')
     6249        G2frame.GetStatusBar().SetStatusText('')
    62576250        RBData = G2frame.PatternTree.GetItemPyData(   
    62586251            G2gd.GetPatternTreeItemId(G2frame,G2frame.root,'Rigid bodies'))
     
    67886781                Indx[posRef.GetId()] = [model,'Pos',ix]
    67896782                atomsizer.Add(posRef,0,WACV)
    6790 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     6783#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    67916784                posVal = wx.TextCtrl(G2frame.MCSA,-1,'%.4f'%(model['Pos'][0][ix]),style=wx.TE_PROCESS_ENTER)
    67926785                posVal.Bind(wx.EVT_TEXT_ENTER,OnPosVal)
     
    68626855                Indx[posRef.GetId()] = [model,'Pos',ix]
    68636856                rbsizer1.Add(posRef,0,WACV)
    6864 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     6857#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    68656858                posVal = wx.TextCtrl(G2frame.MCSA,-1,'%.4f'%(model['Pos'][0][ix]),style=wx.TE_PROCESS_ENTER)
    68666859                posVal.Bind(wx.EVT_TEXT_ENTER,OnPosVal)
     
    68856878            Ori = model['Ori'][0]
    68866879            rbsizer2.Add(wx.StaticText(G2frame.MCSA,-1,'Oa: '),0,WACV)
    6887 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     6880#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    68886881            angVal = wx.TextCtrl(G2frame.MCSA,-1,'%.5f'%(Ori[0]),style=wx.TE_PROCESS_ENTER)
    68896882            angVal.Bind(wx.EVT_TEXT_ENTER,OnOriVal)
     
    69336926                    Indx[torRef.GetId()] = [model,'Tor',it]
    69346927                    rbsizer3.Add(torRef,0,WACV)
    6935 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     6928#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    69366929                    torVal = wx.TextCtrl(G2frame.MCSA,-1,'%.4f'%(tor),style=wx.TE_PROCESS_ENTER)
    69376930                    torVal.Bind(wx.EVT_TEXT_ENTER,OnPosVal)
     
    69976990            poRef.Bind(wx.EVT_CHECKBOX,OnPORef)
    69986991            poSizer.Add(poRef,0,WACV)
    6999 #        azmthOff = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
     6992#        azmthOff = G2G.ValidatedTxtCtrl(G2frame.phaseDisplay,data,'azmthOff',nDig=(10,2),typeHint=float,OnLeave=OnAzmthOff)
    70006993            poVal = wx.TextCtrl(G2frame.MCSA,-1,'%.3f'%(POData['Coef'][0]),style=wx.TE_PROCESS_ENTER)
    70016994            poVal.Bind(wx.EVT_TEXT_ENTER,OnPOVal)
     
    70827075#        if 'macro' in general['Type']:
    70837076#            atomStyle = 'sticks'
    7084         G2frame.dataFrame.SetStatusText('')
     7077        G2frame.GetStatusBar().SetStatusText('')
    70857078        mainSizer = wx.BoxSizer(wx.VERTICAL)
    70867079        if not data['MCSA']['Models']:
     
    72177210        MCSAdata['Results'][0][0] = True
    72187211        SetSolution(MCSAdata['Results'][0],data['MCSA']['Models'])
    7219         G2frame.dataDisplay.SetFocus()
    7220         Page = G2frame.dataDisplay.FindPage('MC/SA')
    7221         G2frame.dataDisplay.SetSelection(Page)
     7212        G2frame.phaseDisplay.SetFocus()
     7213        Page = G2frame.phaseDisplay.FindPage('MC/SA')
     7214        G2frame.phaseDisplay.SetSelection(Page)
    72227215        G2plt.PlotStructure(G2frame,data)
    72237216        wx.CallAfter(UpdateMCSA)
     
    73237316           
    73247317        # FillPawleyReflectionsGrid executable starts here
    7325         G2frame.dataFrame.SetStatusText('To delete a Pawley reflection: select row & press Delete')                       
     7318        G2frame.GetStatusBar().SetStatusText('To delete a Pawley reflection: select row & press Delete')                       
    73267319        generalData = data['General']
    73277320        if 'Pawley ref' in data:
     
    76357628            G2plt.PlotStructure(G2frame,data)                   
    76367629           
    7637         G2frame.dataFrame.SetStatusText('')
     7630        G2frame.GetStatusBar().SetStatusText('')
    76387631        if 'Map Peaks' in data:
    7639             G2frame.dataFrame.SetStatusText('Double click any column heading to sort')
     7632            G2frame.GetStatusBar().SetStatusText('Double click any column heading to sort')
    76407633            mapPeaks = data['Map Peaks']                       
    76417634            rowLabels = []
     
    78677860            print ' Map search finished, time = %.2fs'%(time.time()-time0)
    78687861            print ' No.peaks found:',len(peaks)   
    7869             Page = G2frame.dataDisplay.FindPage('Map peaks')
    7870             G2frame.dataDisplay.SetSelection(Page)
     7862            Page = G2frame.phaseDisplay.FindPage('Map peaks')
     7863            G2frame.phaseDisplay.SetSelection(Page)
    78717864            wx.CallAfter(FillMapPeaksGrid)
    78727865            UpdateDrawAtoms()
     
    80128005                return               
    80138006            # find the matching tab
    8014             for PageNum in range(G2frame.dataDisplay.GetPageCount()):
    8015                 if tabname == G2frame.dataDisplay.GetPageText(PageNum):
    8016                     G2frame.dataDisplay.SetSelection(PageNum)
     8007            for PageNum in range(G2frame.phaseDisplay.GetPageCount()):
     8008                if tabname == G2frame.phaseDisplay.GetPageText(PageNum):
     8009                    G2frame.phaseDisplay.SetSelection(PageNum)
    80178010                    return
    80188011            else:
     
    80318024        on a Phase data item window
    80328025        '''
    8033         for page in G2frame.dataDisplay.gridList: # clear out all grids, forcing edits in progress to complete
     8026        for page in G2frame.phaseDisplay.gridList: # clear out all grids, forcing edits in progress to complete
    80348027            page.ClearGrid()
    80358028        page = event.GetSelection()
     
    80378030       
    80388031    def ChangePage(page):
    8039         text = G2frame.dataDisplay.GetPageText(page)
    8040         G2frame.dataDisplayPhaseText = text
     8032        text = G2frame.phaseDisplay.GetPageText(page)
     8033        G2frame.phaseDisplayPhaseText = text
    80418034        G2frame.dataFrame.helpKey = text # use name of Phase tab for help lookup
    80428035        if text == 'General':
    8043             G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.DataGeneral)
     8036            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.DataGeneral)
    80448037            UpdateGeneral()
    80458038        elif text == 'Data':
    8046             G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.DataMenu)
     8039            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.DataMenu)
    80478040            G2ddG.UpdateDData(G2frame,DData,data)
    80488041            wx.CallAfter(G2plt.PlotSizeStrainPO,G2frame,data,hist='',Start=True)           
    80498042        elif text == 'Atoms':
    8050             G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.AtomsMenu)
     8043            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.AtomsMenu)
    80518044            FillAtomsGrid(Atoms)
    80528045        elif text == 'Layers':
    8053             G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.LayerData)
     8046            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.LayerData)
    80548047            UpdateLayerData()
    80558048        elif text == 'Wave Data' and data['General']['Modulated']:
    8056             G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.WavesData)
     8049            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.WavesData)
    80578050            UpdateWavesData()
    80588051            wx.CallAfter(G2plt.PlotStructure,G2frame,data,firstCall=True)
    80598052        elif text == 'Draw Options':
    8060             G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.DataDrawOptions)
     8053            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.DataDrawOptions)
    80618054            UpdateDrawOptions()
    80628055            wx.CallAfter(G2plt.PlotStructure,G2frame,data,firstCall=True)
    80638056        elif text == 'Draw Atoms':
    8064             G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.DrawAtomsMenu)
     8057            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.DrawAtomsMenu)
    80658058            UpdateDrawAtoms()
    80668059            wx.CallAfter(G2plt.PlotStructure,G2frame,data,firstCall=True)
    80678060        elif text == 'RB Models':
    8068             G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.RigidBodiesMenu)
     8061            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.RigidBodiesMenu)
    80698062            FillRigidBodyGrid()
    80708063        elif text == 'Map peaks':
    8071             G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.MapPeaksMenu)
     8064            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.MapPeaksMenu)
    80728065            FillMapPeaksGrid()
    80738066            wx.CallAfter(G2plt.PlotStructure,G2frame,data,firstCall=True)
    80748067        elif text == 'MC/SA':
    8075             G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.MCSAMenu)
     8068            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.MCSAMenu)
    80768069            UpdateMCSA()                       
    80778070            wx.CallAfter(G2plt.PlotStructure,G2frame,data,firstCall=True)
    80788071        elif text == 'Texture':
    8079             G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.TextureMenu)
     8072            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.TextureMenu)
    80808073            UpdateTexture()                       
    80818074            wx.CallAfter(G2plt.PlotTexture,G2frame,data,Start=True)           
    80828075        elif text == 'Pawley reflections':
    8083             G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.PawleyMenu)
     8076            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.PawleyMenu)
    80848077            FillPawleyReflectionsGrid()
    80858078        else:
     
    80908083        '''
    80918084        # General
    8092         FillSelectPageMenu(TabSelectionIdDict, G2frame.dataFrame.DataGeneral)
    8093         G2frame.dataFrame.Bind(wx.EVT_MENU, OnFourierMaps, id=G2gd.wxID_FOURCALC)
    8094         G2frame.dataFrame.Bind(wx.EVT_MENU, OnSearchMaps, id=G2gd.wxID_FOURSEARCH)
    8095         G2frame.dataFrame.Bind(wx.EVT_MENU, OnChargeFlip, id=G2gd.wxID_CHARGEFLIP)
    8096         G2frame.dataFrame.Bind(wx.EVT_MENU, On4DChargeFlip, id=G2gd.wxID_4DCHARGEFLIP)
    8097         G2frame.dataFrame.Bind(wx.EVT_MENU, OnFourClear, id=G2gd.wxID_FOURCLEAR)
    8098         G2frame.dataFrame.Bind(wx.EVT_MENU, OnRunSingleMCSA, id=G2gd.wxID_SINGLEMCSA)
    8099         G2frame.dataFrame.Bind(wx.EVT_MENU, OnRunMultiMCSA, id=G2gd.wxID_MULTIMCSA)
    8100         G2frame.dataFrame.Bind(wx.EVT_MENU, OnTransform, id=G2gd.wxID_TRANSFORMSTRUCTURE)
     8085        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.DataGeneral)
     8086        G2frame.Bind(wx.EVT_MENU, OnFourierMaps, id=G2gd.wxID_FOURCALC)
     8087        G2frame.Bind(wx.EVT_MENU, OnSearchMaps, id=G2gd.wxID_FOURSEARCH)
     8088        G2frame.Bind(wx.EVT_MENU, OnChargeFlip, id=G2gd.wxID_CHARGEFLIP)
     8089        G2frame.Bind(wx.EVT_MENU, On4DChargeFlip, id=G2gd.wxID_4DCHARGEFLIP)
     8090        G2frame.Bind(wx.EVT_MENU, OnFourClear, id=G2gd.wxID_FOURCLEAR)
     8091        G2frame.Bind(wx.EVT_MENU, OnRunSingleMCSA, id=G2gd.wxID_SINGLEMCSA)
     8092        G2frame.Bind(wx.EVT_MENU, OnRunMultiMCSA, id=G2gd.wxID_MULTIMCSA)
     8093        G2frame.Bind(wx.EVT_MENU, OnTransform, id=G2gd.wxID_TRANSFORMSTRUCTURE)
    81018094        # Data
    8102         FillSelectPageMenu(TabSelectionIdDict, G2frame.dataFrame.DataMenu)
    8103         G2frame.dataFrame.Bind(wx.EVT_MENU, OnDataUse, id=G2gd.wxID_DATAUSE)
    8104         G2frame.dataFrame.Bind(wx.EVT_MENU, OnDataCopy, id=G2gd.wxID_DATACOPY)
    8105         G2frame.dataFrame.Bind(wx.EVT_MENU, OnDataCopyFlags, id=G2gd.wxID_DATACOPYFLAGS)
    8106         G2frame.dataFrame.Bind(wx.EVT_MENU, OnSelDataCopy, id=G2gd.wxID_DATASELCOPY)
    8107         G2frame.dataFrame.Bind(wx.EVT_MENU, OnPwdrAdd, id=G2gd.wxID_PWDRADD)
    8108         G2frame.dataFrame.Bind(wx.EVT_MENU, OnHklfAdd, id=G2gd.wxID_HKLFADD)
    8109         G2frame.dataFrame.Bind(wx.EVT_MENU, OnDataDelete, id=G2gd.wxID_DATADELETE)
     8095        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.DataMenu)
     8096        G2frame.Bind(wx.EVT_MENU, OnDataUse, id=G2gd.wxID_DATAUSE)
     8097        G2frame.Bind(wx.EVT_MENU, OnDataCopy, id=G2gd.wxID_DATACOPY)
     8098        G2frame.Bind(wx.EVT_MENU, OnDataCopyFlags, id=G2gd.wxID_DATACOPYFLAGS)
     8099        G2frame.Bind(wx.EVT_MENU, OnSelDataCopy, id=G2gd.wxID_DATASELCOPY)
     8100        G2frame.Bind(wx.EVT_MENU, OnPwdrAdd, id=G2gd.wxID_PWDRADD)
     8101        G2frame.Bind(wx.EVT_MENU, OnHklfAdd, id=G2gd.wxID_HKLFADD)
     8102        G2frame.Bind(wx.EVT_MENU, OnDataDelete, id=G2gd.wxID_DATADELETE)
    81108103        # Atoms
    8111         FillSelectPageMenu(TabSelectionIdDict, G2frame.dataFrame.AtomsMenu)
    8112         G2frame.dataFrame.Bind(wx.EVT_MENU, OnSetAll, id=G2gd.wxID_ATOMSSETALL)
    8113         G2frame.dataFrame.Bind(wx.EVT_MENU, AtomRefine, id=G2gd.wxID_ATOMSSETSEL)
    8114         G2frame.dataFrame.Bind(wx.EVT_MENU, AtomModify, id=G2gd.wxID_ATOMSMODIFY)
    8115         G2frame.dataFrame.Bind(wx.EVT_MENU, OnAtomInsert, id=G2gd.wxID_ATOMSEDITINSERT)
    8116         G2frame.dataFrame.Bind(wx.EVT_MENU, OnHydAtomAdd, id=G2gd.wxID_ADDHATOM)
    8117         G2frame.dataFrame.Bind(wx.EVT_MENU, AtomDelete, id=G2gd.wxID_ATOMSEDITDELETE)
    8118         G2frame.dataFrame.Bind(wx.EVT_MENU, AtomTransform, id=G2gd.wxID_ATOMSTRANSFORM)
    8119 #        G2frame.dataFrame.Bind(wx.EVT_MENU, AtomRotate, id=G2gd.wxID_ATOMSROTATE)
     8104        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.AtomsMenu)
     8105        G2frame.Bind(wx.EVT_MENU, OnSetAll, id=G2gd.wxID_ATOMSSETALL)
     8106        G2frame.Bind(wx.EVT_MENU, AtomRefine, id=G2gd.wxID_ATOMSSETSEL)
     8107        G2frame.Bind(wx.EVT_MENU, AtomModify, id=G2gd.wxID_ATOMSMODIFY)
     8108        G2frame.Bind(wx.EVT_MENU, OnAtomInsert, id=G2gd.wxID_ATOMSEDITINSERT)
     8109        G2frame.Bind(wx.EVT_MENU, OnHydAtomAdd, id=G2gd.wxID_ADDHATOM)
     8110        G2frame.Bind(wx.EVT_MENU, AtomDelete, id=G2gd.wxID_ATOMSEDITDELETE)
     8111        G2frame.Bind(wx.EVT_MENU, AtomTransform, id=G2gd.wxID_ATOMSTRANSFORM)
     8112#        G2frame.Bind(wx.EVT_MENU, AtomRotate, id=G2gd.wxID_ATOMSROTATE)
    81208113       
    8121         G2frame.dataFrame.Bind(wx.EVT_MENU, OnAtomAdd, id=G2gd.wxID_ATOMSEDITADD)
    8122         G2frame.dataFrame.Bind(wx.EVT_MENU, OnAtomViewAdd, id=G2gd.wxID_ATOMSVIEWADD)
    8123         G2frame.dataFrame.Bind(wx.EVT_MENU, OnAtomViewInsert, id=G2gd.wxID_ATOMVIEWINSERT)
    8124         G2frame.dataFrame.Bind(wx.EVT_MENU, OnHydAtomUpdate, id=G2gd.wxID_UPDATEHATOM)
    8125         G2frame.dataFrame.Bind(wx.EVT_MENU, OnAtomMove, id=G2gd.wxID_ATOMMOVE)
    8126         G2frame.dataFrame.Bind(wx.EVT_MENU, MakeMolecule, id=G2gd.wxID_MAKEMOLECULE)
    8127         G2frame.dataFrame.Bind(wx.EVT_MENU, OnReloadDrawAtoms, id=G2gd.wxID_RELOADDRAWATOMS)
    8128         G2frame.dataFrame.Bind(wx.EVT_MENU, OnDistAngle, id=G2gd.wxID_ATOMSDISAGL)
    8129         G2frame.dataFrame.Bind(wx.EVT_MENU, OnDistAnglePrt, id=G2gd.wxID_ATOMSPDISAGL)
    8130         G2frame.dataFrame.Bind(wx.EVT_MENU, OnDensity, id=G2gd.wxID_ATOMSDENSITY)
    8131         G2frame.dataFrame.Bind(wx.EVT_MENU, OnValidProtein, id=G2gd.wxID_VALIDPROTEIN)
    8132         G2frame.dataFrame.Bind(wx.EVT_MENU, OnIsoDistortCalc, id=G2gd.wxID_ISODISP)
     8114        G2frame.Bind(wx.EVT_MENU, OnAtomAdd, id=G2gd.wxID_ATOMSEDITADD)
     8115        G2frame.Bind(wx.EVT_MENU, OnAtomViewAdd, id=G2gd.wxID_ATOMSVIEWADD)
     8116        G2frame.Bind(wx.EVT_MENU, OnAtomViewInsert, id=G2gd.wxID_ATOMVIEWINSERT)
     8117        G2frame.Bind(wx.EVT_MENU, OnHydAtomUpdate, id=G2gd.wxID_UPDATEHATOM)
     8118        G2frame.Bind(wx.EVT_MENU, OnAtomMove, id=G2gd.wxID_ATOMMOVE)
     8119        G2frame.Bind(wx.EVT_MENU, MakeMolecule, id=G2gd.wxID_MAKEMOLECULE)
     8120        G2frame.Bind(wx.EVT_MENU, OnReloadDrawAtoms, id=G2gd.wxID_RELOADDRAWATOMS)
     8121        G2frame.Bind(wx.EVT_MENU, OnDistAngle, id=G2gd.wxID_ATOMSDISAGL)
     8122        G2frame.Bind(wx.EVT_MENU, OnDistAnglePrt, id=G2gd.wxID_ATOMSPDISAGL)
     8123        G2frame.Bind(wx.EVT_MENU, OnDensity, id=G2gd.wxID_ATOMSDENSITY)
     8124        G2frame.Bind(wx.EVT_MENU, OnValidProtein, id=G2gd.wxID_VALIDPROTEIN)
     8125        G2frame.Bind(wx.EVT_MENU, OnIsoDistortCalc, id=G2gd.wxID_ISODISP)
    81338126        if 'HydIds' in data['General']:
    81348127            G2frame.dataFrame.AtomEdit.Enable(G2gd.wxID_UPDATEHATOM,True)
     
    81368129            G2frame.dataFrame.AtomEdit.Enable(G2gd.wxID_UPDATEHATOM,False)
    81378130        for id in G2frame.dataFrame.ReImportMenuId:     #loop over submenu items
    8138             G2frame.dataFrame.Bind(wx.EVT_MENU, OnReImport, id=id)
     8131            G2frame.Bind(wx.EVT_MENU, OnReImport, id=id)
    81398132        # Wave Data
    81408133        if data['General']['Modulated']:
    8141             FillSelectPageMenu(TabSelectionIdDict, G2frame.dataFrame.WavesData)
    8142             G2frame.dataFrame.Bind(wx.EVT_MENU, OnWaveVary, id=G2gd.wxID_WAVEVARY)
     8134            FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.WavesData)
     8135            G2frame.Bind(wx.EVT_MENU, OnWaveVary, id=G2gd.wxID_WAVEVARY)
    81438136        # Stacking faults
    8144         FillSelectPageMenu(TabSelectionIdDict, G2frame.dataFrame.LayerData)
    8145         G2frame.dataFrame.Bind(wx.EVT_MENU, OnCopyPhase, id=G2gd.wxID_COPYPHASE)
    8146         G2frame.dataFrame.Bind(wx.EVT_MENU, OnLoadDIFFaX, id=G2gd.wxID_LOADDIFFAX)
    8147         G2frame.dataFrame.Bind(wx.EVT_MENU, OnSimulate, id=G2gd.wxID_LAYERSIMULATE)
    8148         G2frame.dataFrame.Bind(wx.EVT_MENU, OnFitLayers, id=G2gd.wxID_LAYERSFIT)                       
    8149         G2frame.dataFrame.Bind(wx.EVT_MENU, OnSeqSimulate, id=G2gd.wxID_SEQUENCESIMULATE)
     8137        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.LayerData)
     8138        G2frame.Bind(wx.EVT_MENU, OnCopyPhase, id=G2gd.wxID_COPYPHASE)
     8139        G2frame.Bind(wx.EVT_MENU, OnLoadDIFFaX, id=G2gd.wxID_LOADDIFFAX)
     8140        G2frame.Bind(wx.EVT_MENU, OnSimulate, id=G2gd.wxID_LAYERSIMULATE)
     8141        G2frame.Bind(wx.EVT_MENU, OnFitLayers, id=G2gd.wxID_LAYERSFIT)                       
     8142        G2frame.Bind(wx.EVT_MENU, OnSeqSimulate, id=G2gd.wxID_SEQUENCESIMULATE)
    81508143        # Draw Options
    8151         FillSelectPageMenu(TabSelectionIdDict, G2frame.dataFrame.DataDrawOptions)
     8144        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.DataDrawOptions)
    81528145        # Draw Atoms
    8153         FillSelectPageMenu(TabSelectionIdDict, G2frame.dataFrame.DrawAtomsMenu)
    8154         G2frame.dataFrame.Bind(wx.EVT_MENU, DrawAtomStyle, id=G2gd.wxID_DRAWATOMSTYLE)
    8155         G2frame.dataFrame.Bind(wx.EVT_MENU, DrawAtomLabel, id=G2gd.wxID_DRAWATOMLABEL)
    8156         G2frame.dataFrame.Bind(wx.EVT_MENU, DrawAtomColor, id=G2gd.wxID_DRAWATOMCOLOR)
    8157         G2frame.dataFrame.Bind(wx.EVT_MENU, ResetAtomColors, id=G2gd.wxID_DRAWATOMRESETCOLOR)
    8158         G2frame.dataFrame.Bind(wx.EVT_MENU, OnEditAtomRadii, id=G2gd.wxID_DRWAEDITRADII)   
    8159         G2frame.dataFrame.Bind(wx.EVT_MENU, SetViewPoint, id=G2gd.wxID_DRAWVIEWPOINT)
    8160         G2frame.dataFrame.Bind(wx.EVT_MENU, AddSymEquiv, id=G2gd.wxID_DRAWADDEQUIV)
    8161         G2frame.dataFrame.Bind(wx.EVT_MENU, AddSphere, id=G2gd.wxID_DRAWADDSPHERE)
    8162         G2frame.dataFrame.Bind(wx.EVT_MENU, TransformSymEquiv, id=G2gd.wxID_DRAWTRANSFORM)
    8163         G2frame.dataFrame.Bind(wx.EVT_MENU, FillCoordSphere, id=G2gd.wxID_DRAWFILLCOORD)           
    8164         G2frame.dataFrame.Bind(wx.EVT_MENU, FillUnitCell, id=G2gd.wxID_DRAWFILLCELL)
    8165         G2frame.dataFrame.Bind(wx.EVT_MENU, DrawAtomsDelete, id=G2gd.wxID_DRAWDELETE)
    8166         G2frame.dataFrame.Bind(wx.EVT_MENU, OnDrawDistVP, id=G2gd.wxID_DRAWDISTVP)
    8167         G2frame.dataFrame.Bind(wx.EVT_MENU, OnDrawDAT, id=G2gd.wxID_DRAWDISAGLTOR)
    8168         G2frame.dataFrame.Bind(wx.EVT_MENU, OnDrawPlane, id=G2gd.wxID_DRAWPLANE)
    8169         G2frame.dataFrame.Bind(wx.EVT_MENU, OnRestraint, id=G2gd.wxID_DRAWRESTRBOND)
    8170         G2frame.dataFrame.Bind(wx.EVT_MENU, OnRestraint, id=G2gd.wxID_DRAWRESTRANGLE)
    8171         G2frame.dataFrame.Bind(wx.EVT_MENU, OnRestraint, id=G2gd.wxID_DRAWRESTRPLANE)
    8172         G2frame.dataFrame.Bind(wx.EVT_MENU, OnRestraint, id=G2gd.wxID_DRAWRESTRCHIRAL)
    8173         G2frame.dataFrame.Bind(wx.EVT_MENU, OnDefineRB, id=G2gd.wxID_DRAWDEFINERB)
     8146        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.DrawAtomsMenu)
     8147        G2frame.Bind(wx.EVT_MENU, DrawAtomStyle, id=G2gd.wxID_DRAWATOMSTYLE)
     8148        G2frame.Bind(wx.EVT_MENU, DrawAtomLabel, id=G2gd.wxID_DRAWATOMLABEL)
     8149        G2frame.Bind(wx.EVT_MENU, DrawAtomColor, id=G2gd.wxID_DRAWATOMCOLOR)
     8150        G2frame.Bind(wx.EVT_MENU, ResetAtomColors, id=G2gd.wxID_DRAWATOMRESETCOLOR)
     8151        G2frame.Bind(wx.EVT_MENU, OnEditAtomRadii, id=G2gd.wxID_DRWAEDITRADII)   
     8152        G2frame.Bind(wx.EVT_MENU, SetViewPoint, id=G2gd.wxID_DRAWVIEWPOINT)
     8153        G2frame.Bind(wx.EVT_MENU, AddSymEquiv, id=G2gd.wxID_DRAWADDEQUIV)
     8154        G2frame.Bind(wx.EVT_MENU, AddSphere, id=G2gd.wxID_DRAWADDSPHERE)
     8155        G2frame.Bind(wx.EVT_MENU, TransformSymEquiv, id=G2gd.wxID_DRAWTRANSFORM)
     8156        G2frame.Bind(wx.EVT_MENU, FillCoordSphere, id=G2gd.wxID_DRAWFILLCOORD)           
     8157        G2frame.Bind(wx.EVT_MENU, FillUnitCell, id=G2gd.wxID_DRAWFILLCELL)
     8158        G2frame.Bind(wx.EVT_MENU, DrawAtomsDelete, id=G2gd.wxID_DRAWDELETE)
     8159        G2frame.Bind(wx.EVT_MENU, OnDrawDistVP, id=G2gd.wxID_DRAWDISTVP)
     8160        G2frame.Bind(wx.EVT_MENU, OnDrawDAT, id=G2gd.wxID_DRAWDISAGLTOR)
     8161        G2frame.Bind(wx.EVT_MENU, OnDrawPlane, id=G2gd.wxID_DRAWPLANE)
     8162        G2frame.Bind(wx.EVT_MENU, OnRestraint, id=G2gd.wxID_DRAWRESTRBOND)
     8163        G2frame.Bind(wx.EVT_MENU, OnRestraint, id=G2gd.wxID_DRAWRESTRANGLE)
     8164        G2frame.Bind(wx.EVT_MENU, OnRestraint, id=G2gd.wxID_DRAWRESTRPLANE)
     8165        G2frame.Bind(wx.EVT_MENU, OnRestraint, id=G2gd.wxID_DRAWRESTRCHIRAL)
     8166        G2frame.Bind(wx.EVT_MENU, OnDefineRB, id=G2gd.wxID_DRAWDEFINERB)
    81748167        # RB Models
    8175         FillSelectPageMenu(TabSelectionIdDict, G2frame.dataFrame.RigidBodiesMenu)
    8176         G2frame.dataFrame.Bind(wx.EVT_MENU, OnAutoFindResRB, id=G2gd.wxID_AUTOFINDRESRB)
    8177         G2frame.dataFrame.Bind(wx.EVT_MENU, OnRBAssign, id=G2gd.wxID_ASSIGNATMS2RB)
    8178         G2frame.dataFrame.Bind(wx.EVT_MENU, OnRBCopyParms, id=G2gd.wxID_COPYRBPARMS)
    8179         G2frame.dataFrame.Bind(wx.EVT_MENU, OnGlobalResRBTherm, id=G2gd.wxID_GLOBALTHERM)
    8180         G2frame.dataFrame.Bind(wx.EVT_MENU, OnGlobalResRBRef, id=G2gd.wxID_GLOBALRESREFINE)
    8181         G2frame.dataFrame.Bind(wx.EVT_MENU, OnRBRemoveAll, id=G2gd.wxID_RBREMOVEALL)
     8168        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.RigidBodiesMenu)
     8169        G2frame.Bind(wx.EVT_MENU, OnAutoFindResRB, id=G2gd.wxID_AUTOFINDRESRB)
     8170        G2frame.Bind(wx.EVT_MENU, OnRBAssign, id=G2gd.wxID_ASSIGNATMS2RB)
     8171        G2frame.Bind(wx.EVT_MENU, OnRBCopyParms, id=G2gd.wxID_COPYRBPARMS)
     8172        G2frame.Bind(wx.EVT_MENU, OnGlobalResRBTherm, id=G2gd.wxID_GLOBALTHERM)
     8173        G2frame.Bind(wx.EVT_MENU, OnGlobalResRBRef, id=G2gd.wxID_GLOBALRESREFINE)
     8174        G2frame.Bind(wx.EVT_MENU, OnRBRemoveAll, id=G2gd.wxID_RBREMOVEALL)
    81828175        # Map peaks
    8183         FillSelectPageMenu(TabSelectionIdDict, G2frame.dataFrame.MapPeaksMenu)
    8184         G2frame.dataFrame.Bind(wx.EVT_MENU, OnPeaksMove, id=G2gd.wxID_PEAKSMOVE)
    8185         G2frame.dataFrame.Bind(wx.EVT_MENU, OnPeaksViewPoint, id=G2gd.wxID_PEAKSVIEWPT)
    8186         G2frame.dataFrame.Bind(wx.EVT_MENU, OnPeaksDistVP, id=G2gd.wxID_PEAKSDISTVP)
    8187         G2frame.dataFrame.Bind(wx.EVT_MENU, OnPeaksDA, id=G2gd.wxID_PEAKSDA)
    8188         G2frame.dataFrame.Bind(wx.EVT_MENU, OnShowBonds, id=G2gd.wxID_SHOWBONDS)
    8189         G2frame.dataFrame.Bind(wx.EVT_MENU, OnPeaksEquiv, id=G2gd.wxID_FINDEQVPEAKS)
    8190         G2frame.dataFrame.Bind(wx.EVT_MENU, OnPeaksUnique, id=G2gd.wxID_PEAKSUNIQUE)
    8191         G2frame.dataFrame.Bind(wx.EVT_MENU, OnPeaksDelete, id=G2gd.wxID_PEAKSDELETE)
    8192         G2frame.dataFrame.Bind(wx.EVT_MENU, OnPeaksClear, id=G2gd.wxID_PEAKSCLEAR)
     8176        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.MapPeaksMenu)
     8177        G2frame.Bind(wx.EVT_MENU, OnPeaksMove, id=G2gd.wxID_PEAKSMOVE)
     8178        G2frame.Bind(wx.EVT_MENU, OnPeaksViewPoint, id=G2gd.wxID_PEAKSVIEWPT)
     8179        G2frame.Bind(wx.EVT_MENU, OnPeaksDistVP, id=G2gd.wxID_PEAKSDISTVP)
     8180        G2frame.Bind(wx.EVT_MENU, OnPeaksDA, id=G2gd.wxID_PEAKSDA)
     8181        G2frame.Bind(wx.EVT_MENU, OnShowBonds, id=G2gd.wxID_SHOWBONDS)
     8182        G2frame.Bind(wx.EVT_MENU, OnPeaksEquiv, id=G2gd.wxID_FINDEQVPEAKS)
     8183        G2frame.Bind(wx.EVT_MENU, OnPeaksUnique, id=G2gd.wxID_PEAKSUNIQUE)
     8184        G2frame.Bind(wx.EVT_MENU, OnPeaksDelete, id=G2gd.wxID_PEAKSDELETE)
     8185        G2frame.Bind(wx.EVT_MENU, OnPeaksClear, id=G2gd.wxID_PEAKSCLEAR)
    81938186        # MC/SA
    8194         FillSelectPageMenu(TabSelectionIdDict, G2frame.dataFrame.MCSAMenu)
    8195         G2frame.dataFrame.Bind(wx.EVT_MENU, OnMCSAaddAtom, id=G2gd.wxID_ADDMCSAATOM)
    8196         G2frame.dataFrame.Bind(wx.EVT_MENU, OnMCSAaddRB, id=G2gd.wxID_ADDMCSARB)
    8197         G2frame.dataFrame.Bind(wx.EVT_MENU, OnMCSAclear, id=G2gd.wxID_CLEARMCSARB)
    8198         G2frame.dataFrame.Bind(wx.EVT_MENU, OnMCSAmove, id=G2gd.wxID_MOVEMCSA)
    8199         G2frame.dataFrame.Bind(wx.EVT_MENU, OnClearResults, id=G2gd.wxID_MCSACLEARRESULTS)
     8187        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.MCSAMenu)
     8188        G2frame.Bind(wx.EVT_MENU, OnMCSAaddAtom, id=G2gd.wxID_ADDMCSAATOM)
     8189        G2frame.Bind(wx.EVT_MENU, OnMCSAaddRB, id=G2gd.wxID_ADDMCSARB)
     8190        G2frame.Bind(wx.EVT_MENU, OnMCSAclear, id=G2gd.wxID_CLEARMCSARB)
     8191        G2frame.Bind(wx.EVT_MENU, OnMCSAmove, id=G2gd.wxID_MOVEMCSA)
     8192        G2frame.Bind(wx.EVT_MENU, OnClearResults, id=G2gd.wxID_MCSACLEARRESULTS)
    82008193        # Texture
    8201         FillSelectPageMenu(TabSelectionIdDict, G2frame.dataFrame.TextureMenu)
    8202         G2frame.dataFrame.Bind(wx.EVT_MENU, OnTextureRefine, id=G2gd.wxID_REFINETEXTURE)
    8203 #        G2frame.dataFrame.Bind(wx.EVT_MENU, OnTextureClear, id=G2gd.wxID_CLEARTEXTURE)
     8194        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.TextureMenu)
     8195        G2frame.Bind(wx.EVT_MENU, OnTextureRefine, id=G2gd.wxID_REFINETEXTURE)
     8196#        G2frame.Bind(wx.EVT_MENU, OnTextureClear, id=G2gd.wxID_CLEARTEXTURE)
    82048197        # Pawley reflections
    8205         FillSelectPageMenu(TabSelectionIdDict, G2frame.dataFrame.PawleyMenu)
    8206         G2frame.dataFrame.Bind(wx.EVT_MENU, OnPawleySet, id=G2gd.wxID_PAWLEYSET)
    8207         G2frame.dataFrame.Bind(wx.EVT_MENU, OnPawleyLoad, id=G2gd.wxID_PAWLEYLOAD)
    8208         G2frame.dataFrame.Bind(wx.EVT_MENU, OnPawleyEstimate, id=G2gd.wxID_PAWLEYESTIMATE)
    8209         G2frame.dataFrame.Bind(wx.EVT_MENU, OnPawleyUpdate, id=G2gd.wxID_PAWLEYUPDATE)
    8210         G2frame.dataFrame.Bind(wx.EVT_MENU, OnPawleySelAll, id=G2gd.wxID_PAWLEYSELALL)
    8211         G2frame.dataFrame.Bind(wx.EVT_MENU, OnPawleySelNone, id=G2gd.wxID_PAWLEYSELNONE)
    8212         G2frame.dataFrame.Bind(wx.EVT_MENU, OnPawleyToggle, id=G2gd.wxID_PAWLEYSELTOGGLE)
     8198        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataWindow.PawleyMenu)
     8199        G2frame.Bind(wx.EVT_MENU, OnPawleySet, id=G2gd.wxID_PAWLEYSET)
     8200        G2frame.Bind(wx.EVT_MENU, OnPawleyLoad, id=G2gd.wxID_PAWLEYLOAD)
     8201        G2frame.Bind(wx.EVT_MENU, OnPawleyEstimate, id=G2gd.wxID_PAWLEYESTIMATE)
     8202        G2frame.Bind(wx.EVT_MENU, OnPawleyUpdate, id=G2gd.wxID_PAWLEYUPDATE)
     8203        G2frame.Bind(wx.EVT_MENU, OnPawleySelAll, id=G2gd.wxID_PAWLEYSELALL)
     8204        G2frame.Bind(wx.EVT_MENU, OnPawleySelNone, id=G2gd.wxID_PAWLEYSELNONE)
     8205        G2frame.Bind(wx.EVT_MENU, OnPawleyToggle, id=G2gd.wxID_PAWLEYSELTOGGLE)
    82138206       
    82148207    # UpdatePhaseData execution starts here
     
    82308223    global rbAtmDict   
    82318224    rbAtmDict = {}
    8232     if G2frame.dataDisplay:
    8233         G2frame.dataDisplay.Destroy()
    82348225    PhaseName = G2frame.PatternTree.GetItemText(Item)
    82358226    G2gd.SetDataMenuBar(G2frame)
    8236     G2frame.dataFrame.SetLabel('Phase Data for '+PhaseName)
    8237     G2frame.dataFrame.CreateStatusBar()
     8227    G2frame.SetLabel(G2frame.GetLabel().split('||')[0]+' || '+'Phase Data for '+PhaseName)
     8228    G2frame.dataWindow.ClearData()
    82388229    if GSASIIpath.GetConfigValue('debug'):
    8239         G2frame.dataDisplay = G2G.GSNoteBook(parent=G2frame.dataFrame,size=G2frame.dataFrame.GetClientSize(),
    8240             style=wx.aui.AUI_NB_DEFAULT_STYLE ^ wx.aui.AUI_NB_CLOSE_ON_ACTIVE_TAB)
     8230        G2frame.phaseDisplay = G2G.GSNoteBook(parent=G2frame.dataWindow,size=G2frame.dataWindow.GetClientSize(),
     8231            style=wx.aui.AUI_NB_TOP | wx.aui.AUI_NB_TAB_SPLIT | wx.aui.AUI_NB_TAB_MOVE)
    82418232    else:
    8242         G2frame.dataDisplay = G2G.GSNoteBook(parent=G2frame.dataFrame,size=G2frame.dataFrame.GetClientSize())
    8243     G2frame.dataDisplay.gridList = [] # list of all grids in notebook
     8233        G2frame.phaseDisplay = G2G.GSNoteBook(parent=G2frame.dataWindow,size=G2frame.dataWindow.GetClientSize())
     8234    G2frame.phaseDisplay.gridList = [] # list of all grids in notebook
    82448235    Pages = []   
    8245     G2frame.dataDisplay.gridList = []
    8246     General = wx.ScrolledWindow(G2frame.dataDisplay)
    8247     G2frame.dataDisplay.AddPage(General,'General')
     8236    G2frame.phaseDisplay.gridList = []
     8237    General = wx.ScrolledWindow(G2frame.phaseDisplay)
     8238    G2frame.phaseDisplay.AddPage(General,'General')
    82488239    Pages.append('General')
    8249     DData = wx.ScrolledWindow(G2frame.dataDisplay)
    8250     G2frame.dataDisplay.AddPage(DData,'Data')
     8240    DData = wx.ScrolledWindow(G2frame.phaseDisplay)
     8241    G2frame.phaseDisplay.AddPage(DData,'Data')
    82518242    Pages.append('Data')
    8252     Atoms = G2G.GSGrid(G2frame.dataDisplay)
    8253     G2frame.dataDisplay.gridList.append(Atoms)
    8254     G2frame.dataDisplay.AddPage(Atoms,'Atoms')
     8243    Atoms = G2G.GSGrid(G2frame.phaseDisplay)
     8244    G2frame.phaseDisplay.gridList.append(Atoms)
     8245    G2frame.phaseDisplay.AddPage(Atoms,'Atoms')
    82558246    Pages.append('Atoms')
    82568247    if data['General']['Modulated']:
    8257         G2frame.waveData = wx.ScrolledWindow(G2frame.dataDisplay)
    8258         G2frame.dataDisplay.AddPage(G2frame.waveData,'Wave Data')
     8248        G2frame.waveData = wx.ScrolledWindow(G2frame.phaseDisplay)
     8249        G2frame.phaseDisplay.AddPage(G2frame.waveData,'Wave Data')
    82598250        Pages.append('Wave Data')
    82608251    if data['General']['Type'] == 'faulted':
    8261         G2frame.layerData = wx.ScrolledWindow(G2frame.dataDisplay)
    8262         G2frame.dataDisplay.AddPage(G2frame.layerData,'Layers')
     8252        G2frame.layerData = wx.ScrolledWindow(G2frame.phaseDisplay)
     8253        G2frame.phaseDisplay.AddPage(G2frame.layerData,'Layers')
    82638254        Pages.append('Layers')               
    8264     drawOptions = wx.ScrolledWindow(G2frame.dataDisplay)
    8265     G2frame.dataDisplay.AddPage(drawOptions,'Draw Options')
     8255    drawOptions = wx.ScrolledWindow(G2frame.phaseDisplay)
     8256    G2frame.phaseDisplay.AddPage(drawOptions,'Draw Options')
    82668257    Pages.append('Draw Options')
    8267     drawAtoms = G2G.GSGrid(G2frame.dataDisplay)
    8268     G2frame.dataDisplay.gridList.append(drawAtoms)
    8269     G2frame.dataDisplay.AddPage(drawAtoms,'Draw Atoms')
     8258    drawAtoms = G2G.GSGrid(G2frame.phaseDisplay)
     8259    G2frame.phaseDisplay.gridList.append(drawAtoms)
     8260    G2frame.phaseDisplay.AddPage(drawAtoms,'Draw Atoms')
    82708261    Pages.append('Draw Atoms')
    82718262    if data['General']['Type'] not in ['faulted',] and not data['General']['Modulated']:
    8272         RigidBodies = wx.ScrolledWindow(G2frame.dataDisplay)
    8273         G2frame.dataDisplay.AddPage(RigidBodies,'RB Models')
     8263        RigidBodies = wx.ScrolledWindow(G2frame.phaseDisplay)
     8264        G2frame.phaseDisplay.AddPage(RigidBodies,'RB Models')
    82748265        Pages.append('RB Models')
    8275     MapPeaks = G2G.GSGrid(G2frame.dataDisplay)
    8276     G2frame.dataDisplay.gridList.append(MapPeaks)   
    8277     G2frame.dataDisplay.AddPage(MapPeaks,'Map peaks')
     8266    MapPeaks = G2G.GSGrid(G2frame.phaseDisplay)
     8267    G2frame.phaseDisplay.gridList.append(MapPeaks)   
     8268    G2frame.phaseDisplay.AddPage(MapPeaks,'Map peaks')
    82788269    Pages.append('Map peaks')
    82798270    if data['General']['Type'] not in ['faulted',] and not data['General']['Modulated']:
    8280         G2frame.MCSA = wx.ScrolledWindow(G2frame.dataDisplay)
    8281         G2frame.dataDisplay.AddPage(G2frame.MCSA,'MC/SA')
     8271        G2frame.MCSA = wx.ScrolledWindow(G2frame.phaseDisplay)
     8272        G2frame.phaseDisplay.AddPage(G2frame.MCSA,'MC/SA')
    82828273        Pages.append('MC/SA')
    8283     Texture = wx.ScrolledWindow(G2frame.dataDisplay)
    8284     G2frame.dataDisplay.AddPage(Texture,'Texture')
     8274    Texture = wx.ScrolledWindow(G2frame.phaseDisplay)
     8275    G2frame.phaseDisplay.AddPage(Texture,'Texture')
    82858276    Pages.append('Texture')
    8286     G2frame.PawleyRefl = G2G.GSGrid(G2frame.dataDisplay)
    8287     G2frame.dataDisplay.gridList.append(G2frame.PawleyRefl)
    8288     G2frame.dataDisplay.AddPage(G2frame.PawleyRefl,'Pawley reflections')
     8277    G2frame.PawleyRefl = G2G.GSGrid(G2frame.phaseDisplay)
     8278    G2frame.phaseDisplay.gridList.append(G2frame.PawleyRefl)
     8279    G2frame.phaseDisplay.AddPage(G2frame.PawleyRefl,'Pawley reflections')
    82898280    Pages.append('Pawley reflections')
    82908281    G2frame.dataFrame.AtomCompute.Enable(G2gd.wxID_ISODISP,'ISODISTORT' in data)
    82918282    G2frame.dataFrame.AtomCompute.Enable(G2gd.wxID_VALIDPROTEIN,'macro' in data['General']['Type'])
    8292     G2frame.dataDisplay.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CHANGED, OnPageChanged)
     8283    G2frame.phaseDisplay.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CHANGED, OnPageChanged)
    82938284    FillMenus()
    82948285    if oldPage is None or oldPage == 0:
    82958286        ChangePage(0)
    8296         wx.CallAfter(G2frame.dataDisplay.SendSizeEvent)
     8287        wx.CallAfter(G2frame.phaseDisplay.SendSizeEvent)
    82978288    elif oldPage:
    82988289        SetupGeneral()    # not sure why one might need this when moving from phase to phase; but does not hurt
    8299         G2frame.dataDisplay.SetSelection(oldPage)
     8290        G2frame.phaseDisplay.SetSelection(oldPage)
Note: See TracChangeset for help on using the changeset viewer.