Changeset 1834


Ignore:
Timestamp:
May 4, 2015 9:10:23 AM (7 years ago)
Author:
vondreele
Message:

redefine azimuthal angle in Sample Parms as the center of the azimuthal bin; the azimuthat angle in Instrument parms is defined as the mean angle for polarization (only 0-90 & slightly different)
some cosmetic changes to GUI displays
fix imports/G2pwd_fxye.py to handle multi time-maps found in HIPPO data & the slightly screwy one in HIPD data

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIIO.py

    r1831 r1834  
    10371037    LRazm = data['LRazimuth']
    10381038    Azms = []
     1039    dazm = 0.
    10391040    if data['fullIntegrate'] and data['outAzimuths'] == 1:
    10401041        Azms = [45.0,]                              #a poor man's average?
     
    10451046            else:   
    10461047                Azms.append(G2img.meanAzm(azm,azms[i+1]))
     1048        dazm = np.min(np.abs(np.diff(azms)))/2.
    10471049    for i,azm in enumerate(azms[:-1]):
    1048         Aname = name+" Azm= %.2f"%(Azms[i])
     1050        Aname = name+" Azm= %.2f"%((azm+dazm)%360.)
    10491051        item, cookie = G2frame.PatternTree.GetFirstChild(G2frame.root)
    10501052        nOcc = 0
     
    10611063        Sample['Chi'] = data['GonioAngles'][1]
    10621064        Sample['Phi'] = data['GonioAngles'][2]
    1063         Sample['Azimuth'] = Azms[i]     #put here too
     1065        Sample['Azimuth'] = (azm+dazm)%360.    #put here as bin center
    10641066        if 'PWDR' in Aname:
    10651067            parms = ['PXC',data['wavelength'],0.0,0.99,1.0,-0.10,0.4,0.30,1.0,0.0001,Azms[i]]    #set polarization for synchrotron radiation!
  • trunk/GSASIIddataGUI.py

    r1830 r1834  
    145145        scaleRef.SetValue(UseList[G2frame.hist]['Scale'][1])
    146146        scaleRef.Bind(wx.EVT_CHECKBOX, OnScaleRef)
    147         scaleSizer.Add(scaleRef,0,WACV)
     147        scaleSizer.Add(scaleRef,0,WACV|wx.LEFT,5)
    148148        scaleVal = wx.TextCtrl(DData,wx.ID_ANY,
    149149            '%.4f'%(UseList[G2frame.hist]['Scale'][0]),style=wx.TE_PROCESS_ENTER)
     
    470470        Indx[lgmixRef.GetId()] = [G2frame.hist,name]
    471471        lgmixRef.Bind(wx.EVT_CHECKBOX, OnRef)
    472         lgmixSizer.Add(lgmixRef,0,WACV)
     472        lgmixSizer.Add(lgmixRef,0,WACV|wx.LEFT,5)
    473473        lgmixVal = wx.TextCtrl(DData,wx.ID_ANY,
    474474            '%.4f'%(UseList[G2frame.hist][name][1][2]),style=wx.TE_PROCESS_ENTER)
     
    476476        lgmixVal.Bind(wx.EVT_TEXT_ENTER,OnVal)
    477477        lgmixVal.Bind(wx.EVT_KILL_FOCUS,OnVal)
    478         lgmixSizer.Add(lgmixVal,0,WACV)
     478        lgmixSizer.Add(lgmixVal,0,WACV|wx.LEFT,5)
    479479        return lgmixSizer
    480480                   
     
    486486        Indx[reset.GetId()] = [G2frame.hist,name]
    487487        reset.Bind(wx.EVT_CHECKBOX,OnReset)
    488         resetSizer.Add(reset,0,WACV|wx.TOP,5)
     488        resetSizer.Add(reset,0,WACV|wx.TOP|wx.LEFT,5)
    489489        return resetSizer
    490490       
     
    496496        Indx[sizeRef.GetId()] = [G2frame.hist,0]
    497497        sizeRef.Bind(wx.EVT_CHECKBOX, OnRef)
    498         isoSizer.Add(sizeRef,0,WACV)
     498        isoSizer.Add(sizeRef,0,WACV|wx.LEFT,5)
    499499        sizeVal = wx.TextCtrl(DData,wx.ID_ANY,
    500500            fmt%(UseList[G2frame.hist][parm][1][0]),style=wx.TE_PROCESS_ENTER)
     
    583583            Indx[hstrainRef.GetId()] = [G2frame.hist,id]
    584584            hstrainRef.Bind(wx.EVT_CHECKBOX, OnHstrainRef)
    585             hstrainSizer.Add(hstrainRef,0,WACV)
     585            hstrainSizer.Add(hstrainRef,0,WACV|wx.LEFT,5)
    586586            hstrainVal = wx.TextCtrl(DData,wx.ID_ANY,'%.3g'%(val),style=wx.TE_PROCESS_ENTER)
    587587            Indx[hstrainVal.GetId()] = [G2frame.hist,id]
     
    654654            ODFval.Bind(wx.EVT_TEXT_ENTER,OnODFValue)
    655655            ODFval.Bind(wx.EVT_KILL_FOCUS,OnODFValue)
    656             ODFSizer.Add(ODFval,0,WACV)
     656            ODFSizer.Add(ODFval,0,WACV|wx.LEFT,5)
    657657        return ODFSizer
    658658       
     
    702702        extRef.SetValue(UseList[G2frame.hist]['Extinction'][1])
    703703        extRef.Bind(wx.EVT_CHECKBOX, OnExtRef)
    704         extSizer.Add(extRef,0,WACV)
     704        extSizer.Add(extRef,0,WACV|wx.LEFT,5)
    705705        extVal = wx.TextCtrl(DData,wx.ID_ANY,
    706706            '%.2f'%(UseList[G2frame.hist]['Extinction'][0]),style=wx.TE_PROCESS_ENTER)
     
    760760                Indx[Eref.GetId()] = [G2frame.hist,ekey]
    761761                Eref.Bind(wx.EVT_CHECKBOX, OnEref)
    762                 val2Sizer.Add(Eref,0,WACV)
     762                val2Sizer.Add(Eref,0,WACV|wx.LEFT,5)
    763763                Eval = wx.TextCtrl(DData,wx.ID_ANY,
    764764                    '%10.3e'%(UseList[G2frame.hist]['Extinction'][2][ekey][0]),style=wx.TE_PROCESS_ENTER)
     
    778778            Indx[babRef.GetId()] = [G2frame.hist,bab]
    779779            babRef.Bind(wx.EVT_CHECKBOX, OnBabRef)
    780             babSizer.Add(babRef,0,WACV)
     780            babSizer.Add(babRef,0,WACV|wx.LEFT,5)
    781781            babVal = wx.TextCtrl(DData,wx.ID_ANY,
    782782                '%.3f'%(UseList[G2frame.hist]['Babinet']['Bab'+bab][0]),style=wx.TE_PROCESS_ENTER)
     
    821821        useData.Bind(wx.EVT_CHECKBOX, OnUseData)
    822822        useData.SetValue(UseList[G2frame.hist]['Use'])
    823         bottomSizer.Add(showSizer,0,WACV|wx.TOP|wx.BOTTOM,5)
     823        bottomSizer.Add(showSizer,0,WACV|wx.TOP|wx.BOTTOM|wx.LEFT,5)
    824824       
    825825        bottomSizer.Add(ScaleSizer(),0,WACV|wx.BOTTOM,5)
  • trunk/GSASIIimage.py

    r1694 r1834  
    431431    AZM = lambda a,b: npacosd(0.5*(npsind(2.*b)-npsind(2.*a))/(np.pi*(b-a)/180.))/2.
    432432    azm = AZM(a,b)
    433     quad = int((a+b)/180.)
    434     if quad == 1:
    435         azm = 180.-azm
    436     elif quad == 2:
    437         azm += 180.
    438     elif quad == 3:
    439         azm = 360-azm
     433#    quad = int((a+b)/180.)
     434#    if quad == 1:
     435#        azm = 180.-azm
     436#    elif quad == 2:
     437#        azm += 180.
     438#    elif quad == 3:
     439#        azm = 360-azm
    440440    return azm     
    441441       
  • trunk/GSASIIpwdGUI.py

    r1831 r1834  
    117117    parms.append(['Chi','Goniometer chi:',[10,3]])
    118118    parms.append(['Phi','Goniometer phi:',[10,3]])
    119     parms.append(['Azimuth','Detector azimuth',[10,3]])
    120     parms.append(['Time','Clock time (s)',[12,3]])
     119    parms.append(['Azimuth','Detector azimuth:',[10,3]])
     120    parms.append(['Time','Clock time (s):',[12,3]])
    121121    parms.append(['Temperature','Sample temperature (K): ',[10,3]])
    122122    parms.append(['Pressure','Sample pressure (MPa): ',[10,3]])
     
    16071607        if not G2frame.dataFrame.GetStatusBar():
    16081608            Status = G2frame.dataFrame.CreateStatusBar()           
     1609            Status.SetStatusText('NB: Azimuth is used for polarization only')
    16091610        G2frame.Bind(wx.EVT_MENU,OnCalibrate,id=G2gd.wxID_INSTCALIB)
    16101611        G2frame.Bind(wx.EVT_MENU,OnLoad,id=G2gd.wxID_INSTLOAD)
     
    16181619        G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.InstMenu)
    16191620        if not G2frame.dataFrame.GetStatusBar():
    1620             Status = G2frame.dataFrame.CreateStatusBar()           
     1621            Status = G2frame.dataFrame.CreateStatusBar()
    16211622        G2frame.Bind(wx.EVT_MENU,OnInstCopy,id=G2gd.wxID_INSTCOPY)
    16221623    MakeParameterWindow()
  • trunk/imports/G2pwd_fxye.py

    r1829 r1834  
    135135            N = len(x)
    136136            if self.clockWd:
    137                 x = Tmap2TOF(self.TimeMap[cons[5]],self.clockWd[cons[5]])
     137                if len(self.clockWd) == 1:
     138                    x = Tmap2TOF(self.TimeMap['1'],self.clockWd['1'])
     139                else:
     140                    x = Tmap2TOF(self.TimeMap[cons[5]],self.clockWd[cons[5]])
    138141            return [np.array(x),np.array(y),np.array(w),np.zeros(N),np.zeros(N),np.zeros(N)]
    139142       
     
    177180            N = len(x)
    178181            if self.clockWd:
    179                 x = Tmap2TOF(self.TimeMap[cons[5]],self.clockWd[cons[5]])
     182                if len(self.clockWd) == 1:
     183                    x = Tmap2TOF(self.TimeMap['1'],self.clockWd['1'])
     184                else:
     185                    x = Tmap2TOF(self.TimeMap[cons[5]],self.clockWd[cons[5]])
    180186            return [np.array(x),np.array(y),np.array(w),np.zeros(N),np.zeros(N),np.zeros(N)]
    181187           
     
    213219            cons = TimeMap[8:].split()
    214220            mapNo = cons[0]
    215             if mapNo == '10': mapNo = '1'   #HIPD cluge!
     221            if 'TIME_MAP10' in TimeMap: mapNo = '1'   #HIPD cluge!
    216222            Nch = int(cons[1])
    217223            Nrec = int(cons[2])
Note: See TracChangeset for help on using the changeset viewer.