Changeset 2127 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Jan 20, 2016 9:21:45 AM (7 years ago)
Author:
vondreele
Message:

Add Merge dialog (not working yet)
Fix L & G+L peak width plots per Wenqian Xu's comments
Make '+' powder plot command a toggle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r2120 r2127  
    11451145            newPlot = True
    11461146        elif event.key in ['+','=']:
    1147             if G2frame.PickId:
    1148                 G2frame.PickId = False
     1147            G2frame.plusPlot = not G2frame.plusPlot
    11491148        elif event.key == 'i' and G2frame.Contour:                  #for smoothing contour plot
    11501149            choice = ['nearest','bilinear','bicubic','spline16','spline36','hanning',
     
    15271526                    Page.Choice = (' key press','n: log(I) off',
    15281527                        'c: contour on','q: toggle q plot','t: toggle d-spacing plot',
    1529                             'm: toggle multidata plot','w: toggle divide by sig','+: no selection')
     1528                            'm: toggle multidata plot','w: toggle divide by sig','+: toggle selection')
    15301529                else:
    15311530                    Page.Choice = (' key press','n: log(I) off',
    15321531                        'd: offset down','l: offset left','r: offset right','u: offset up','o: reset offset',
    15331532                        'c: contour on','q: toggle q plot','t: toggle d-spacing plot',
    1534                         'm: toggle multidata plot','w: toggle divide by sig','+: no selection')
     1533                        'm: toggle multidata plot','w: toggle divide by sig','+: toggle selection')
    15351534            elif 'SASD' in plottype:
    15361535                if G2frame.SinglePlot:
    15371536                    Page.Choice = (' key press','b: toggle subtract background file','n: semilog on',
    1538                         'q: toggle S(q) plot','m: toggle multidata plot','w: toggle (Io-Ic)/sig plot','+: no selection')
     1537                        'q: toggle S(q) plot','m: toggle multidata plot','w: toggle (Io-Ic)/sig plot','+: toggle selection')
    15391538                else:
    15401539                    Page.Choice = (' key press','b: toggle subtract background file','n: semilog on',
    15411540                        'd: offset down','l: offset left','r: offset right','u: offset up','o: reset offset',
    1542                         'q: toggle S(q) plot','m: toggle multidata plot','w: toggle (Io-Ic)/sig plot','+: no selection')
     1541                        'q: toggle S(q) plot','m: toggle multidata plot','w: toggle (Io-Ic)/sig plot','+: toggle selection')
    15431542        else:
    15441543            if 'PWDR' in plottype:
     
    17141713                Plot.set_ylabel('Data sequence',fontsize=12)
    17151714        else:
     1715            if G2frame.plusPlot:
     1716                pP = '+'
     1717            else:
     1718                pP = ''
    17161719            if 'SASD' in plottype and G2frame.logPlot:
    17171720                X *= (1.01)**(offsetX*N)
     
    17571760                    if 'PWDR' in plottype:
    17581761                        Plot.set_yscale("log",nonposy='mask')
    1759                         Plot.plot(X,Y,colors[N%6]+'+',picker=3.,clip_on=False)
     1762                        Plot.plot(X,Y,colors[N%6]+pP,picker=3.,clip_on=False)
    17601763                        Plot.plot(X,Z,colors[(N+1)%6],picker=False)
    17611764                        Plot.plot(X,W,colors[(N+2)%6],picker=False)     #background
     
    17801783                                        ecolor=colors[N%6],picker=3.,clip_on=False)
    17811784                            else:
    1782                                 Plot.plot(X,YB,colors[N%6]+'+',picker=3.,clip_on=False)
     1785                                Plot.plot(X,YB,colors[N%6]+pP,picker=3.,clip_on=False)
    17831786                            Plot.plot(X,W,colors[(N+2)%6],picker=False)     #const. background
    17841787                            Plot.plot(X,ZB,colors[(N+1)%6],picker=False)
     
    17881791                    DZ = xye[3]*np.sqrt(xye[2])
    17891792                    DS = xye[5]*np.sqrt(xye[2])-Ymax*Pattern[0]['delOffset']
    1790                     ObsLine = Plot.plot(X,DY,colors[N%6]+'+',picker=3.,clip_on=False)         #Io/sig(Io)
     1793                    ObsLine = Plot.plot(X,DY,colors[N%6]+pP,picker=3.,clip_on=False)         #Io/sig(Io)
    17911794                    Plot.plot(X,DZ,colors[(N+1)%6],picker=False)                    #Ic/sig(Io)
    17921795                    DifLine = Plot.plot(X,DS,colors[(N+3)%6],picker=1.)                    #(Io-Ic)/sig(Io)
     
    17951798                    if G2frame.SubBack:
    17961799                        if 'PWDR' in plottype:
    1797                             Plot.plot(Xum,Y-W,colors[N%6]+'+',picker=False,clip_on=False)  #Io-Ib
     1800                            Plot.plot(Xum,Y-W,colors[N%6]+pP,picker=False,clip_on=False)  #Io-Ib
    17981801                            Plot.plot(X,Z-W,colors[(N+1)%6],picker=False)               #Ic-Ib
    17991802                        else:
    1800                             Plot.plot(X,YB,colors[N%6]+'+',picker=3.,clip_on=False)
     1803                            Plot.plot(X,YB,colors[N%6]+pP,picker=3.,clip_on=False)
    18011804                            Plot.plot(X,ZB,colors[(N+1)%6],picker=False)
    18021805                    else:
    18031806                        if 'PWDR' in plottype:
    1804                             ObsLine = Plot.plot(Xum,Y,colors[N%6]+'+',picker=3.,clip_on=False)    #Io
     1807                            ObsLine = Plot.plot(Xum,Y,colors[N%6]+pP,picker=3.,clip_on=False)    #Io
    18051808                            Plot.plot(X,Z,colors[(N+1)%6],picker=False)                 #Ic
    18061809                        else:
    1807                             Plot.plot(X,YB,colors[N%6]+'+',picker=3.,clip_on=False)
     1810                            Plot.plot(X,YB,colors[N%6]+pP,picker=3.,clip_on=False)
    18081811                            Plot.plot(X,ZB,colors[(N+1)%6],picker=False)
    18091812                    if 'PWDR' in plottype:
     
    26612664            data = G2mth.setPeakparms(Parms,Parms2,X,Z)
    26622665            s = 1.17741*np.sqrt(data[4])*np.pi/18000.
    2663             g = data[6]*np.pi/18000.
     2666            g = data[6]*np.pi/36000.
    26642667            G = G2pwd.getgamFW(g,s)
    26652668            Y = s/nptand(X/2.)
     
    26722675            fit = G2mth.setPeakparms(Parms,Parms2,X,Z,useFit=True)
    26732676            sf = 1.17741*np.sqrt(fit[4])*np.pi/18000.
    2674             gf = fit[6]*np.pi/18000.
     2677            gf = fit[6]*np.pi/36000.
    26752678            Gf = G2pwd.getgamFW(gf,sf)
    26762679            Yf = sf/nptand(X/2.)
     
    26922695                except ValueError:
    26932696                    s = 0.01
    2694                 g = peak[6]*math.pi/18000.
     2697                g = peak[6]*math.pi/36000.
    26952698                G = G2pwd.getgamFW(g,s)
    26962699                Y.append(s/tand(peak[0]/2.))
Note: See TracChangeset for help on using the changeset viewer.