Changeset 1414


Ignore:
Timestamp:
Jul 6, 2014 2:39:29 PM (7 years ago)
Author:
toby
Message:

Add use column to sequential fitting; remove unused points from fit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r1411 r1414  
    34223422        wg.Grid.ClearGrid(self)
    34233423       
     3424    def SetCellReadOnly(self,r,c,readonly=True):
     3425        self.SetReadOnly(r,c,isReadOnly=readonly)
     3426       
    34243427    def SetCellStyle(self,r,c,color="white",readonly=True):
    34253428        self.SetCellBackgroundColour(r,c,color)
     
    43784381        else:
    43794382            eqObjList = Controls['SeqParFitEqList']
     4383        UseFlags = G2frame.SeqTable.GetColValues(0)         
    43804384        for obj in eqObjList:
    43814385            expr = obj.expression
     
    43924396            # loop over each datapoint
    43934397            for j,row in enumerate(zip(*colList)):
     4398                if not UseFlags[j]: continue
    43944399                # assemble equations to fit
    43954400                calcobj = G2obj.ExpressionCalcObj(obj)
     
    46904695    #-----------------------------------------------------------------------------------
    46914696    # build up the data table by columns -----------------------------------------------
    4692     colList = []
    4693     colSigs = []
    4694     colLabels = []
    4695     Types = []
    46964697    nRows = len(histNames)
     4698    colList = [nRows*[True]]
     4699    colSigs = [None]
     4700    colLabels = ['Use']
     4701    Types = [wg.GRID_VALUE_BOOL]
    46974702    # start with Rwp values
    46984703    if 'IMG ' not in histNames[0][:4]:
     
    48554860    G2frame.dataDisplay = GSGrid(parent=G2frame.dataFrame)
    48564861    G2frame.SeqTable = Table(
    4857         [c for c in zip(*colList)],     # convert from columns to rows
     4862        [list(c) for c in zip(*colList)],     # convert from columns to rows
    48584863        colLabels=colLabels,rowLabels=histNames,types=Types)
    48594864    G2frame.dataDisplay.SetTable(G2frame.SeqTable, True)
    4860     G2frame.dataDisplay.EnableEditing(False)
     4865    #G2frame.dataDisplay.EnableEditing(False)
     4866    # make all but first column read-only
     4867    for c in range(1,len(colLabels)):
     4868        for r in range(nRows):
     4869            G2frame.dataDisplay.SetCellReadOnly(r,c)
    48614870    G2frame.dataDisplay.Bind(wg.EVT_GRID_LABEL_LEFT_DCLICK, PlotSelect)
    48624871    G2frame.dataDisplay.Bind(wg.EVT_GRID_LABEL_RIGHT_CLICK, SetLabelString)
Note: See TracChangeset for help on using the changeset viewer.