Changeset 2694


Ignore:
Timestamp:
Feb 7, 2017 2:50:13 PM (5 years ago)
Author:
vondreele
Message:

after a repeat of a sequential fit, clear away old plot. Removes possibly bad parameter references
make note in G2grid of possible problem of pseudo vars storage in Controls
set new patch value for penetration corr to 0.5; above that convert to new value
fix peak picking problem when pattern has excluded regions
remove RaisePageNoRefresh? from Seq result plotting - irrelevant if plot is deleted

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r2683 r2694  
    40024002            Id = self.PatternTree.AppendItem(self.root,text='Sequential results')
    40034003            self.PatternTree.SetItemPyData(Id,{})           
     4004        self.G2plotNB.Delete('Sequential refinement')    #clear away probably invalid plot
    40044005        Controls = self.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(self,self.root, 'Controls'))
    40054006        if not Controls.get('Seq Data'):
  • trunk/GSASIIgrid.py

    r2688 r2694  
    29292929              * 'newCellDict' - refined cell parameters after shifts to A0-A5 from Dij terms applied'
    29302930    """
    2931 
     2931    ''' there is an issue here: #TODO move stuff from Controls to the specific SeqData tree entry (e.g. use data instead of Controls)
     2932        make SeqData creation save old pseudoVars, etc. in the various places it is rebuilt
     2933        check validity of pseudoVars, ect. against current variable set
     2934    '''
    29322935    def GetSampleParms():
    29332936        '''Make a dictionary of the sample parameters are not the same over the
  • trunk/GSASIIimage.py

    r2689 r2694  
    525525    data['rings'] = []
    526526    data['ellipses'] = []
    527     if data['DetDepth'] > 0.1:          #patch - redefine DetDepth
     527    if data['DetDepth'] > 0.5:          #patch - redefine DetDepth
    528528        data['DetDepth'] /= data['distance']
    529529    if not data['calibrant']:
     
    752752        data['rings'].append(np.array(Ringm))
    753753        G2plt.PlotImage(G2frame,newImage=True)
    754     if data['DetDepth'] > 0.1:          #patch - redefine DetDepth
     754    if data['DetDepth'] > 0.5:          #patch - redefine DetDepth
    755755        data['DetDepth'] /= data['distance']
    756756    parmDict = {'dist':data['distance'],'det-X':data['center'][0],'det-Y':data['center'][1],
     
    889889    dtth = (lutth[1]-lutth[0])/numChans
    890890    muT = data.get('SampleAbs',[0.0,''])[0]
    891     if data['DetDepth'] > 0.1:          #patch - redefine DetDepth
     891    if data['DetDepth'] > 0.5:          #patch - redefine DetDepth
    892892        data['DetDepth'] /= data['distance']
    893893    if 'SASD' in data['type']:
  • trunk/GSASIIimgGUI.py

    r2692 r2694  
    136136    if 'setdist' not in data:
    137137        data['setdist'] = data['distance']
    138     distSizer.Add(G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'setdist',nDig=(10,2),
     138    distSizer.Add(G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'setdist',nDig=(10,4),
    139139            typeHint=float),0,WACV)
    140140    mainSizer.Add(distSizer,0)
     
    169169    if 'varyList' not in data:
    170170        data['varyList'] = {'dist':True,'det-X':True,'det-Y':True,'tilt':True,'phi':True,'dep':False,'wave':False}
    171     if data['DetDepth'] > 0.1:
     171    if data['DetDepth'] > 0.5:
    172172        data['DetDepth'] /= data['distance']
    173173#end patch
     
    217217                if Id:
    218218                    G2frame.PatternTree.SetItemPyData(Id,SeqResult)
     219                    G2frame.G2plotNB.Delete('Sequential refinement')    #clear away probably invalid plot
    219220                else:
    220221                    Id = G2frame.PatternTree.AppendItem(parent=G2frame.root,text='Sequential image calibration results')
     
    19951996        if Id:
    19961997            G2frame.PatternTree.SetItemPyData(Id,SeqResult)
     1998            G2frame.G2plotNB.Delete('Sequential refinement')    #clear away probably invalid plot
    19971999        else:
    19982000            Id = G2frame.PatternTree.AppendItem(parent=G2frame.root,text='Sequential strain fit results')
  • trunk/GSASIIplot.py

    r2693 r2694  
    17401740            except ValueError:
    17411741                lineNo = -1
     1742            nxcl = len(exclLines)
    17421743            if  lineNo in [0,1] or lineNo in exclLines:
    17431744                LimitId = G2gd.GetPatternTreeItemId(G2frame,G2frame.PatternId, 'Limits')
     
    17571758                if G2frame.PatternTree.GetItemText(G2frame.PickId) == 'Limits':
    17581759                    G2pdG.UpdateLimitsGrid(G2frame,limits,plottype)
    1759             elif lineNo > 1:
     1760            elif lineNo > 1+nxcl:
    17601761                PeakId = G2gd.GetPatternTreeItemId(G2frame,G2frame.PatternId, 'Peak List')
    17611762                peaks = G2frame.PatternTree.GetItemPyData(PeakId)
    17621763                if event.button == 3:
    1763                     del peaks['peaks'][lineNo-2]
     1764                    del peaks['peaks'][lineNo-2-nxcl]
    17641765                else:
    17651766                    if G2frame.plotStyle['qPlot']:
    1766                         peaks['peaks'][lineNo-2][0] = G2lat.Dsp2pos(Parms,2.*np.pi/xpos)
     1767                        peaks['peaks'][lineNo-2-nxcl][0] = G2lat.Dsp2pos(Parms,2.*np.pi/xpos)
    17671768                    elif G2frame.plotStyle['dPlot']:
    1768                         peaks['peaks'][lineNo-2][0] = G2lat.Dsp2pos(Parms,xpos)
     1769                        peaks['peaks'][lineNo-2-nxcl][0] = G2lat.Dsp2pos(Parms,xpos)
    17691770                    else:
    1770                         peaks['peaks'][lineNo-2][0] = xpos
     1771                        peaks['peaks'][lineNo-2-nxcl][0] = xpos
    17711772                    peaks['sigDict'] = {}        #no longer valid
    17721773                G2pdG.UpdatePeakGrid(G2frame,peaks)
     
    41794180        elif event.key == 'l':
    41804181            G2frame.seqLines = not G2frame.seqLines
    4181             wx.CallAfter(Draw)
     4182            Draw()
    41824183           
    41834184    def Draw():
    41844185        global Title,xLabel,yLabel
    4185         G2frame.G2plotNB.RaisePageNoRefresh(Page)
    41864186        G2frame.G2plotNB.status.SetStatusText(  \
    41874187            'press L to toggle lines, S to select X axis, T to change titles (reselect column to show?)',1)
  • trunk/GSASIIpwdGUI.py

    r2692 r2694  
    610610        if Id:
    611611            G2frame.PatternTree.SetItemPyData(Id,SeqResult)
     612            G2frame.G2plotNB.Delete('Sequential refinement')    #clear away probably invalid plot
    612613        else:
    613614            Id = G2frame.PatternTree.AppendItem(parent=G2frame.root,text='Sequential peak fit results')
     
    41074108        if Id:
    41084109            G2frame.PatternTree.SetItemPyData(Id,SeqResult)
     4110            G2frame.G2plotNB.Delete('Sequential refinement')    #clear away probably invalid plot
    41094111        else:
    41104112            Id = G2frame.PatternTree.AppendItem(parent=G2frame.root,text='Sequential SASD results')
     
    54145416                if Id:
    54155417                    G2frame.PatternTree.SetItemPyData(Id,SeqResult)
     5418                    G2frame.G2plotNB.Delete('Sequential refinement')    #clear away probably invalid plot
    54165419                else:
    54175420                    Id = G2frame.PatternTree.AppendItem(parent=G2frame.root,text='Sequential PDF peak fit results')
Note: See TracChangeset for help on using the changeset viewer.