Changeset 3270
- Timestamp:
- Feb 10, 2018 12:25:09 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIctrlGUI.py
r3250 r3270 221 221 return wx.TreeCtrl.SetItemPyData(self,id,data) 222 222 223 def onSelectionChanged(self,event):224 '''Log each press on a tree item here.225 '''226 if not self.G2frame.treePanel:227 return228 if self.SelectionChanged:229 textlist = self._getTreeItemsList(event.GetItem())230 if log.LogInfo['Logging'] and event.GetItem() != self.root:231 textlist[0] = self.GetRelativeHistNum(textlist[0])232 if textlist[0] == "Phases" and len(textlist) > 1:233 textlist[1] = self.GetRelativePhaseNum(textlist[1])234 log.MakeTreeLog(textlist)235 if textlist == self.textlist:236 return #same as last time - don't get it again237 self.textlist = textlist238 self.SelectionChanged(event)239 240 def Bind(self,eventtype,handler,*args,**kwargs):241 '''Override the Bind() function so that page change events can be trapped242 '''243 if eventtype == wx.EVT_TREE_SEL_CHANGED:244 self.SelectionChanged = handler245 wx.TreeCtrl.Bind(self,eventtype,self.onSelectionChanged)246 return247 wx.TreeCtrl.Bind(self,eventtype,handler,*args,**kwargs)223 # def onSelectionChanged(self,event): 224 # '''Log each press on a tree item here. 225 # ''' 226 # if not self.G2frame.treePanel: 227 # return 228 # if self.SelectionChanged: 229 # textlist = self._getTreeItemsList(event.GetItem()) 230 # if log.LogInfo['Logging'] and event.GetItem() != self.root: 231 # textlist[0] = self.GetRelativeHistNum(textlist[0]) 232 # if textlist[0] == "Phases" and len(textlist) > 1: 233 # textlist[1] = self.GetRelativePhaseNum(textlist[1]) 234 # log.MakeTreeLog(textlist) 235 # if textlist == self.textlist: 236 # return #same as last time - don't get it again 237 # self.textlist = textlist 238 # self.SelectionChanged(event) 239 240 # def Bind(self,eventtype,handler,*args,**kwargs): 241 # '''Override the Bind() function so that page change events can be trapped 242 # ''' 243 # if eventtype == wx.EVT_TREE_SEL_CHANGED: 244 # self.SelectionChanged = handler 245 # wx.TreeCtrl.Bind(self,eventtype,self.onSelectionChanged) 246 # return 247 # wx.TreeCtrl.Bind(self,eventtype,handler,*args,**kwargs) 248 248 249 249 # commented out, disables Logging -
trunk/GSASIIdataGUI.py
r3263 r3270 2658 2658 self.SetIcon(wx.IconFromBitmap(img)) 2659 2659 self.Bind(wx.EVT_CLOSE, self.ExitMain) 2660 # various defaults2660 # initialize default values for GSAS-II "global" variables (saved in main Frame) 2661 2661 self.oldFocus = None 2662 2662 self.GSASprojectfile = '' … … 2720 2720 self.dataDisplay = None 2721 2721 self.dataDisplayPhaseText = '' 2722 self.lastTreeSetting = [] 2722 self.lastTreeSetting = [] # used to track the selected Tree item before a refinement 2723 2723 self.ExpandingAll = False 2724 2724 self.SeqTblHideList = [] 2725 self.lastSelectedPhaseTab = None # track the last tab pressed on a phase window 2725 2726 2726 2727 arg = sys.argv … … 2780 2781 2781 2782 def OnDataTreeSelChanged(self, event): 2782 '''Called when a data tree item is selected''' 2783 '''Called when a data tree item is selected. May be called on item deletion as well. 2784 ''' 2783 2785 if self.TreeItemDelete: 2784 2786 self.TreeItemDelete = False … … 2801 2803 def OnGPXtreeItemExpanded(self, event): 2802 2804 'Called when a tree item is expanded' 2803 #self.OnDataTreeSelChanged(event) # removed -- why select & show a tree item when expanding it? BHT2804 2805 event.Skip() 2805 2806 2806 2807 def OnGPXtreeItemDelete(self, event): 2807 'Called when a tree item is deleted -- not sure what this does'2808 'Called when a tree item is deleted, inhibit the next tree item selection action' 2808 2809 self.TreeItemDelete = True 2809 2810 … … 4297 4298 dlg.Raise() 4298 4299 Rw = 100.00 4299 self.SaveTreeSetting() 4300 self.GPXtree.SaveExposedItems() 4300 self.SaveTreeSetting() # save the current tree selection 4301 self.GPXtree.SaveExposedItems() # save the exposed/hidden tree items 4301 4302 try: 4302 4303 OK,Msg = G2stMn.Refine(self.GSASprojectfile,dlg) #Msg is Rvals dict if Ok=True … … 4320 4321 self.HKL = [] 4321 4322 G2IO.ProjFileOpen(self,False) 4322 self.GPXtree.RestoreExposedItems() 4323 self.TreeItemDelete = False # tree has been repopulated; ignore previous deletions 4324 self.GPXtree.RestoreExposedItems() # reset exposed/hidden tree items 4323 4325 self.ResetPlots() 4324 4326 finally: … … 4328 4330 4329 4331 def SaveTreeSetting(self): 4330 'Save the last tree setting'4332 'Save the current selected tree item by name (since the id will change)' 4331 4333 oldId = self.GPXtree.GetSelection() #retain current selection 4332 4334 oldPath = self.GetTreeItemsList(oldId) 4333 4335 self.lastTreeSetting = oldPath 4334 # note that for reasons unclear, it does not seem necessary to reload the Atoms tab4335 #parentName = ''4336 #tabId = None4337 # parentId = self.GPXtree.GetItemParent(oldId)4338 # if parentId:4339 # parentName = self.GPXtree.GetItemText(parentId) #find the current data tree name4340 # if 'Phases' in parentName:4341 # tabId = self.dataDisplay.GetSelection()4342 #self.lastTreeSetting = oldPath,tabId4343 #GSASIIpath.IPyBreak()4344 4345 def TestResetPlot(self,event):4346 '''Debug code to test cleaning up plots after a refinement'''4347 #for i in range(self.G2plotNB.nb.GetPageCount()):4348 # [self.G2plotNB.nb.GetPageText(i)4349 # save current tree item and (if needed) atoms tab4350 self.SaveTreeSetting()4351 self.ResetPlots()4352 4336 4353 4337 def ResetPlots(self): … … 4357 4341 require one (see G2plotNB.SetNoDelete). 4358 4342 ''' 4359 lastRaisedPlotTab = self.G2plotNB.lastRaisedPlotTab # save the last page saved4343 lastRaisedPlotTab = self.G2plotNB.lastRaisedPlotTab # save the current plot tab 4360 4344 self.G2plotNB.lastRaisedPlotTab = None 4361 # print ('lastRaisedPlotTab='+lastRaisedPlotTab) 4362 # mark displayed plots as invalid 4363 for lbl,frame in zip(self.G2plotNB.plotList,self.G2plotNB.panelList): 4364 frame.plotInvalid = True 4365 # reload current tree item, triggering the routine to redraw the data window and possibly a plot 4366 #oldPath,tabId = self.lastTreeSetting 4367 oldPath = self.lastTreeSetting 4345 #print ('lastRaisedPlotTab='+lastRaisedPlotTab) 4346 for lbl,win in zip(self.G2plotNB.plotList,self.G2plotNB.panelList): 4347 win.plotInvalid = True # mark all current plots as invalid so we can tell what has been updated 4348 4349 oldPath = self.lastTreeSetting # reload last selected tree item, triggers window and possibly plot redraw 4368 4350 Id = self.root 4369 4351 for txt in oldPath: 4370 4352 Id = GetGPXtreeItemId(self, Id, txt) 4371 self.PickIdText = None #force reload of page4353 self.PickIdText = None #forces reload of page 4372 4354 if Id: 4373 4355 self.PickId = Id 4374 4356 self.GPXtree.SelectItem(Id) 4357 wx.CallLater(100,self.CleanupOldPlots,lastRaisedPlotTab) # wait for plotting to catch up before cleanup 4358 4359 def CleanupOldPlots(self,lastRaisedPlotTab): 4360 '''Called after a refinement to update plots and delete plots that show obsoleted information 4361 ''' 4375 4362 # update other self-updating plots 4376 # for lbl,frame in zip(self.G2plotNB.plotList,self.G2plotNB.panelList): 4377 # if frame.plotInvalid and frame.replotFunction: 4378 # frame.replotFunction(*frame.replotArgs,**frame.replotKWargs) 4379 # delete any remaining plots that are still invalid and need a refresh 4380 for lbl,frame in zip(self.G2plotNB.plotList,self.G2plotNB.panelList): 4381 if frame.plotInvalid and frame.plotRequiresRedraw: 4363 for lbl,win in zip(self.G2plotNB.plotList,self.G2plotNB.panelList): 4364 if win.plotInvalid and win.replotFunction: 4365 if GSASIIpath.GetConfigValue('debug'): 4366 print('updating',lbl,'by calling',str(win.replotFunction)) 4367 try: 4368 win.replotFunction(*win.replotArgs,**win.replotKWargs) 4369 except: 4370 if GSASIIpath.GetConfigValue('debug'): 4371 print('Error with args',win.replotArgs,win.replotKWargs) 4372 # delete any remaining plots that have not been updated and need a refresh (win.plotRequiresRedraw) 4373 for lbl,win in zip(self.G2plotNB.plotList,self.G2plotNB.panelList): 4374 if win.plotInvalid and win.plotRequiresRedraw: 4375 if GSASIIpath.GetConfigValue('debug'): 4376 print('Closing out-of-date plot',lbl) 4382 4377 self.G2plotNB.Delete(lbl) 4383 # put the previously last-raised tab on top, if present. If not, use the one corresponding to4378 # put the previously last-raised plot tab on top, if present. If not, use the one corresponding to 4384 4379 # the last tree item to be selected 4385 4380 wx.CallAfter(self.G2plotNB.RaiseLastPage,lastRaisedPlotTab,self.G2plotNB.lastRaisedPlotTab) … … 4469 4464 ################################################################################ 4470 4465 class G2DataWindow(wx.ScrolledWindow): #wxscroll.ScrolledPanel): 4471 '''Create the data item window entries in menus used in 4472 that window. The menu entries are created for all 4473 data item windows, but in the Mac the menu is accessed from all 4474 windows. This means that a different menu is posted depending on which 4475 data item is posted. On the Mac, all the menus contain the data tree menu 4476 items, but additional menus are added specific to the data item. 4466 '''Create the data item window as well as the menu. Note that 4467 the same core menu items are used in all menus, but different items may be 4468 added depending on what data tree item (and for phases, the phase tab). 4477 4469 4478 4470 Note that while the menus are created here, … … 7425 7417 if G2frame.PickIdText == G2frame.GetTreeItemsList(item): # don't redo the current data tree item 7426 7418 return 7427 oldPage = None # will be set later if already on a Phase item7428 7419 7429 7420 # save or finish processing of outstanding events … … 7453 7444 except: #clumsy but avoids dead window problem when opening another project 7454 7445 pass 7455 elif 'Phase Data for' in G2frame.dataWindow.GetLabel():7456 if G2frame.dataDisplay:7457 oldPage = G2frame.dataDisplay.GetSelection()7446 # elif 'Phase Data for' in G2frame.dataWindow.GetLabel(): 7447 # if G2frame.dataDisplay: 7448 # oldPage = G2frame.dataDisplay.GetSelection() 7458 7449 G2frame.SetLabel('') 7459 7450 … … 7612 7603 elif G2frame.GPXtree.GetItemText(parentID) == 'Phases': 7613 7604 data = G2frame.GPXtree.GetItemPyData(item) 7614 G2phG.UpdatePhaseData(G2frame,item,data ,oldPage)7605 G2phG.UpdatePhaseData(G2frame,item,data) 7615 7606 elif G2frame.GPXtree.GetItemText(item) == 'Comments': 7616 7607 SetDataMenuBar(G2frame,G2frame.dataWindow.DataCommentsMenu) -
trunk/GSASIIphsGUI.py
r3269 r3270 1090 1090 atomData[i][-1] = Faces 1091 1091 1092 def UpdatePhaseData(G2frame,Item,data ,oldPage):1092 def UpdatePhaseData(G2frame,Item,data): 1093 1093 '''Create the data display window contents when a phase is clicked on 1094 1094 in the main (data tree) window. … … 1102 1102 :param wx.TreeItemId Item: the tree item that was selected 1103 1103 :param dict data: all the information on the phase in a dictionary 1104 :param int oldPage: This sets a tab to select when moving1105 from one phase to another, in which case the same tab is selected1106 to display first. This is set only when the previous data tree1107 selection is a phase, if not the value is None. The default action1108 is to bring up the General tab.1109 1104 1110 1105 ''' … … 8936 8931 def ChangePage(page): 8937 8932 text = G2frame.phaseDisplay.GetPageText(page) 8938 G2frame. phaseDisplayPhaseText= text8933 G2frame.lastSelectedPhaseTab = text 8939 8934 G2frame.dataWindow.helpKey = text # use name of Phase tab for help lookup 8940 8935 if text == 'General': … … 9195 9190 G2frame.phaseDisplay.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CHANGED, OnPageChanged) 9196 9191 FillMenus() 9197 if oldPage is None or oldPage == 0: 9192 if G2frame.lastSelectedPhaseTab in Pages: 9193 # SetupGeneral() # not sure why one might need this when moving from phase to phase; but does not hurt 9194 G2frame.phaseDisplay.SetSelection(Pages.index(G2frame.lastSelectedPhaseTab)) 9195 else: 9198 9196 ChangePage(0) 9199 #wx.CallAfter(G2frame.phaseDisplay.SendSizeEvent)9200 elif oldPage:9201 SetupGeneral() # not sure why one might need this when moving from phase to phase; but does not hurt9202 G2frame.phaseDisplay.SetSelection(oldPage) -
trunk/GSASIIplot.py
r3268 r3270 1 1 # -*- coding: utf-8 -*- 2 '''3 *GSASIIplot: plotting routines*4 ===============================5 6 '''7 2 ########### SVN repository information ################### 8 3 # $Date$ … … 12 7 # $Id$ 13 8 ########### SVN repository information ################### 9 ''' 10 *GSASIIplot: plotting routines* 11 =============================== 12 13 This module performs all visualization using matplotlib and OpenGL graphics. The following plotting 14 routines are defined: 15 16 ============================ =========================================================================== 17 ============================ =========================================================================== 18 :func:`PlotPatterns` Powder pattern plotting 19 :func:`PlotImage` Plots of 2D detector images 20 :func:`PlotPeakWidths` Plot instrument broadening terms as function of 2-theta/TOF 21 :func:`PlotCovariance` Show covariance terms in 2D 22 :func:`PlotStructure` Crystal structure plotting with balls, sticks, lines, 23 ellipsoids, polyhedra and magnetic moments 24 :func:`PlotSngl` Structure factor plotting 25 :func:`Plot3DSngl` 3D Structure factor plotting 26 :func:`PlotDeltSig` Normal probability plot (powder or single crystal) 27 :func:`PlotISFG` PDF analysis: displays I(Q), S(Q), F(Q) and G(r) 28 :func:`PlotCalib` CW or TOF peak calibration 29 :func:`PlotXY` simple plot of xy data 30 :func:`PlotXYZ` simple contour plot of xyz data 31 :func:`PlotAAProb` Protein "quality" plot 32 :func:`PlotStrain` Plot of strain data, used for diagnostic purposes 33 :func:`PlotSASDSizeDist` Small angle scattering size distribution plot 34 :func:`PlotPowderLines` Plot powder pattern as a stick plot (vertical lines) 35 :func:`PlotSizeStrainPO` Plot 3D mustrain/size/preferred orientation figure 36 :func:`PlotTexture` Pole figure, inverse pole figure plotting 37 :func:`ModulationPlot` Plots modulation information 38 :func:`PlotTorsion` Plots MC torsion angles 39 :func:`PlotRama` Ramachandran of energetically allowed regions for dihedral 40 angles in protein 41 :func:`PlotSelectedSequence` Plot one or more sets of values selected from the sequential 42 refinement table 43 :func:`PlotIntegration` Rectified plot of 2D image after image integration with 2-theta and 44 azimuth as coordinates 45 :func:`PlotTRImage` test plot routine 46 :func:`PlotRigidBody` show rigid body structures as balls & sticks 47 :func:`PlotLayers` show layer structures as balls & sticks 48 ============================ =========================================================================== 49 50 These plotting routines place their graphics in the GSAS-II Plot Window, which contains a 51 :class:`G2PlotNoteBook` tabbed panel allowing multiple plots to be viewed. Methods 52 :meth:`G2PlotNoteBook.addMpl` (2-D matplotlib), 53 :meth:`G2PlotNoteBook.add3D` (3-D matplotlib), and 54 :meth:`G2PlotNoteBook.addOgl` (OpenGL) are used to 55 create tabbed plot objects to hold plots of the following classes: 56 :class:`G2PlotMpl` (2-D matplotlib), 57 :class:`G2Plot3D` (3-D matplotlib), and 58 :class:`G2PlotOgl` (OpenGL). 59 These tabbed plot objects share a common parent class, which defines a number 60 of special attributes (variables), which have these uses: 61 62 ====================== =============== ============================================================ 63 variable default use 64 ====================== =============== ============================================================ 65 replotFunction None Defines a routine to be called to update the plot 66 after a refinement (unless None). Do not define 67 this to use functions that take significant time 68 to complete (also see 69 replotArgs [] Defines the positional arguments to be supplied to 70 the replotFunction function or method. 71 replotKwArgs {} Defines the keyword arguments to be supplied to 72 the replotFunction function or method. (Implemented, 73 but not currently used.) 74 plotInvalid False Used to track if a plot has been updated. Set to False 75 in :meth:`G2PlotNoteBook.FindPlotTab` when a plot is 76 drawn. After a refinement is completed, method 77 :func:`GSASIIdataGUI.GSASII.ResetPlots` sets 78 plotInvalid to False for all plots before any routines 79 are called. 80 plotRequiresRedraw True If set to True, after a refinement, the plot will be 81 closed (in :func:`GSASIIdataGUI.GSASII.CleanupOldPlots`) 82 if it was not updated after the refinement. Set this to 83 False using :meth:`G2PlotNoteBook.SetNoDelete` 84 for plots that should not be deleted or do 85 not change based on refinement results. 86 ====================== =============== ============================================================ 87 88 Note that the plot toolbar is customized with :class:`GSASIItoolbar` 89 90 ''' 14 91 from __future__ import division, print_function 15 92 import platform … … 133 210 'Creates a basic tabbed plot window for GSAS-II graphics' 134 211 def __init__(self,parent,id=-1,dpi=None,**kwargs): 135 self.ReplotRoutine = None 136 self.ReplotArgs = [] 137 self.ReplotKwArgs = {} 212 self.replotFunction = None 213 self.replotArgs = [] 214 self.replotKwArgs = {} 215 self.plotInvalid = False # valid 216 self.plotRequiresRedraw = True # delete plot if not updated 138 217 wx.Panel.__init__(self,parent,id=id,**kwargs) 139 218 … … 223 302 self.plotList = [] # contains the tab label for each plot 224 303 self.panelList = [] # contains the panel object for each plot 225 self.skipPageChange = False # set to True when no plot update is needed304 #self.skipPageChange = False # set to True when no plot update is needed 226 305 self.allowZoomReset = True # this indicates plot should be updated not initialized 306 # (BHT: should this be in tabbed panel rather than here?) 227 307 self.lastRaisedPlotTab = None 228 308 … … 342 422 :param page: the wx.Frame for the matplotlib, openGL, etc. window 343 423 ''' 344 self.skipPageChange = True424 #self.skipPageChange = True 345 425 if name in self.plotList: 346 426 print('Warning: duplicate plot name! Name='+name) … … 351 431 self.panelList.append(page) # panel object for plot 352 432 self.lastRaisedPlotTab = name 353 page.plotInvalid = False # plot has just been drawn354 page.plotRequiresRedraw = True # set to False if plot should be retained even if not refreshed355 page.replotFunction = None # used to specify a routine to redraw the routine356 page.replotArgs = []357 page.replotKWargs = {}358 self.skipPageChange = False433 #page.plotInvalid = False # plot has just been drawn 434 #page.plotRequiresRedraw = True # set to False if plot should be retained even if not refreshed 435 #page.replotFunction = None # used to specify a routine to redraw the routine 436 #page.replotArgs = [] 437 #page.replotKWargs = {} 438 #self.skipPageChange = False 359 439 360 440 def addMpl(self,name=""): … … 407 487 'Raises a plot tab without triggering a refresh via OnPageChanged' 408 488 if plotDebug: print ('Raise'+str(self).split('0x')[1]) 409 self.skipPageChange = True489 #self.skipPageChange = True 410 490 Page.SetFocus() 411 self.skipPageChange = False491 #self.skipPageChange = False 412 492 413 493 def SetSelectionNoRefresh(self,plotNum): 414 494 'Raises a plot tab without triggering a refresh via OnPageChanged' 415 495 if plotDebug: print ('Select'+str(self).split('0x')[1]) 416 self.skipPageChange = True496 #self.skipPageChange = True 417 497 self.nb.SetSelection(plotNum) # raises plot tab 418 498 Page = self.G2frame.G2plotNB.nb.GetPage(plotNum) 419 499 Page.SetFocus() 420 self.skipPageChange = False500 #self.skipPageChange = False 421 501 422 502 def OnPageChanged(self,event): … … 424 504 Called when a plot tab is clicked. on some platforms (Mac for sure) this 425 505 is also called when a plot is created or selected with .SetSelection() or 426 .SetFocus(). The self.skipPageChange is used variable is set to suppress 427 repeated replotting. 506 .SetFocus(). 507 508 (removed) The self.skipPageChange is used variable is set to suppress repeated replotting. 428 509 ''' 429 510 tabLabel = event.GetEventObject().GetPageText(event.GetSelection()) 430 511 self.lastRaisedPlotTab = tabLabel 431 512 if plotDebug: 432 print ('PageChanged, self='+str(self).split('0x')[1]+tabLabel+str(self.skipPageChange)) 513 # print ('PageChanged, self='+str(self).split('0x')[1]+tabLabel+str(self.skipPageChange)) 514 print ('PageChanged, self='+str(self).split('0x')[1]+tabLabel) 433 515 print ('event type='+event.GetEventType()) 434 516 self.status.DestroyChildren() #get rid of special stuff on status bar … … 1298 1380 elif PickName: 1299 1381 G2frame.PickId = G2gd.GetGPXtreeItemId(G2frame, G2frame.PatternId, PickName) 1382 elif GSASIIpath.GetConfigValue('debug'): 1383 print('Possible PickId problem PickId=',G2frame.PickId) 1300 1384 # for now I am not sure how to regenerate G2frame.HKL 1301 1385 G2frame.HKL = [] # TODO … … 3260 3344 ################################################################################ 3261 3345 def PlotAAProb(G2frame,resNames,Probs1,Probs2,Title='',thresh=None,pickHandler=None): 3346 'Needs a description' 3262 3347 3263 3348 def OnMotion(event): … … 3376 3461 3377 3462 def PlotSASDSizeDist(G2frame): 3463 'Needs a description' 3378 3464 3379 3465 def OnPageChanged(event): … … 4105 4191 4106 4192 def ModulationPlot(G2frame,data,atom,ax,off=0): 4193 'Needs a description' 4107 4194 global Off,Atom,Ax,Slab,Off 4108 4195 Off = off … … 6970 7057 pass 6971 7058 wx.CallAfter(Draw,'main') 6972 # if firstCall: Draw('main') # draw twice the first time that graphics are displayed 7059 # on Mac (& Linux?) the structure must be drawn twice the first time that graphics are displayed 7060 if firstCall: Draw('main') # redraw 6973 7061 6974 7062 ################################################################################ … … 7247 7335 G2frame.G2plotNB.status.SetStatusText('Drawing saved to: '+Fname,1) 7248 7336 7249 # Plot Structureexecution starts here (N.B. initialization above)7337 # PlotRigidBody execution starts here (N.B. initialization above) 7250 7338 new,plotNum,Page,Plot,lim = G2frame.G2plotNB.FindPlotTab('Rigid body','ogl') 7251 7339 if new: -
trunk/GSASIIscriptable.py
r3253 r3270 2858 2858 """Implements the refine command-line subcommand: 2859 2859 conducts refinements on GSAS-II projects according to a JSON refinement dict:: 2860 2861 usage: GSASIIscriptable.py refine [-h] gpxfile [refinements]2860 2861 usage: GSASIIscriptable.py refine [-h] gpxfile [refinements] 2862 2862 2863 2863 positional arguments:: -
trunk/docs/source/index.rst
r3238 r3270 38 38 Note that GSAS-II requires the Python extension packages 39 39 40 * wxPython (http://wxpython.org/docs/api/), 41 * note that GSAS-II has been tested with wxPython >=2.8, 3.0.x and 4.0.x 40 * wxPython (http://wxpython.org/docs/api/). Note that GSAS-II has been tested with wxPython >=2.8, 3.0.x and 4.0.x 42 41 * NumPy (http://docs.scipy.org/doc/numpy/reference/), 43 42 * SciPy (http://docs.scipy.org/doc/scipy/reference/), 44 43 * matplotlib (http://matplotlib.org/contents.html) and 45 * PyOpenGL (http://pyopengl.sourceforge.net/documentation) 46 * Note: a copy of this is distributed with GSAS-II at present and will be 47 installed if the Python setuptools package is present. 44 * PyOpenGL (http://pyopengl.sourceforge.net/documentation). Note: a copy of this is distributed with GSAS-II (at present) and will be installed if the Python setuptools package is present. 48 45 49 46 Two packages are used by some parts of the code, but are not -
trunk/help/gsasII.html
r3265 r3270 3428 3428 are of the form ‘p:h:name:id’ where ‘p’ is the phase index, ‘h’ is 3429 3429 the histogram index and ‘id’ is the item index (if needed). Indexes 3430 all begin with ‘0’ (zero). Note that for atom positions the value is 3431 not a refinable parameter, but the shift in the value is. Position 3432 names are, e.g. ‘0::Ax:0’ for the x-position of the 0th atom in 3433 the 0th phase while shift names have a ‘d’ in them, 3434 e.g. ‘0::dAx:0’. Press the window exit button to exit this dialog box. 3430 all begin with ‘0’ (zero). 3431 <P> 3432 Note that for atom positions, the coordinate values (named as 3433 ‘p::A<i>w</i>:n’, where p is the phase number, n is the atom number 3434 and <i>w</i> is x, y or z) is 3435 not a refinable parameter, but the shift in the value is. The 3436 refined parameters are ‘p::A<i>w</i>:n’. 3437 The reason this is done is that by treating an atom 3438 position as x+dx,y+dy,z+dz where the “d” values indicate shifts from 3439 the starting position and the shifts 3440 are refined rather than the x,y, or z values is that this simplifies 3441 symmetry constraints. As an example, suppose we have an atom on 3442 a symmetry constrained site, x,1/2-x,z. The process needed to define 3443 this constraint, so 3444 that if x moves positively y has to move negatively by the same 3445 amount would be messy. With refinement of shifts, all we need to do is constrain dy (‘0::dAy:n’) 3446 to be equal to -dx (-1*‘0::dAx:n’). 3447 <P> 3448 Press the window exit button to exit this dialog box. 3435 3449 <DT><b>Refine</b> 3436 3450 <DD>This performs the refinement (Pawley/Rietveld or single … … 7142 7156 <hr size=2 width="100%" align=center> 7143 7157 7144 <!-- hhmts start -->Last modified: Tue Feb 6 17:27:23CST 2018 <!-- hhmts end -->7158 <!-- hhmts start -->Last modified: Tue Feb 6 22:56:34 CST 2018 <!-- hhmts end --> 7145 7159 7146 7160 </div>
Note: See TracChangeset
for help on using the changeset viewer.