Changeset 4594 for trunk/GSASIIpwdGUI.py


Ignore:
Timestamp:
Oct 14, 2020 2:56:09 PM (2 years ago)
Author:
vondreele
Message:

remove WACV,wx.ALIGN_CENTER_VERTICAL from all Add for wx.VERTICAL wx.BoxSizers?
fix use of inspect.getargspec - now inspect.getfullargspec for python 3.x in G2dataGUI
Add a File.close in G2img_CBF reader

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r4581 r4594  
    186186        magDisplay.Bind(wg.EVT_GRID_CELL_LEFT_CLICK,RefreshGrid)
    187187        magDisplay.AutoSizeColumns(False)
    188         mainSizer.Add(magDisplay,0,WACV)
     188        mainSizer.Add(magDisplay,0)
    189189       
    190190        OkBtn = wx.Button(self.panel,-1,"Ok")
     
    227227        self.panel = wx.Panel(self)
    228228        mainSizer = wx.BoxSizer(wx.VERTICAL)
    229         mainSizer.Add(wx.StaticText(self.panel,label='Background RDF controls:'),0,WACV)
     229        mainSizer.Add(wx.StaticText(self.panel,label='Background RDF controls:'),0)
    230230        plotType = wx.BoxSizer(wx.HORIZONTAL)
    231231        plotType.Add(wx.StaticText(self.panel,label=' Select plot type:'),0,WACV)
     
    236236        useOC.Bind(wx.EVT_COMBOBOX,OnUseOC)
    237237        plotType.Add(useOC,0,WACV)
    238         mainSizer.Add(plotType,0,WACV)
     238        mainSizer.Add(plotType,0)
    239239        dataSizer = wx.BoxSizer(wx.HORIZONTAL)
    240240        dataSizer.Add(wx.StaticText(self.panel,label=' Smoothing type: '),0,WACV)
     
    248248            typeHint=float)
    249249        dataSizer.Add(maxR,0,WACV)
    250         mainSizer.Add(dataSizer,0,WACV)
     250        mainSizer.Add(dataSizer,0)
    251251
    252252        OkBtn = wx.Button(self.panel,-1,"Ok")
     
    14431443        topSizer.Add((5,0),0)
    14441444        backSizer.Add(topSizer)
    1445         backSizer.Add(wx.StaticText(G2frame.dataWindow,-1,' Background coefficients:'),0,WACV)
     1445        backSizer.Add(wx.StaticText(G2frame.dataWindow,-1,' Background coefficients:'),0)
    14461446        bakSizer = wx.FlexGridSizer(0,5,5,5)
    14471447        for i,value in enumerate(data[0][3:]):
     
    15011501        debSizer.Add(topSizer)
    15021502        if data[1]['nDebye']:
    1503             debSizer.Add(wx.StaticText(G2frame.dataWindow,-1,' Debye diffuse terms:'),0,WACV)       
     1503            debSizer.Add(wx.StaticText(G2frame.dataWindow,-1,' Debye diffuse terms:'),0)       
    15041504            rowLabels = []
    15051505            for i in range(len(data[1]['debyeTerms'])): rowLabels.append(str(i))
     
    15801580        peaksGrid = None
    15811581        if data[1]['nPeaks']:
    1582             peaksSizer.Add(wx.StaticText(G2frame.dataWindow,-1,' Peak list:'),0,WACV)       
     1582            peaksSizer.Add(wx.StaticText(G2frame.dataWindow,-1,' Peak list:'),0)       
    15831583            rowLabels = []
    15841584            for i in range(len(data[1]['peaksList'])): rowLabels.append(str(i))
     
    16241624
    16251625        fileSizer = wx.BoxSizer(wx.VERTICAL)
    1626         fileSizer.Add(wx.StaticText(G2frame.dataWindow,-1,' Fixed background file:'),0,WACV)
     1626        fileSizer.Add(wx.StaticText(G2frame.dataWindow,-1,' Fixed background file:'),0)
    16271627        if 'background PWDR' not in data[1]:
    16281628            data[1]['background PWDR'] = ['',-1.,False]
     
    52745274        for name in data['Substances']:
    52755275            G2G.HorizontalLine(substSizer,G2frame.dataWindow)   
    5276             substSizer.Add(wx.StaticText(parent=G2frame.dataWindow,label=' Data for '+name+':'),
    5277                 0,WACV)
     5276            substSizer.Add(wx.StaticText(parent=G2frame.dataWindow,label=' Data for '+name+':'),0)
    52785277            if name == 'vacuum':
    5279                 substSizer.Add(wx.StaticText(parent=G2frame.dataWindow,label='        Not applicable'),
    5280                     0,WACV)
     5278                substSizer.Add(wx.StaticText(parent=G2frame.dataWindow,label='        Not applicable'),0)
    52815279            elif name == 'unit scatter':
    5282                 substSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Scattering density,f: %.3f *10%scm%s'%(data['Substances'][name]['Scatt density'],Pwr10,Pwrm2)),0,WACV)
     5280                substSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Scattering density,f: %.3f *10%scm%s'%(data['Substances'][name]['Scatt density'],Pwr10,Pwrm2)),0)
    52835281            else:   
    52845282                elSizer = wx.FlexGridSizer(0,8,5,5)
     
    56405638           
    56415639        sizeSizer = wx.BoxSizer(wx.VERTICAL)
    5642         sizeSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Size distribution parameters: '),0,WACV)
     5640        sizeSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Size distribution parameters: '),0)
    56435641        binSizer = wx.FlexGridSizer(0,7,5,5)
    56445642        binSizer.Add(wx.StaticText(G2frame.dataWindow,label=' No. size bins: '),0,WACV)
     
    57575755           
    57585756        pairSizer = wx.BoxSizer(wx.VERTICAL)
    5759         pairSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Pair distribution parameters: '),0,WACV)
     5757        pairSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Pair distribution parameters: '),0)
    57605758        binSizer = wx.FlexGridSizer(0,6,5,5)
    57615759        binSizer.Add(wx.StaticText(G2frame.dataWindow,label=' No. R bins: '),0,WACV)
     
    57855783        else:
    57865784            fitSizer.Add(wx.StaticText(G2frame.dataWindow,label=" D.I. Svergun, J. Appl. Cryst., 24, 485-492 (1991)"),0,WACV)
    5787         pairSizer.Add(fitSizer,0,WACV)
     5785        pairSizer.Add(fitSizer,0)
    57885786        if 'Moore' in data['Pair']['Method']:
    57895787            mooreSizer = wx.BoxSizer(wx.HORIZONTAL)
     
    57945792            mooreterms.Bind(wx.EVT_BUTTON,OnMooreTerms)
    57955793            mooreSizer.Add(mooreterms,0,WACV)
    5796             pairSizer.Add(mooreSizer,0,WACV)
     5794            pairSizer.Add(mooreSizer,0)
    57975795        errorSizer = wx.BoxSizer(wx.HORIZONTAL)
    57985796        errorSizer.Add(wx.StaticText(G2frame.dataWindow,label='Error method: '),0,WACV)
     
    58055803            errorSizer.Add(percent,0,WACV)
    58065804        errorSizer.Add(error,0,WACV)
    5807         pairSizer.Add(errorSizer,0,WACV)
     5805        pairSizer.Add(errorSizer,0)
    58085806        return pairSizer   
    58095807   
     
    58425840       
    58435841        shapeSizer = wx.BoxSizer(wx.VERTICAL)
    5844         shapeSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Shape parameters:'),0,WACV)
     5842        shapeSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Shape parameters:'),0)
    58455843        parmSizer = wx.FlexGridSizer(0,4,5,5)
    58465844#1st row       
     
    58845882       
    58855883        if len(data['Pair'].get('Result',[])):
    5886             shapeSizer.Add(wx.StaticText(G2frame.dataWindow,label=' SHAPES run results:'),0,WACV)
     5884            shapeSizer.Add(wx.StaticText(G2frame.dataWindow,label=' SHAPES run results:'),0)
    58875885            Atoms,Patterns,PRcalc = data['Pair']['Result']
    58885886            colLabels = ['name','show beads','show shape','Rvalue','P(r) dif','Nbeads','Nshape']
     
    59045902                        ShapesResult.SetReadOnly(r,c,isReadOnly=True)
    59055903   
    5906             shapeSizer.Add(ShapesResult,0,WACV)
     5904            shapeSizer.Add(ShapesResult,0)
    59075905        return shapeSizer
    59085906
     
    64946492        resol.Add(wx.StaticText(G2frame.dataWindow,label=' (FWHM %): '),0,WACV)
    64956493        resol.Add(G2G.ValidatedTxtCtrl(G2frame.dataWindow,data['Resolution'],0,nDig=(10,3),xmin=0.,xmax=5.,OnLeave=NewRes),0,WACV)
    6496         controlSizer.Add(resol,0,WACV)
     6494        controlSizer.Add(resol,0)
    64976495        minimiz = wx.BoxSizer(wx.HORIZONTAL)
    64986496        minimiz.Add(wx.StaticText(G2frame.dataWindow,label=' Minimizer: '),0,WACV)
     
    65086506        weight.Bind(wx.EVT_CHECKBOX, OnWeight)
    65096507        minimiz.Add(weight,0,WACV)
    6510         controlSizer.Add(minimiz,0,WACV)
     6508        controlSizer.Add(minimiz,0)
    65116509        plotSizer = wx.BoxSizer(wx.HORIZONTAL)
    65126510        plotSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Plot controls: '),0,WACV)
     
    65236521#        q4fft.Bind(wx.EVT_CHECKBOX, OnQ4fftplot)
    65246522#        plotSizer.Add(q4fft,0,WACV)
    6525         controlSizer.Add(plotSizer,0,WACV)
     6523        controlSizer.Add(plotSizer,0)
    65266524        return controlSizer
    65276525   
     
    66186616        for ilay,layer in enumerate(data['Layers']):
    66196617            if not ilay:
    6620                 layerSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Top layer (superphase):'),0,WACV)
     6618                layerSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Top layer (superphase):'),0)
    66216619            elif ilay < len(data['Layers'])-1:
    6622                 layerSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Layer no. %d'%(ilay)),0,WACV)
     6620                layerSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Layer no. %d'%(ilay)),0)
    66236621            else:
    6624                 layerSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Bottom layer (substrate):'),0,WACV)
     6622                layerSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Bottom layer (substrate):'),0)
    66256623            midlayer = wx.BoxSizer(wx.HORIZONTAL)
    66266624            midlayer.Add(wx.StaticText(G2frame.dataWindow,label=' Substance: '),0,WACV)
     
    69756973                           
    69766974        PDFfileSizer = wx.BoxSizer(wx.VERTICAL)
    6977         PDFfileSizer.Add(wx.StaticText(parent=G2frame.dataWindow,label=' PDF data files: '),0,WACV)
     6975        PDFfileSizer.Add(wx.StaticText(parent=G2frame.dataWindow,label=' PDF data files: '),0)
    69786976        PDFfileSizer.Add((5,5),0)   
    69796977        if 'C' in inst['Type'][0]:
    69806978            str = ' Sample file: PWDR%s   Wavelength, A: %.5f  Energy, keV: %.3f  Polariz.: %.2f '%(dataFile[4:],wave,keV,polariz)
    6981             PDFfileSizer.Add(wx.StaticText(parent=G2frame.dataWindow,label=str),0,WACV)
     6979            PDFfileSizer.Add(wx.StaticText(parent=G2frame.dataWindow,label=str),0)
    69826980        PDFfileSizer.Add((5,5),0)
    69836981        fileSizer = wx.FlexGridSizer(0,5,5,1)
     
    70227020        sampleSizer = wx.BoxSizer(wx.VERTICAL)
    70237021        if not ElList:
    7024             sampleSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Sample information: fill in this 1st'),0,WACV)
     7022            sampleSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Sample information: fill in this 1st'),0)
    70257023        else:
    7026             sampleSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Sample information: '),0,WACV)
     7024            sampleSizer.Add(wx.StaticText(G2frame.dataWindow,label=' Sample information: '),0)
    70277025        sampleSizer.Add((5,5),0)   
    70287026        Abs = G2lat.CellAbsorption(ElList,data['Form Vol'])
     
    76247622
    76257623        peakBox = wx.BoxSizer(wx.VERTICAL)
    7626         peakBox.Add(wx.StaticText(G2frame.dataWindow,label=' PDF Peaks:'),0,WACV)
    7627         peakBox.Add(PDFPeaks,0,WACV)
     7624        peakBox.Add(wx.StaticText(G2frame.dataWindow,label=' PDF Peaks:'),0)
     7625        peakBox.Add(PDFPeaks,0)
    76287626       
    76297627        return peakBox
Note: See TracChangeset for help on using the changeset viewer.