Changeset 2124


Ignore:
Timestamp:
Jan 14, 2016 4:04:14 PM (6 years ago)
Author:
vondreele
Message:

rename IndexPeaks? to OnIndexPeaks? - event driven
work on findMV

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIindex.py

    r2120 r2124  
    268268                    Vec.append(max(-1.,min(1.0,values[i])))
    269269                else:
    270                     Vec.append(max(0.0,min(2.0,values)))                   
     270                    Vec.append(max(0.0,min(1.0,values)))                   
    271271                i += 1
    272272            else:
     
    306306    Vref = [True if x in ssopt['ssSymb'] else False for x in ['a','b','g']]
    307307    values = []
    308     ranges = []   
     308    ranges = []
     309    dT = 0.02       #seems to be a good choice
    309310    for v,r in zip(ssopt['ModVec'],Vref):
    310311        if r:
    311             ranges += [slice(0.02,0.98,.02),]
     312            ranges += [slice(dT,1.-dT,dT),] #NB: unique part for (00g) & (a0g); (abg)?
    312313            values += [v,]
    313314    dmin = getDmin(peaks)-0.005
    314     Peaks = np.copy(np.array(peaks).T)
    315315    if 'T' in Inst['Type'][0]:   
    316316        result = so.brute(TSSfunc,ranges,finish=so.fmin_cg,full_output=True,
     
    330330    hklmax = [0,0,0]
    331331    for ipk,peak in enumerate(peaks):
     332        peak[4:7] = [0,0,0]                           #clear old indexing
     333        peak[8] = 0.
    332334        if peak[2]:
    333             peak[4:7] = [0,0,0]                           #clear old indexing
    334             peak[8] = 0.
    335335            i = bisect.bisect_right(hklds,peak[7])          # find peak position in hkl list
    336336            dm = peak[-2]-hklds[i-1]                         # peak to neighbor hkls in list
     
    379379    hklmax = [0,0,0,0]
    380380    for ipk,peak in enumerate(Peaks):
     381        peak[4:8] = [0,0,0,0]                           #clear old indexing
     382        peak[9] = 0.
    381383        if peak[2]: #Use
    382             peak[4:8] = [0,0,0,0]                           #clear old indexing
    383             peak[9] = 0.
    384384            i = bisect.bisect_right(hklds,peak[8])          # find peak position in hkl list
    385385            dm = peak[8]-hklds[i-1]                         # peak to neighbor hkls in list
     
    974974                                if not GoOn:
    975975                                    break
    976                                 if M20 > 1.0:
     976                                if 1.e6 > M20 > 1.0:    #exclude nonsense
    977977                                    bestM20 = max(bestM20,M20)
    978978                                    A = halfCell(ibrav,A[:],peaks)
  • trunk/GSASIIpwdGUI.py

    r2120 r2124  
    22912291                    elif key == 78:  #'N'
    22922292                        for row in range(G2frame.IndexPeaksTable.GetNumberRows()): data[0][row][col]=False
     2293                    elif key == 83: # 'S'
     2294                        for row in range(G2frame.IndexPeaksTable.GetNumberRows()): data[0][row][col] = not data[0][row][col]
     2295                       
    22932296           
    22942297    if G2frame.dataDisplay:
     
    27522755        wx.CallAfter(UpdateUnitCellsGrid,G2frame,data)
    27532756       
    2754     def IndexPeaks(event):
     2757    def OnIndexPeaks(event):
    27552758        PatternId = G2frame.PatternId   
    27562759        print 'Peak Indexing'
     
    28692872    if not G2frame.dataFrame.GetStatusBar():
    28702873        Status = G2frame.dataFrame.CreateStatusBar()
    2871     G2frame.Bind(wx.EVT_MENU, IndexPeaks, id=G2gd.wxID_INDEXPEAKS)
     2874    G2frame.Bind(wx.EVT_MENU, OnIndexPeaks, id=G2gd.wxID_INDEXPEAKS)
    28722875    G2frame.Bind(wx.EVT_MENU, CopyUnitCell, id=G2gd.wxID_COPYCELL)
    28732876    G2frame.Bind(wx.EVT_MENU, RefineCell, id=G2gd.wxID_REFINECELL)
Note: See TracChangeset for help on using the changeset viewer.