Changeset 4010


Ignore:
Timestamp:
May 31, 2019 4:20:54 PM (3 years ago)
Author:
toby
Message:

add hidden diagnostic plot option (.) to show Y*W

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r4008 r4010  
    18411841        elif event.key == 'e' and plottype in ['SASD','REFD']:
    18421842            G2frame.ErrorBars = not G2frame.ErrorBars
     1843        elif event.key == '.':
     1844            Page.plotStyle['WgtDiagnostic'] = not Page.plotStyle.get('WgtDiagnostic',False)
     1845            newPlot = True
    18431846        elif event.key == 'b':
    18441847            G2frame.SubBack = not G2frame.SubBack
     
    29452948        Title = r'$\sqrt{I}$ for '+Title
    29462949        Ymax = np.sqrt(Ymax)
     2950    elif Page.plotStyle.get('WgtDiagnostic',False):
     2951        Title = 'Scaling diagnostic for '+Title
    29472952    if Page.plotStyle['qPlot'] or plottype in ['SASD','REFD'] and not G2frame.Contour:
    29482953        xLabel = r'$Q, \AA^{-1}$'
     
    29742979            if Page.plotStyle['sqrtPlot']:
    29752980                Plot.set_ylabel(r'$\sqrt{Intensity}$',fontsize=16)
     2981            elif Page.plotStyle.get('WgtDiagnostic',False):
     2982                Plot.set_ylabel('Intensity * Weight')
    29762983            else:
    29772984                Plot.set_ylabel(r'$Intensity$',fontsize=16)
     
    30843091                Y = np.where(xye[1]>=0.,np.sqrt(xye[1]),-np.sqrt(-xye[1]))+NoffY*Ymax/100.0
    30853092                np.seterr(invalid=olderr['invalid'])
     3093            elif Page.plotStyle.get('WgtDiagnostic',False):
     3094                Y = xye[1]*xye[2]
    30863095            elif 'PWDR' in plottype and G2frame.SinglePlot and not (
    30873096                Page.plotStyle['logPlot'] or Page.plotStyle['sqrtPlot'] or G2frame.Contour):
     
    31583167                        np.seterr(invalid=olderr['invalid'])
    31593168                        D = np.where(xye[5],(Y-Z),0.)-Page.plotStyle['delOffset']
    3160                     elif 'PWDR' in plottype and G2frame.SinglePlot and not (
     3169                    elif Page.plotStyle.get('WgtDiagnostic',False):
     3170                        Z = D = W = np.zeros_like(Y)
     3171                    elif G2frame.SinglePlot and not (
    31613172                        Page.plotStyle['logPlot'] or Page.plotStyle['sqrtPlot'] or G2frame.Contour):
    31623173                        W = xye[4]*multArray+NoffY*Ymax/100.0
     
    33223333                else:
    33233334                    Plot.axvline(hkl[-2],color=clr,dashes=(5,5))
    3324         elif G2frame.GPXtree.GetItemText(PickId) in ['Reflection Lists'] or \
    3325             'PWDR' in G2frame.GPXtree.GetItemText(PickId) or refineMode:
     3335        elif Page.plotStyle.get('WgtDiagnostic',False):
     3336            pass # skip reflection markers
     3337        elif (G2frame.GPXtree.GetItemText(PickId) in ['Reflection Lists'] or
     3338            'PWDR' in G2frame.GPXtree.GetItemText(PickId) or refineMode):
    33263339            Phases = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,PatternId,'Reflection Lists'))
    33273340            l = GSASIIpath.GetConfigValue('Tick_length',8.0)
Note: See TracChangeset for help on using the changeset viewer.