Changeset 1778


Ignore:
Timestamp:
Apr 6, 2015 1:33:00 PM (7 years ago)
Author:
vondreele
Message:

allow Refine texture menu item to appear; use DestroyChildren? to clear the Texture tab before filling
fix azimuth calculations after image integration
put Azimuth in Sample parms.
add 3 prints to debug option in G2mapvars
add Omega, Chi, Phi & Azimuth to sequential results table if they vary

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIIO.py

    r1770 r1778  
    10411041    else:
    10421042        for i,azm in enumerate(azms[:-1]):
    1043             Azms.append(G2img.meanAzm(azm,azms[i+1]))
     1043            if azm > 360. and azms[i+1] > 360.:
     1044                Azms.append(G2img.meanAzm(azm%360.,azms[i+1]%360.))
     1045            else:   
     1046                Azms.append(G2img.meanAzm(azm,azms[i+1]))
    10441047    for i,azm in enumerate(azms[:-1]):
    10451048        Aname = name+" Azm= %.2f"%(Azms[i])
     
    10581061        Sample['Chi'] = data['GonioAngles'][1]
    10591062        Sample['Phi'] = data['GonioAngles'][2]
     1063        Sample['Azimuth'] = Azms[i]     #put here too
    10601064        if 'PWDR' in Aname:
    10611065            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

    r1776 r1778  
    665665                if dlg.ShowModal() == wx.ID_OK:
    666666                    POData[6] = [hkls[i] for i in dlg.GetSelections()]
     667                    if not POData[6]:
     668                        POData[6] = ['']
    667669                else:
    668670                    return
     
    796798        wx.CallLater(100,UpdateDData,G2frame,DData,data,hist)
    797799       
     800    DData.DestroyChildren()
    798801    if DData.GetSizer():
    799802        DData.GetSizer().Clear(True)
     
    898901            mainSizer.Add(HstrainSizer())
    899902               
    900             #texture  'Pref. Ori.':['MD',1.0,False,[0,0,1],0,[]] last two for 'SH' are SHorder & coeff
    901903            poSizer = wx.BoxSizer(wx.VERTICAL)
    902904            POData = UseList[hist]['Pref.Ori.']
  • trunk/GSASIIgrid.py

    r1776 r1778  
    18231823        self.TextureEdit = wx.Menu(title='')
    18241824        self.TextureMenu.Append(menu=self.TextureEdit, title='Texture')
    1825 #        self.TextureEdit.Append(id=wxID_REFINETEXTURE, kind=wx.ITEM_NORMAL,text='Refine texture',
    1826 #            help='Refine the texture coefficients from sequential Pawley results')
    1827 # N.B. Binding is now commented out
     1825        self.TextureEdit.Append(id=wxID_REFINETEXTURE, kind=wx.ITEM_NORMAL,text='Refine texture',
     1826            help='Refine the texture coefficients from sequential results')
    18281827        self.TextureEdit.Append(id=wxID_CLEARTEXTURE, kind=wx.ITEM_NORMAL,text='Clear texture',
    18291828            help='Clear the texture coefficients' )
     
    25012500        else:
    25022501            sampleParmDict = {'Temperature':[],'Pressure':[],'Time':[],
    2503                               'FreePrm1':[],'FreePrm2':[],'FreePrm3':[],}
     2502                'FreePrm1':[],'FreePrm2':[],'FreePrm3':[],'Omega':[],
     2503                'Chi':[],'Phi':[],'Azimuth':[],}
    25042504        Controls = G2frame.PatternTree.GetItemPyData(
    25052505            GetPatternTreeItemId(G2frame,G2frame.root, 'Controls'))
  • trunk/GSASIImapvars.py

    r1676 r1778  
    380380
    381381    # check for errors:
     382    if debug:
     383        print 'indepVarList',indepVarList
     384        print 'depVarList',depVarList
     385        print 'multdepVarList',multdepVarList
    382386    inboth = set(indepVarList).intersection(set(depVarList))
    383387    if len(inboth) > 0:
  • trunk/GSASIIphsGUI.py

    r1776 r1778  
    240240        """       
    241241        # UpdateGeneral execution starts here
     242        General.DestroyChildren()
    242243        phaseTypes = ['nuclear','modulated','magnetic','macromolecular']
    243244        SetupGeneral()
     
    36113612
    36123613        # UpdateTexture executable starts here
     3614        Texture.DestroyChildren()
    36133615        G2frame.dataFrame.SetStatusText('')
    36143616        generalData = data['General']       
     
    58685870                           
    58695871    def OnTextureRefine(event):
    5870         print 'refine texture maybe from C[i,j] in seq. result? not yet'
    5871         event.Skip()       
     5872        print 'refine texture from C[i,j] in seq. result'
    58725873           
    58735874    def OnTextureClear(event):
    58745875        print 'clear texture? - does nothing'
    5875         event.Skip()
    58765876
    58775877    def FillSelectPageMenu(TabSelectionIdDict, menuBar):
     
    60486048        # Texture
    60496049        FillSelectPageMenu(TabSelectionIdDict, G2frame.dataFrame.TextureMenu)
    6050         #G2frame.dataFrame.Bind(wx.EVT_MENU, OnTextureRefine, id=G2gd.wxID_REFINETEXTURE)
     6050        G2frame.dataFrame.Bind(wx.EVT_MENU, OnTextureRefine, id=G2gd.wxID_REFINETEXTURE)
    60516051        G2frame.dataFrame.Bind(wx.EVT_MENU, OnTextureClear, id=G2gd.wxID_CLEARTEXTURE)
    60526052        # Pawley reflections
  • trunk/GSASIIpwdGUI.py

    r1776 r1778  
    8181        'FreePrm1':0.,'FreePrm2':0.,'FreePrm3':0.,
    8282        'Gonio. radius':200.0,
    83         'Omega':0.0,'Chi':0.0,'Phi':0.0,
     83        'Omega':0.0,'Chi':0.0,'Phi':0.0,'Azimuth':0.0,
    8484#SASD items
    8585        'Materials':[{'Name':'vacuum','VolFrac':1.0,},{'Name':'vacuum','VolFrac':0.0,}],
     
    117117    parms.append(['Chi','Goniometer chi:',[10,3]])
    118118    parms.append(['Phi','Goniometer phi:',[10,3]])
     119    parms.append(['Azimuth','Detector azimuth',[10,3]])
    119120    parms.append(['Time','Clock time (s)',[12,3]])
    120121    parms.append(['Temperature','Sample temperature (K): ',[10,3]])
Note: See TracChangeset for help on using the changeset viewer.