Changeset 4848 for trunk


Ignore:
Timestamp:
Mar 9, 2021 12:43:26 PM (2 years ago)
Author:
vondreele
Message:

implement the show/hide systematic absences in single crystal Reflection List
Add 'P' & 'M' for increment/decrement zone layer olot in 3D hkl plots; no 'N' command. Add these to key box menu

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r4841 r4848  
    362362        sizer.Add(self.canvas,1,wx.EXPAND)
    363363        self.SetSizer(sizer)
     364       
     365    def SetToolTipString(self,text):
     366        if 'phoenix' in wx.version():
     367            self.canvas.SetToolTip(wx.ToolTip(text))
     368        else:
     369            self.canvas.SetToolTipString(text)
     370           
    364371       
    365372class G2Plot3D(_tabPlotWin):
     
    10991106def PlotSngl(G2frame,newPlot=False,Data=None,hklRef=None,Title=''):
    11001107    '''Structure factor plotting package - displays zone of reflections as rings proportional
    1101         to F, F**2, etc. as requested
     1108        to F, F**2, etc. as requested via matpltlib; plots are not geometrically correct
    11021109    '''
    11031110    from matplotlib.patches import Circle
     
    14461453##### Plot3DSngl ################################################################################
    14471454def Plot3DSngl(G2frame,newPlot=False,Data=None,hklRef=None,Title=False):
    1448     '''3D Structure factor plotting package - displays reflections as rings proportional
    1449         to F, F**2, etc. as requested as 3D array
     1455    '''3D Structure factor plotting package - displays reflections as spots proportional
     1456        to F, F**2, etc. as requested as 3D array via pyOpenGl
    14501457    '''
    14511458    global ifBox
     
    15381545        elif key == 'P':
    15391546            vec = viewChoice[Data['viewKey']][0]
     1547            drawingData['viewPoint'][0] += vec
     1548        elif key == 'M':
     1549            vec = viewChoice[Data['viewKey']][0]
    15401550            drawingData['viewPoint'][0] -= vec
    1541         elif key == 'N':
    1542             vec = viewChoice[Data['viewKey']][0]
    1543             drawingData['viewPoint'][0] += vec
    15441551        elif key == '0':
    15451552            drawingData['viewPoint'][0] = np.array([0,0,0])
     
    18481855        Zclip = drawingData['Zclip']*cPos/20.
    18491856        if Data['Zone']:
    1850             Zclip = 0.01
     1857            Zclip = 0.002
    18511858        Q = drawingData['Quaternion']
    18521859        Tx,Ty,Tz = drawingData['viewPoint'][0][:3]
     
    18581865       
    18591866        HKL,RC,RF,RF2 = FillHKLRC()
    1860         G2frame.G2plotNB.status.SetStatusText   \
    1861             ('Plot type = %s for %s; RF = %6.2f%%, RF%s = %6.2f%%'%(Data['Type'],Name,RF,super2,RF2),1)
     1867        if Data['Zone']:
     1868            G2frame.G2plotNB.status.SetStatusText   \
     1869                ('Plot type = %s for %s; RF = %6.2f%%, RF%s = %6.2f%% layer %s'%    \
     1870                (Data['Type'],Name,RF,super2,RF2,str(list(drawingData['viewPoint'][0]))),1)           
     1871        else:
     1872            G2frame.G2plotNB.status.SetStatusText   \
     1873                ('Plot type = %s for %s; RF = %6.2f%%, RF%s = %6.2f%%'%(Data['Type'],Name,RF,super2,RF2),1)
    18621874       
    18631875        SetBackground()
     
    18991911    Page.Choice = None
    19001912    choice = [' save as/key:','jpeg','tiff','bmp','h: view down h','k: view down k','l: view down l',
    1901     'z: zero zone toggle','c: reset to default','o: set view point = 0,0,0','b: toggle box ','+: increase scale','-: decrease scale',
     1913    'z: zero zone toggle','p: increment layer','m: decrement layer','c: reset to default','o: set view point = 0,0,0','b: toggle box ','+: increase scale','-: decrease scale',
    19021914    'f: Fobs','s: Fobs**2','u: unit','d: Fo-Fc','w: DF/sig','i: toggle intensity scaling']
    19031915    cb = wx.ComboBox(G2frame.G2plotNB.status,style=wx.CB_DROPDOWN|wx.CB_READONLY,choices=choice,
  • trunk/GSASIIpwdGUI.py

    r4847 r4848  
    47454745    Controls = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.root, 'Controls'))
    47464746    dMin = 0.05
     4747    if not isinstance(G2frame.Hide, bool):
     4748        G2frame.Hide = False
    47474749    if 'UsrReject' in Controls:
    47484750        dMin = Controls['UsrReject'].get('MinD',0.05)
     
    48534855        rowLabels = []
    48544856        if HKLF:
    4855             refList = data[1]['RefList']
     4857            if G2frame.Hide:
     4858                refList = np.array([refl for refl in data[1]['RefList'] if refl[3]])
     4859            else:
     4860                refList = data[1]['RefList']
    48564861            refs = refList
    48574862        else:
     
    49554960            setBackgroundColors(im,itof)
    49564961        if HKLF:
    4957             refList = np.array([refl[:6+im] for refl in data[1]['RefList']])
     4962            if G2frame.Hide:
     4963                refList = np.array([refl[:6+im] for refl in data[1]['RefList'] if refl[3]])
     4964            else:
     4965                refList = np.array([refl[:6+im] for refl in data[1]['RefList']])
    49584966        else:
    49594967            refList = np.array([refl[:6+im] for refl in data[phaseName]['RefList']])
     
    49704978       
    49714979    def OnToggleExt(event):
    4972         print('TBD')
     4980        G2frame.Hide = not G2frame.Hide
     4981        UpdateReflectionGrid(G2frame,data,HKLF=True,Name=Name)
    49734982                 
    49744983    def OnPageChanged(event):
Note: See TracChangeset for help on using the changeset viewer.