Changeset 3248


Ignore:
Timestamp:
Jan 29, 2018 4:13:35 PM (5 years ago)
Author:
vondreele
Message:

fix powder peaks input/display/indexing
fix issue with hkl display on indexed powder patterns

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r3246 r3248  
    74337433            G2plt.PlotImage(G2frame,newPlot=True)
    74347434        elif G2frame.GPXtree.GetItemText(item).startswith('PKS '):
     7435            G2frame.PatternId = item
    74357436            G2plt.PlotPowderLines(G2frame)
    74367437        elif G2frame.GPXtree.GetItemText(item).startswith('PWDR '):
  • trunk/GSASIIplot.py

    r3247 r3248  
    13171317    global DifLine # BHT: probably does not need to be global
    13181318    global Ymax
    1319     global Pattern,mcolors
     1319    global Pattern,mcolors,Plot
    13201320    plottype = plotType
    13211321   
     
    15351535                            indx = -2
    15361536                        if len(G2frame.HKL):
    1537                             view = Page.toolbar._views.forward()[0][:2]
    1538                             wid = view[1]-view[0]
     1537                            limx = Plot.get_xlim()
     1538                            wid = limx[1]-limx[0]
    15391539                            found = G2frame.HKL[np.where(np.fabs(G2frame.HKL.T[indx]-xpos) < 0.002*wid)]
    15401540                        if len(found):
     
    28982898    '''plot of CW or TOF peak calibration
    28992899    '''
     2900   
     2901    global Plot
    29002902    def OnMotion(event):
    29012903        xpos = event.xdata
     
    29082910                G2frame.G2plotNB.status.SetStatusText('Select '+Title+' pattern first',1)
    29092911            found = []
    2910             wid = 1
    2911             view = Page.toolbar._views.forward()
    2912             if view:
    2913                 view = view[0][:2]
    2914                 wid = view[1]-view[0]
     2912            xlim = Plot.get_xlim()
     2913            wid = xlim[1]-xlim[0]
    29152914            found = XY[np.where(np.fabs(XY.T[0]-xpos) < 0.005*wid)]
    29162915            if len(found):
     
    33973396    ''' plotting of powder lines (i.e. no powder pattern) as sticks
    33983397    '''
    3399 
     3398    global Plot
    34003399    def OnMotion(event):
    34013400        xpos = event.xdata
     
    34063405                found = []
    34073406                if len(G2frame.HKL):
    3408                     view = Page.toolbar._views.forward()[0][:2]
    3409                     wid = view[1]-view[0]
     3407                    xlim = Plot.get_xlim()
     3408                    wid = xlim[1]-xlim[0]
    34103409                    found = G2frame.HKL[np.where(np.fabs(G2frame.HKL.T[-1]-xpos) < 0.002*wid)]
    34113410                if len(found):
  • trunk/GSASIIpwdGUI.py

    r3245 r3248  
    29332933        spc = controls[13]
    29342934        SGData = G2spc.SpcGroup(spc)[1]
     2935        Symb = SGData['SpGrp']
    29352936        if ssopt.get('Use',False):
    29362937            SSGData = G2spc.SSpcGroup(SGData,ssopt['ssSymb'])[1]
     2938            Symb = SSGData['SSpGrp']
    29372939            Vec = ssopt['ModVec']
    29382940            maxH = ssopt['maxH']
     
    29512953        G2frame.HKL = np.array(G2frame.HKL)
    29522954        if len(G2frame.HKL):
    2953             print (' new M20,X20: %.2f %d fraction found: %.3f'%(M20,X20,float(len(peaks[0]))/len(G2frame.HKL)))
     2955            print (' new M20,X20: %.2f %d, fraction found: %.3f for %s'  \
     2956                %(M20,X20,float(len(peaks[0]))/len(G2frame.HKL),Symb))
    29542957        G2frame.GPXtree.SetItemPyData(G2gd.GetGPXtreeItemId(G2frame,PatternId, 'Index Peak List'),peaks)
    29552958        if 'PKS' in G2frame.GPXtree.GetItemText(G2frame.PatternId):
Note: See TracChangeset for help on using the changeset viewer.