Changeset 3362 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Apr 27, 2018 4:23:53 PM (5 years ago)
Author:
vondreele
Message:

fix azimuth offset problems with linescan
add sqrt & log (scanline) options

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r3361 r3362  
    57555755            elif event.key in ['y',]:
    57565756                Data['invert_y'] = not Data['invert_y']
     5757            elif event.key in ['s',] and Data['linescan'][0]:
     5758                G2frame.logPlot = False
     5759                G2frame.plotStyle['sqrtPlot'] = not G2frame.plotStyle['sqrtPlot']
     5760            elif event.key in ['n',] and Data['linescan'][0]:
     5761                G2frame.plotStyle['sqrtPlot'] = False
     5762                G2frame.logPlot = not G2frame.logPlot
    57575763            else:
    57585764                return
     
    58355841                xy = G2img.GetLineScan(G2frame.ImageZ,Data)
    58365842                Plot1.cla()
     5843                if G2frame.logPlot:
     5844                    xy[1] = np.log(xy[1])
     5845                elif G2frame.plotStyle['sqrtPlot']:
     5846                    xy[1] = np.sqrt(xy[1])
    58375847                Plot1.plot(xy[0],xy[1])
    58385848                Plot1.set_xlim(Data['IOtth'])
     
    62776287        Plot1.set_ylabel('Intensity',fontsize=12)
    62786288        xy = G2img.GetLineScan(G2frame.ImageZ,Data)
     6289        if G2frame.logPlot:
     6290            xy[1] = np.log(xy[1])
     6291            Plot1.set_ylabel('log(Intensity)',fontsize=12)
     6292        elif G2frame.plotStyle['sqrtPlot']:
     6293            Plot1.set_ylabel(r'$\sqrt{Intensity}$',fontsize=12)
     6294            xy[1] = np.sqrt(xy[1])
    62796295        Plot1.plot(xy[0],xy[1])
    62806296        Plot1.set_xlim(Data['IOtth'])
     
    62976313    try:
    62986314        if G2frame.GPXtree.GetItemText(G2frame.PickId) in ['Image Controls',]:
    6299             Page.Choice = (' key press','c: set beam center','d: set dmin','x: flip x','y: flip y',)
    6300 #            if G2frame.logPlot:
    6301 #                Page.Choice[1] = 'l: log(I) off'
     6315            Page.Choice = [' key press','c: set beam center','d: set dmin','x: flip x','y: flip y',]
     6316            if Data.get('linescan',[False,0.])[0]:
     6317                Page.Choice += ['s: toggle sqrt plot line scan','n: toggle log plot line scan']
    63026318            Page.keyPress = OnImPlotKeyPress
    63036319        elif G2frame.GPXtree.GetItemText(G2frame.PickId) in ['Masks',]:
     
    63906406                Plot.plot([arcxI[ind],arcxO[ind]],[arcyI[ind],arcyO[ind]],color='k',dashes=(5,5))
    63916407        if 'linescan' in Data and Data['linescan'][0]:
    6392             azm = Data['linescan'][1]
     6408            azm = Data['linescan'][1]-Data['azmthOff']
    63936409            IOtth = [0.1,60.]
    63946410            wave = Data['wavelength']
Note: See TracChangeset for help on using the changeset viewer.