Changeset 3231 for trunk/GSASIIphsGUI.py


Ignore:
Timestamp:
Jan 18, 2018 11:08:54 AM (4 years ago)
Author:
vondreele
Message:

fix bug in IndexPeaks? display
fix import pypowder issue in G2math
fix ssSpaceGroup call in G2obj
add a dmax to Pawley controls; eliminate reflections with d>dmax (useful for TOF)
change reflist to be sorted as found in tree; used for Fourier, Charge flip & MCSA controls
add a buttonHandler to PlotXYZ to retrieve cursor position on generic 2D plots
use buttonHandler to get 2D modulation vector from plot & try it for indexing
fix a TOF modulation bug in getPowderProfile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r3222 r3231  
    11431143        if 'Pawley dmin' not in generalData:
    11441144            generalData['Pawley dmin'] = 1.0
     1145        if 'Pawley dmax' not in generalData:
     1146            generalData['Pawley dmax'] = 100.0
    11451147        if 'Pawley neg wt' not in generalData:
    11461148            generalData['Pawley neg wt'] = 0.0
     
    19131915            pawleySizer.Add(pawlRef,0,WACV)
    19141916            pawleySizer.Add(wx.StaticText(General,label=' Pawley dmin: '),0,WACV)
    1915             pawlVal = G2G.ValidatedTxtCtrl(General,generalData,'Pawley dmin',
     1917            pawlMin = G2G.ValidatedTxtCtrl(General,generalData,'Pawley dmin',size=(65,25),
    19161918                min=0.25,max=20.,nDig=(10,5))
    1917             pawleySizer.Add(pawlVal,0,WACV)
     1919            pawleySizer.Add(pawlMin,0,WACV)
     1920            pawleySizer.Add(wx.StaticText(General,label=' Pawley dmax: '),0,WACV)
     1921            pawlMax = G2G.ValidatedTxtCtrl(General,generalData,'Pawley dmax',size=(65,25),
     1922                min=2.0,max=100.,nDig=(10,5))
     1923            pawleySizer.Add(pawlMax,0,WACV)
    19181924            pawleySizer.Add(wx.StaticText(General,label=' Pawley neg. wt.: '),0,WACV)
    1919             pawlNegWt = G2G.ValidatedTxtCtrl(General,generalData,'Pawley neg wt',
     1925            pawlNegWt = G2G.ValidatedTxtCtrl(General,generalData,'Pawley neg wt',size=(65,25),
    19201926                min=0.,max=1.,nDig=(10,4))
    19211927            pawleySizer.Add(pawlNegWt,0,WACV)
     
    19501956                Map['cutOff'] = 100.0
    19511957            mapTypes = ['Fobs','Fcalc','delt-F','2*Fo-Fc','Omit','2Fo-Fc Omit','Patterson']
    1952             refsList = list(data['Histograms'].keys())
     1958            refsList = [item for item in G2gd.GetGPXtreeDataNames(G2frame,['HKLF','PWDR']) if item in data['Histograms'].keys()]
    19531959            if not generalData['AtomTypes']:
    19541960                 mapTypes = ['Patterson',]
     
    20192025                Obj.SetValue('%3d %3d %3d'%(HKL[0],HKL[1],HKL[2]))
    20202026
    2021             refsList = list(data['Histograms'].keys())
     2027            refsList = [item for item in G2gd.GetGPXtreeDataNames(G2frame,['HKLF','PWDR']) if item in data['Histograms'].keys()]
    20222028            flipSizer = wx.BoxSizer(wx.VERTICAL)
    20232029            lineSizer = wx.BoxSizer(wx.HORIZONTAL)
     
    21122118            refList = []
    21132119            if len(data['Pawley ref']):
    2114                 refList = ['Pawley reflections']
    2115             for item in data['Histograms'].keys():
    2116                 if 'HKLF' in item or 'PWDR' in item:
    2117                     refList.append(item)
     2120                refList = ['Pawley reflections',]
     2121            refList += [item for item in G2gd.GetGPXtreeDataNames(G2frame,['HKLF','PWDR']) if item in data['Histograms'].keys()]
    21182122            mcsaSizer = wx.BoxSizer(wx.VERTICAL)
    21192123            lineSizer = wx.BoxSizer(wx.HORIZONTAL)
     
    22012205            mainSizer.Add(ElemSizer())
    22022206        G2G.HorizontalLine(mainSizer,General)
    2203        
     2207#patches       
     2208        if 'Pawley dmax' not in generalData:
     2209            generalData['Pawley dmax'] = 100.0
    22042210        if 'SGFixed' not in generalData['SGData']:
    22052211            generalData['SGData']['SGFixed'] = False
    22062212        if 'SGGray' not in generalData['SGData']:
    22072213            generalData['SGData']['SGGray'] = False
    2208        
     2214#end patches       
    22092215        if generalData['Type'] == 'magnetic':
    22102216            if not generalData['SGData']['SGFixed']:
     
    81728178        SGData = generalData['SGData']
    81738179        dmin = generalData['Pawley dmin']
     8180        dmax = generalData['Pawley dmax']
    81748181        for hist in histograms:
    81758182            if 'PWDR' in hist[:4]:
     
    81928199                HKLd = G2lat.GenSSHLaue(dmin,SGData,SSGData,Vec,maxH,A)
    81938200                for h,k,l,m,d in HKLd:
     8201                    if d > dmax:
     8202                        continue
    81948203                    ext,mul = G2spc.GenHKLf([h,k,l],SGData)[:2]
    81958204                    if m or not ext:
     
    82038212            try:
    82048213                for h,k,l,d in HKLd:
     8214                    if d > dmax:
     8215                        continue
    82058216                    ext,mul = G2spc.GenHKLf([h,k,l],SGData)[:2]
    82068217                    if not ext:
Note: See TracChangeset for help on using the changeset viewer.