Changeset 751


Ignore:
Timestamp:
Sep 6, 2012 10:40:15 AM (10 years ago)
Author:
vondreele
Message:

peak search limit now 1000 peaks
allow modification of view point in draw options window
add view direction (incomplete) - should be editable as well

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r750 r751  
    930930                dzeros.append(dzero)
    931931            GoOn = Pgbar.Update(len(peaks),newmsg='%s%d'%('No. Peaks found =',len(peaks)))[0]
    932             if not GoOn or len(peaks) > 500:
     932            if not GoOn or len(peaks) > 1000:
    933933                break
    934934        rho[rMM[0]:rMP[0],rMM[1]:rMP[1],rMM[2]:rMP[2]] = peakFunc(x1,rX,rY,rZ,rhoPeak,res,SGData['SGLaue'])
  • trunk/GSASIIphsGUI.py

    r750 r751  
    15641564            'vdwScale':0.67,'ellipseProb':50,'sizeH':0.50,'unitCellBox':False,
    15651565            'showABC':True,'selectedAtoms':[],'Atoms':[],'Rotation':[0.0,0.0,0.0,[]],
    1566             'bondList':{},}
     1566            'bondList':{},'viewDir':[0,0,1]}
    15671567        try:
    15681568            drawingData = data['Drawing']
     
    15741574        if 'contourLevel' not in drawingData:
    15751575            drawingData['contourLevel'] = 1.
     1576        if 'viewDir' not in drawingData:
     1577            drawingData['viewDir'] = [0,0,1]
    15761578        cx,ct,cs,ci = [0,0,0,0]
    15771579        if generalData['Type'] == 'nuclear':
     
    25442546                G2plt.PlotStructure(G2frame,data)
    25452547               
     2548            def OnViewPoint(event):
     2549                Obj = event.GetEventObject()
     2550                viewPt = Obj.GetValue().split()
     2551                try:
     2552                    VP = [float(viewPt[i]) for i in range(3)]
     2553                except (ValueError,IndexError):
     2554                    VP = drawingData['viewPoint'][0]
     2555                Obj.SetValue('%.3f %.3f %.3f'%(VP[0],VP[1],VP[2]))
     2556                drawingData['viewPoint'][0] = VP
     2557                G2plt.PlotStructure(G2frame,data)
     2558               
     2559               
    25462560            showSizer = wx.BoxSizer(wx.VERTICAL)           
    25472561            lineSizer = wx.BoxSizer(wx.HORIZONTAL)
     
    25502564            backColor.Bind(wcs.EVT_COLOURSELECT, OnBackColor)
    25512565            lineSizer.Add(backColor,0,wx.ALIGN_CENTER_VERTICAL)
    2552            
     2566            lineSizer.Add(wx.StaticText(dataDisplay,-1,' View Dir.:'),0,wx.ALIGN_CENTER_VERTICAL)
     2567            VD = drawingData['viewDir']
     2568            viewDir = wx.TextCtrl(dataDisplay,value='%.3f %.3f %.3f'%(VD[0],VD[1],VD[2]),
     2569                style=wx.TE_READONLY,size=wx.Size(140,20),name='viewDir')
     2570            viewDir.SetBackgroundColour(VERY_LIGHT_GREY)
     2571            lineSizer.Add(viewDir,0,wx.ALIGN_CENTER_VERTICAL)
     2572            showSizer.Add(lineSizer)
     2573            showSizer.Add((0,5),0)
     2574           
     2575            lineSizer = wx.BoxSizer(wx.HORIZONTAL)
     2576            showABC = wx.CheckBox(dataDisplay,-1,label=' Show view point?')
     2577            showABC.Bind(wx.EVT_CHECKBOX, OnShowABC)
     2578            showABC.SetValue(drawingData['showABC'])
     2579            lineSizer.Add(showABC,0,wx.ALIGN_CENTER_VERTICAL)
    25532580            lineSizer.Add(wx.StaticText(dataDisplay,-1,' View Point:'),0,wx.ALIGN_CENTER_VERTICAL)
    25542581            VP = drawingData['viewPoint'][0]
    2555             viewPoint = wx.TextCtrl(dataDisplay,value='%.3f, %.3f, %.3f'%(VP[0],VP[1],VP[2]),
    2556                 style=wx.TE_READONLY,size=wx.Size(140,20),name='viewPoint')
    2557             viewPoint.SetBackgroundColour(VERY_LIGHT_GREY)
     2582            viewPoint = wx.TextCtrl(dataDisplay,value='%.3f %.3f %.3f'%(VP[0],VP[1],VP[2]),
     2583                style=wx.TE_PROCESS_ENTER,size=wx.Size(140,20),name='viewPoint')
     2584            viewPoint.Bind(wx.EVT_TEXT_ENTER,OnViewPoint)
     2585            viewPoint.Bind(wx.EVT_KILL_FOCUS,OnViewPoint)
    25582586            lineSizer.Add(viewPoint,0,wx.ALIGN_CENTER_VERTICAL)
    25592587            showSizer.Add(lineSizer)
     
    25612589           
    25622590            line2Sizer = wx.BoxSizer(wx.HORIZONTAL)
    2563             showABC = wx.CheckBox(dataDisplay,-1,label=' Show view point?')
    2564             showABC.Bind(wx.EVT_CHECKBOX, OnShowABC)
    2565             showABC.SetValue(drawingData['showABC'])
    2566             line2Sizer.Add(showABC,0,wx.ALIGN_CENTER_VERTICAL)
    25672591   
    25682592            unitCellBox = wx.CheckBox(dataDisplay,-1,label=' Show unit cell?')
     
    41424166        mapData = generalData['Map']
    41434167        if len(mapData['rho']):
    4144             pgbar = wx.ProgressDialog('Map search','No. Peaks found =',501.0,
     4168            pgbar = wx.ProgressDialog('Map search','No. Peaks found =',1001.0,
    41454169                style = wx.PD_ELAPSED_TIME|wx.PD_AUTO_HIDE|wx.PD_CAN_ABORT)
    41464170            screenSize = wx.ClientDisplayRect()
Note: See TracChangeset for help on using the changeset viewer.