Changeset 446


Ignore:
Timestamp:
Dec 16, 2011 4:45:18 PM (10 years ago)
Author:
vondreele
Message:

continue refactoring of GSASIIgrid.py - DrawAtoms?
fix error in background calc & deriv

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r445 r446  
    231231        parent.Append(menu=MyHelp(self,helpType='Data'),title='&Help')
    232232       
    233     def _init_coll_DrawAtomsMenu(self,parent):
    234         parent.Append(menu=self.DrawAtomEdit, title='Edit')
    235         parent.Append(menu=MyHelp(self,helpType='Draw Atoms'),title='&Help')
    236 
    237233    def _init_coll_PawleyMenu(self,parent):
    238234        parent.Append(menu=self.PawleyEdit,title='Operations')
     
    327323            help='Clear the texture coefficients' )
    328324           
    329     def _init_coll_DrawAtom_Items(self,parent):
    330         parent.Append(id=wxID_DRAWATOMSTYLE, kind=wx.ITEM_NORMAL,text='Atom style',
    331             help='Select atoms first')
    332         parent.Append(id=wxID_DRAWATOMLABEL, kind=wx.ITEM_NORMAL,text='Atom label',
    333             help='Select atoms first')
    334         parent.Append(id=wxID_DRAWATOMCOLOR, kind=wx.ITEM_NORMAL,text='Atom color',
    335             help='Select atoms first')
    336         parent.Append(id=wxID_DRAWATOMRESETCOLOR, kind=wx.ITEM_NORMAL,text='Reset atom colors',
    337             help='Resets all atom colors to defaults')
    338         parent.Append(id=wxID_DRAWVIEWPOINT, kind=wx.ITEM_NORMAL,text='View point',
    339             help='View point is 1st atom selected')
    340         parent.Append(id=wxID_DRAWADDEQUIV, kind=wx.ITEM_NORMAL,text='Add atoms',
    341             help='Add symmetry & cell equivalents to drawing set from selected atoms')
    342         parent.Append(id=wxID_DRAWTRANSFORM, kind=wx.ITEM_NORMAL,text='Transform atoms',
    343             help='Transform selected atoms by symmetry & cell translations')
    344         parent.Append(id=wxID_DRAWFILLCOORD, kind=wx.ITEM_NORMAL,text='Fill CN-sphere',
    345             help='Fill coordination sphere for selected atoms')           
    346         parent.Append(id=wxID_DRAWFILLCELL, kind=wx.ITEM_NORMAL,text='Fill unit cell',
    347             help='Fill unit cell with selected atoms')
    348         parent.Append(id=wxID_DRAWDELETE, kind=wx.ITEM_NORMAL,text='Delete atoms',
    349             help='Delete atoms from drawing set')
    350 
    351325    def _init_coll_Pawley_Items(self,parent):
    352326        parent.Append(id=wxID_PAWLEYLOAD, kind=wx.ITEM_NORMAL,text='Pawley create',
     
    446420        self.DataMenu = wx.MenuBar()
    447421        self.TextureMenu = wx.MenuBar()
    448         self.DrawAtomsMenu = wx.MenuBar()
    449422        self.PawleyMenu = wx.MenuBar()
    450423        self.ImageMenu = wx.MenuBar()
     
    463436        self.DataEdit = wx.Menu(title='')
    464437        self.TextureEdit = wx.Menu(title='')
    465         self.DrawAtomEdit = wx.Menu(title='')
    466438        self.PawleyEdit = wx.Menu(title='')
    467439        self.ImageEdit = wx.Menu(title='')
     
    485457        self._init_coll_TextureMenu(self.TextureMenu)
    486458        self._init_coll_Texture_Items(self.TextureEdit)
    487         self._init_coll_DrawAtomsMenu(self.DrawAtomsMenu)
    488         self._init_coll_DrawAtom_Items(self.DrawAtomEdit)
    489459        self._init_coll_PawleyMenu(self.PawleyMenu)
    490460        self._init_coll_Pawley_Items(self.PawleyEdit)
     
    553523        self.DataDrawOptions = wx.MenuBar()
    554524        self.DataDrawOptions.Append(menu=MyHelp(self,helpType='Draw Options'),title='&Help')
     525        # menu for Data Editing Window / Phase / Draw Atoms tab
     526        self.DrawAtomsMenu = wx.MenuBar()
     527        self.DrawAtomEdit = wx.Menu(title='')
     528        self.DrawAtomsMenu.Append(menu=self.DrawAtomEdit, title='Edit')
     529        self.DrawAtomsMenu.Append(menu=MyHelp(self,helpType='Draw Atoms'),title='&Help')
     530        self.DrawAtomEdit.Append(id=wxID_DRAWATOMSTYLE, kind=wx.ITEM_NORMAL,text='Atom style',
     531            help='Select atoms first')
     532        self.DrawAtomEdit.Append(id=wxID_DRAWATOMLABEL, kind=wx.ITEM_NORMAL,text='Atom label',
     533            help='Select atoms first')
     534        self.DrawAtomEdit.Append(id=wxID_DRAWATOMCOLOR, kind=wx.ITEM_NORMAL,text='Atom color',
     535            help='Select atoms first')
     536        self.DrawAtomEdit.Append(id=wxID_DRAWATOMRESETCOLOR, kind=wx.ITEM_NORMAL,text='Reset atom colors',
     537            help='Resets all atom colors to defaults')
     538        self.DrawAtomEdit.Append(id=wxID_DRAWVIEWPOINT, kind=wx.ITEM_NORMAL,text='View point',
     539            help='View point is 1st atom selected')
     540        self.DrawAtomEdit.Append(id=wxID_DRAWADDEQUIV, kind=wx.ITEM_NORMAL,text='Add atoms',
     541            help='Add symmetry & cell equivalents to drawing set from selected atoms')
     542        self.DrawAtomEdit.Append(id=wxID_DRAWTRANSFORM, kind=wx.ITEM_NORMAL,text='Transform atoms',
     543            help='Transform selected atoms by symmetry & cell translations')
     544        self.DrawAtomEdit.Append(id=wxID_DRAWFILLCOORD, kind=wx.ITEM_NORMAL,text='Fill CN-sphere',
     545            help='Fill coordination sphere for selected atoms')           
     546        self.DrawAtomEdit.Append(id=wxID_DRAWFILLCELL, kind=wx.ITEM_NORMAL,text='Fill unit cell',
     547            help='Fill unit cell with selected atoms')
     548        self.DrawAtomEdit.Append(id=wxID_DRAWDELETE, kind=wx.ITEM_NORMAL,text='Delete atoms',
     549            help='Delete atoms from drawing set')
     550
    555551       
    556552    def _init_ctrls(self, parent,name=None,size=None,pos=None):
  • trunk/GSASIIpwd.py

    r443 r446  
    653653        wave = parmDict[pfx+'Lam1']
    654654    q = 4.0*np.pi*npsind(xdata/2.0)/wave
    655     SQ = (q/(4*np.pi))**2
     655    SQ = (q/(4.*np.pi))**2
    656656    FF = G2elem.GetFormFactorCoeff('Si')[0]
    657657    ff = np.array(G2elem.ScatFac(FF,SQ)[0])**2
     
    838838    for name in varyList:
    839839        if 'Debye' in name:
    840             ih,parm,id = name.split(':')
     840            parm,id = name.split(':')
    841841            ip = names.index(parm)
    842842            dMdv[varyList.index(name)] = dMddb[3*int(id)+ip]
Note: See TracChangeset for help on using the changeset viewer.