Changeset 2715


Ignore:
Timestamp:
Feb 18, 2017 4:22:21 PM (5 years ago)
Author:
vondreele
Message:

put histogram numbers in sorted order for View LS parms
remove some commented lines from G2pwdrGUI
force seq refinement to skip unused phases in each histogram - hap parameters are ignored & seq results table shows blanks for them
seq plot plot skips blanks - leaves blank spots in any parameter line

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r2712 r2715  
    1818import os
    1919import sys
    20 import time
    2120import math
    2221import copy
  • trunk/GSASIIgrid.py

    r2711 r2715  
    14981498        self.globVars.sort()
    14991499        self.hisNames = [':'.join(item) for item in splitNames if not item[0]]
    1500         self.hisNums = [' ',]+list(set([item.split(':')[1] for item in self.hisNames]))
    1501         if '' in self.hisNums: self.hisNums.remove('')
     1500        self.hisNums = list(set([int(item.split(':')[1]) for item in self.hisNames]))
     1501        self.hisNums.sort()
     1502        self.hisNums = [' ',]+[str(item) for item in self.hisNums]
    15021503        self.hisVars = list(set([' ',]+[item[2] for item in splitNames if not item[0]]))
    15031504        self.hisVars.sort()
    1504         self.hisNums.sort()
    15051505        self.phasNames = [':'.join(item) for item in splitNames if not item[1] and 'is' not in item[2]]
    15061506        self.phasNums = [' ',]+list(set([item.split(':')[0] for item in self.phasNames]))
     
    16141614        subSizer.Add(wx.StaticText(self.panel,wx.ID_ANY,'value'),0,wx.ALIGN_RIGHT)
    16151615        explainRefine = False
    1616         time0 = time.time()
    16171616        for name in choiceDict[self.parmChoice]:
    16181617            # skip entries without numerical values
     
    16451644            subSizer.Add(wx.StaticText(self.panel,wx.ID_ANY,value),0,wx.ALIGN_RIGHT)
    16461645
    1647         print time.time()-time0
    16481646        mainSizer.Add(subSizer,0)
    16491647        if explainRefine:
  • trunk/GSASIIplot.py

    r2701 r2715  
    41874187            'press L to toggle lines, S to select X axis, T to change titles (reselect column to show?)',1)
    41884188        Plot.clear()
     4189        colors=['b','g','r','c','m','k']
    41894190        if G2frame.seqXaxis is not None:   
    41904191            xName,X,Xsig = Page.seqTableGet(G2frame.seqXaxis)
     
    41924193            X = np.arange(0,G2frame.SeqTable.GetNumberRows(),1)
    41934194            xName = 'Data sequence number'
    4194         for col in Page.seqYaxisList:
     4195        for ic,col in enumerate(Page.seqYaxisList):
     4196            Ncol = colors[ic%6]
    41954197            name,Y,sig = Page.seqTableGet(col)
    41964198            # deal with missing (None) values
     
    41994201            Ysnew = []
    42004202            for i in range(len(X)):
    4201                 if X[i] is None or Y[i] is None: continue
     4203                if X[i] is None or Y[i] is None:
     4204                    if Ysnew:
     4205                        if G2frame.seqReverse and not G2frame.seqXaxis:
     4206                            Ynew = Ynew[::-1]
     4207                            Ysnew = Ysnew[::-1]
     4208                        if G2frame.seqLines:
     4209                            Plot.errorbar(Xnew,Ynew,yerr=Ysnew,color=Ncol)
     4210                        else:
     4211                            Plot.errorbar(Xnew,Ynew,yerr=Ysnew,linestyle='None',color=Ncol,marker='x')
     4212                    else:
     4213                        if G2frame.seqReverse and not G2frame.seqXaxis:
     4214                            Ynew = Ynew[::-1]
     4215                        Plot.plot(Xnew,Ynew,color=Ncol)
     4216                        Plot.plot(Xnew,Ynew,'o',color=Ncol)
     4217                    Xnew = []
     4218                    Ynew = []
     4219                    Ysnew = []
     4220                    continue
    42024221                Xnew.append(X[i])
    42034222                Ynew.append(Y[i])
     
    42084227                    Ysnew = Ysnew[::-1]
    42094228                if G2frame.seqLines:
    4210                     Plot.errorbar(Xnew,Ynew,yerr=Ysnew,label=name)
     4229                    Plot.errorbar(Xnew,Ynew,yerr=Ysnew,color=Ncol,label=name)
    42114230                else:
    4212                     Plot.errorbar(Xnew,Ynew,yerr=Ysnew,label=name,linestyle='None',marker='x')
     4231                    Plot.errorbar(Xnew,Ynew,yerr=Ysnew,label=name,linestyle='None',color=Ncol,marker='x')
    42134232            else:
    42144233                if G2frame.seqReverse and not G2frame.seqXaxis:
    42154234                    Ynew = Ynew[::-1]
    4216                 Plot.plot(Xnew,Ynew)
    4217                 Plot.plot(Xnew,Ynew,'o',label=name)
     4235                Plot.plot(Xnew,Ynew,color=Ncol)
     4236                Plot.plot(Xnew,Ynew,'o',color=Ncol,label=name)
    42184237        if Page.fitvals: # TODO: deal with fitting of None values
    42194238            if G2frame.seqReverse and not G2frame.seqXaxis:
  • trunk/GSASIIpwdGUI.py

    r2714 r2715  
    35913591                G2frame.RefList = ''
    35923592                phaseName = ''
    3593 #    if phaseName not in G2frame.refTable:
    3594 #        print phaseName
    3595 #        print phases
    3596 #        raise Exception("how did we get a invalid phase name?")   
    35973593    if phaseName:
    35983594        ShowReflTable(phaseName)
    3599 #    G2frame.refTable[phaseName].Fit()   #slow!!
    3600 #    size = G2frame.refTable[phaseName].GetSize()
    3601 #    G2frame.dataFrame.setSizePosLeft([size[0]+32,350])
    36023595    G2frame.dataFrame.setSizePosLeft([550,350])
    36033596    G2frame.dataDisplay.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CHANGED, OnPageChanged)
  • trunk/GSASIIstrIO.py

    r2698 r2715  
    22152215            except KeyError:                       
    22162216                #skip if histogram not included e.g. in a sequential refinement
     2217                continue
     2218            if not HistoPhase[histogram]['Use']:        #remove previously created  & now unused phase reflection list
     2219                if phase in Histograms[histogram]['Reflection Lists']:
     2220                    del Histograms[histogram]['Reflection Lists'][phase]
    22172221                continue
    22182222            hapData = HistoPhase[histogram]
     
    26552659                #skip if histogram not included e.g. in a sequential refinement
    26562660                continue
     2661            if not Phases[phase]['Histograms'][histogram]['Use']:
     2662                #skip if phase absent from this histogram
     2663                continue
    26572664            hapData = HistoPhase[histogram]
    26582665            hId = Histogram['hId']
  • trunk/GSASIIstrMath.py

    r2695 r2715  
    401401        pWsum[name] = 0.0
    402402        for hist in Phases[phase]['Histograms']:
     403            if not Phases[phase]['Histograms'][hist]['Use']:
     404                continue
    403405            if hist in Histograms and 'PWDR' in hist:
    404406                hId = Histograms[hist]['hId']
Note: See TracChangeset for help on using the changeset viewer.