Changeset 2195


Ignore:
Timestamp:
Apr 3, 2016 2:30:21 PM (6 years ago)
Author:
vondreele
Message:

remove selected area image multiplier - not necessary
fix image scaling issues for selected area simulations
fix issues with absent pydiffaxlib & DIFFaX.exe on some platforms

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r2191 r2195  
    506506        self.lmax = '2'
    507507        self.lmaxChoice = [str(i+1) for i in range(6)]
    508         self.mult = '1'
    509         self.multChoice = [str(2**i) for i in range(10)]
    510508        self.Parms = parms
    511509        self.Parm = None
     
    527525        def OnMaxL(event):
    528526            self.lmax = lmax.GetValue()
    529            
    530         def OnMult(event):
    531             self.mult = mult.GetValue()
    532527           
    533528        def OnParmSel(event):
     
    592587            planeSizer.Add(lmax,0,WACV)           
    593588            mainSizer.Add(planeSizer)
    594             multSizer = wx.BoxSizer(wx.HORIZONTAL)
    595             multSizer.Add(wx.StaticText(self.panel,label=' Image scale: '),0,WACV)
    596             mult = wx.ComboBox(self.panel,value=self.mult,choices=self.multChoice,
    597                 style=wx.CB_READONLY|wx.CB_DROPDOWN)
    598             mult.Bind(wx.EVT_COMBOBOX,OnMult)
    599             multSizer.Add(mult,0,WACV)
    600             mainSizer.Add(multSizer)
    601589        OkBtn = wx.Button(self.panel,-1,"Ok")
    602590        OkBtn.Bind(wx.EVT_BUTTON, self.OnOk)
     
    617605    def GetSelection(self):
    618606        if 'powder' in self.calcType:
    619             return '0\n0\n3\n','','','',self.Parm,self.parmRange,self.parmStep
     607            return '0\n0\n3\n','','',self.Parm,self.parmRange,self.parmStep
    620608        elif 'selected' in self.calcType:
    621             return '0\n0\n4\n1\n%d\n%d\n16\n1\n%d\n0\nend\n'%    \
    622                 (self.planeChoice.index(self.plane)+1,self.lmaxChoice.index(self.lmax)+1,   \
    623                 self.multChoice.index(self.mult)+1),self.plane,self.lmax,self.mult,       \
    624                 self.Parm,self.parmRange,self.parmStep
     609            return '0\n0\n4\n1\n%d\n1\n16\n1\n%d\n0\nend\n'%    \
     610                (self.planeChoice.index(self.plane)+1,self.lmaxChoice.index(self.lmax)+1),   \
     611                self.plane,self.lmax,self.Parm,self.parmRange,self.parmStep
    625612
    626613    def OnOk(self,event):
  • trunk/GSASIIphsGUI.py

    r2191 r2195  
    24312431            lmax = float(Layers['Sadp']['Lmax'])
    24322432            XY = 2*lmax*np.mgrid[0:256:256j,0:256:256j]/256.-lmax
     2433            G2frame.Cmax = 1.0
    24332434            G2plt.PlotXYZ(G2frame,XY,Layers['Sadp']['Img'].T,labelX=labels[:-1],
    24342435                labelY=labels[-1],newPlot=False,Title=Layers['Sadp']['Plane'])
     
    29252926        dlg = G2gd.DIFFaXcontrols(G2frame,ctrls)
    29262927        if dlg.ShowModal() == wx.ID_OK:
    2927             ctrls,plane,lmax,mult,x,x,x = dlg.GetSelection()
     2928            ctrls,plane,lmax,x,x,x = dlg.GetSelection()
    29282929            data['Layers']['Sadp'] = {}
    29292930            data['Layers']['Sadp']['Plane'] = plane
    29302931            data['Layers']['Sadp']['Lmax'] = lmax
    2931             data['Layers']['Sadp']['Mult'] = mult
    29322932        else:
    29332933            return
     
    29812981            data['Layers']['Sadp']['Plane'] = plane
    29822982            data['Layers']['Sadp']['Lmax'] = lmax
    2983             data['Layers']['Sadp']['Mult'] = mult
    29842983            data['Layers']['Multi'] = [parm,parmRange,parmStep]
    29852984        else:
  • trunk/GSASIIpwd.py

    r2194 r2195  
    4040    import pydiffax as pyx
    4141except ImportError:
    42     print 'the pydiffax library could not be loaded'
     42    print 'pydiffax is not available for this platform - under develpment'
    4343
    4444   
     
    19161916    df.close()   
    19171917    time0 = time.time()
    1918     subp.call(DIFFaX)
     1918    try:
     1919        subp.call(DIFFaX)
     1920    except OSError:
     1921        print 'DIFFax.exe is not available for this platform - under development'
    19191922    print 'DIFFaX time = %.2fs'%(time.time()-time0)
    19201923    if os.path.exists('GSASII-DIFFaX.spc'):
     
    19791982    planeId = ['h0l','0kl','hhl','h-hl'].index(Layers['Sadp']['Plane'])+1
    19801983    lmax = int(Layers['Sadp']['Lmax'])
    1981     mult = int(Layers['Sadp']['Mult'])
     1984    mult = 1
    19821985# Sequences
    19831986    StkType = ['recursive','explicit'].index(Layers['Stacking'][0])
     
    20462049    hkLim,Incr,Nblk = pyx.pygetsadp(controls,Nspec,spec)
    20472050    Sapd = np.zeros((256,256))
    2048     maxInt = np.max(spec[1:])
    2049     Scale = mult*32767./maxInt
    20502051    iB = 0
    20512052    for i in range(hkLim):
     
    20642065            Sapd[:,p2] = spec[iB:iF]
    20652066        iB += Nblk
    2066     Sapd *= Scale
    2067     Sapd = np.where(Sapd<32767.,Sapd,32767.)
    20682067    Layers['Sadp']['Img'] = Sapd
    20692068    print 'GETSAD time = %.2fs'%(time.time()-time0)
Note: See TracChangeset for help on using the changeset viewer.