Changeset 4100


Ignore:
Timestamp:
Aug 19, 2019 12:29:20 PM (2 years ago)
Author:
toby
Message:

seq. ref bugs: correct use flag in avg calc; if selected X var is no longer in table

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r4095 r4100  
    62696269        'average the selected columns from menu command'
    62706270        cols = sorted(G2frame.dataDisplay.GetSelectedCols()) # ignore selection order
    6271         useCol =  ~np.array(G2frame.SeqTable.GetColValues(0),dtype=bool)
     6271        useCol =  ~np.array(G2frame.SeqTable.GetColValues(1),dtype=bool)
    62726272        if cols:
    62736273            for col in cols:
  • trunk/GSASIIplot.py

    r4096 r4100  
    64616461        colors=['b','g','r','c','m','k']
    64626462        uselist = G2frame.SeqTable.GetColValues(1)
    6463         if G2frame.seqXaxis is not None:   
    6464             xName,X,Xsig = Page.seqTableGet(G2frame.seqXaxis)
    6465             if G2frame.seqReverse and not G2frame.seqXaxis:
    6466                 X = X[::-1]
    6467         else:
    6468             X = np.arange(0,G2frame.SeqTable.GetNumberRows(),1)
    6469             xName = 'Data sequence number'
     6463        X = np.arange(0,G2frame.SeqTable.GetNumberRows(),1)
     6464        xName = 'Data sequence number'
     6465        if G2frame.seqXaxis is not None:
     6466            try: # fails if selected X column is no longer in table
     6467                xName,X,Xsig = Page.seqTableGet(G2frame.seqXaxis)
     6468                if G2frame.seqReverse and not G2frame.seqXaxis:
     6469                    X = X[::-1]
     6470            except:
     6471                print('X column no longer in table, resetting')
     6472                G2frame.seqXaxis = None
    64706473        for ic,col in enumerate(Page.seqYaxisList):
    64716474            Ncol = colors[ic%6]
Note: See TracChangeset for help on using the changeset viewer.