Changeset 4339
- Timestamp:
- Mar 3, 2020 3:01:43 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Absorb.py
- Property svn:eol-style set to native
- Property svn:keywords set to Date Author Revision URL Id
r4197 r4339 12 12 import matplotlib as mpl 13 13 import GSASIIpath 14 GSASIIpath.SetVersionNumber("$Revision : 3765$")14 GSASIIpath.SetVersionNumber("$Revision$") 15 15 import GSASIIElem as G2elem 16 16 import GSASIIElemGUI as G2elemGUI -
trunk/G2AutoInt.py
- Property svn:keywords set to Date Author Revision URL Id
r4335 r4339 17 17 import wx 18 18 import GSASIIpath 19 GSASIIpath.SetVersionNumber("$Revision :$")19 GSASIIpath.SetVersionNumber("$Revision$") 20 20 import GSASIIautoInt as G2imG 21 21 import GSASIIfiles as G2fil -
trunk/G2compare.py
- Property svn:keywords set to Date Author Revision URL Id
r4335 r4339 3 3 #GSAS-II Data/Model Comparison 4 4 ########### SVN repository information ################### 5 # $Date :$6 # $Author : toby$7 # $Revision :$8 # $URL :$9 # $Id :$5 # $Date$ 6 # $Author$ 7 # $Revision$ 8 # $URL$ 9 # $Id$ 10 10 ########### SVN repository information ################### 11 11 ''' … … 14 14 ''' 15 15 16 #TODO: in OnDataTreeSelChanged want to plot patterns 17 # Make PWDR unique (use histlist) 18 # add graphics 19 # implement project 16 #TODO: 17 # Prince-test next 18 # Make PWDR unique? (use histlist) 19 # more graphics 20 # display more in datawindow 20 21 21 22 import sys … … 41 42 42 43 import GSASIIpath 43 GSASIIpath.SetVersionNumber("$Revision : 4154$")44 GSASIIpath.SetVersionNumber("$Revision$") 44 45 import GSASIIfiles as G2fil 45 46 import GSASIIplot as G2plt … … 132 133 wx.Frame.__init__(self, name='dComp', parent=parent, 133 134 size=size,style=wx.DEFAULT_FRAME_STYLE, title='GSAS-II data/model comparison') 135 # misc vars 136 self.VcovColor = 'RdYlGn' 134 137 # plot window 138 try: 139 size = GSASIIpath.GetConfigValue('Plot_Size') 140 if type(size) is tuple: 141 pass 142 elif type(size) is str: 143 size = eval(size) 144 else: 145 raise Exception 146 except: 147 size = wx.Size(700,600) 135 148 self.plotFrame = wx.Frame(None,-1,'dComp Plots',size=size, 136 149 style=wx.DEFAULT_FRAME_STYLE ^ wx.CLOSE_BOX) … … 208 221 209 222 self.PWDRfilter = None 223 for win,var in ((self.plotFrame,'Plot_Pos'),): 224 #for win,var in ((self,'Main_Pos'),(self.plotFrame,'Plot_Pos')): 225 try: 226 pos = GSASIIpath.GetConfigValue(var) 227 if type(pos) is str: pos = eval(pos) 228 win.SetPosition(pos) 229 if GetDisplay(pos) is None: win.Center() 230 except: 231 if GSASIIpath.GetConfigValue(var): 232 print('Value for config {} {} is invalid'.format(var,GSASIIpath.GetConfigValue(var))) 233 win.Center() 210 234 self.SetModeMenu() 211 235 … … 467 491 wx.EndBusyCursor() 468 492 self.GPXtree.Expand(self.root) 469 493 470 494 def OnDataTreeSelChanged(self,event): 495 def ClearData(self): 496 '''Initializes the contents of the dataWindow panel 497 ''' 498 self.Unbind(wx.EVT_SIZE) 499 self.SetBackgroundColour(wx.Colour(240,240,240)) 500 Sizer = self.GetSizer() 501 if Sizer: 502 try: 503 Sizer.Clear(True) 504 except: 505 pass 506 G2frame = self 471 507 item = event.GetItem() 472 print('selected',item) 508 #print('selected',item) 509 if self.getMode() == "Project": 510 ClearData(G2frame.dataWindow) 511 data = G2frame.GPXtree.GetItemPyData(item) 512 if data is None: 513 self.plotFrame.Show(False) 514 return 515 text = '' 516 if 'Rvals' in data: 517 Nvars = len(data['varyList']) 518 Rvals = data['Rvals'] 519 text = ('Residuals after last refinement:\n'+ 520 '\twR = {:.3f}\n\tchi**2 = {:.1f}\n\tGOF = {:.2f}').format( 521 Rvals['Rwp'],Rvals['chisq'],Rvals['GOF']) 522 text += '\n\tNobs = {}\n\tNvals = {}\n\tSVD zeros = {}'.format( 523 Rvals['Nobs'],Nvars,Rvals.get('SVD0',0.)) 524 text += '\n\tmax shift/esd = {:.3f}'.format(Rvals.get('Max shft/sig',0.0)) 525 if 'lamMax' in Rvals: 526 text += '\n\tlog10 MaxLambda = {:.1f}'.format(np.log10(Rvals['lamMax'])) 527 G2frame.dataWindow.GetSizer().Add( 528 wx.StaticText(G2frame.dataWindow,wx.ID_ANY,text) 529 ) 530 self.plotFrame.Show(True) 531 G2plt.PlotCovariance(G2frame,data) 532 else: 533 self.plotFrame.Show(False) 534 ClearData(G2frame.dataWindow) 473 535 474 536 #print(self.GPXtree._getTreeItemsList(item)) … … 557 619 G2G.G2MessageBox(self,'F-test requires same number of observations in each refinement','F-test not valid') 558 620 return 621 missingVars = [] 622 for var in baseDict['varyList']: 623 if var not in relxDict['varyList']: 624 missingVars.append(var) 625 txt = '' 626 postmsg = '' 627 if missingVars: 628 txt = ('*** Possible invalid use of F-test: '+ 629 'The F-test requires that the constrained model be a subset '+ 630 'of the relaxed model. Review the parameters shown below to '+ 631 'confirm missing var(s) have new names in the relaxed model. '+ 632 '***\n\n') 633 postmsg = ('\n\nThese parameters are in the constrained '+ 634 'fit and are not in the relaxed fit:\n* ') 635 for i,var in enumerate(missingVars): 636 if i > 0: postmsg += ', ' 637 postmsg += var 638 postmsg += ('\nThese parameters are in the relaxed fit and not'+ 639 ' in the constrained fit:\n* ') 640 i = 0 641 for var in relxDict['varyList']: 642 if var not in baseDict['varyList']: 643 if i > 0: postmsg += ', ' 644 i += 1 645 postmsg += var 646 #GSASIIpath.IPyBreak_base() 559 647 prob = RwFtest(baseDict['Rvals']['Nobs'], 560 648 baseDict['Rvals']['GOF'],len(baseDict['varyList']), 561 649 relxDict['Rvals']['GOF'],len(relxDict['varyList'])) 562 650 fmt = "{} model is \n* {}\n* {} variables and Reduced Chi**2 = {:.3f}" 563 msg = fmt.format('Constrained',self.GPXtree.GetItemText(s0)[:-11], 651 msg = txt 652 msg += fmt.format('Constrained',self.GPXtree.GetItemText(s0)[:-11], 564 653 len(baseDict['varyList']), 565 654 baseDict['Rvals']['GOF']**2) … … 575 664 else: 576 665 msg += "The constrained model is statistically preferred to the relaxed model." 666 msg += postmsg 577 667 G2G.G2MessageBox(self,msg,'F-test result') 578 #GSASIIpath.IPyBreak_base()579 668 580 669 if __name__ == '__main__': -
trunk/G2shapes.py
- Property svn:eol-style set to native
- Property svn:keywords set to Date Author Revision URL Id
-
trunk/imports/G2img_SFRM.py
- Property svn:eol-style set to native
- Property svn:keywords set to Date Author Revision URL Id
r3333 r4339 1 1 # -*- coding: utf-8 -*- 2 2 ########### SVN repository information ################### 3 # $Date : 2017-12-26 20:18:10 -0600 (Tue, 26 Dec 2017)$4 # $Author : toby$5 # $Revision : 3207$6 # $URL : https://subversion.xray.aps.anl.gov/pyGSAS/trunk/imports/G2img_CBF.py$7 # $Id : G2img_CBF.py 3207 2017-12-27 02:18:10Z toby$3 # $Date$ 4 # $Author$ 5 # $Revision$ 6 # $URL$ 7 # $Id$ 8 8 ########### SVN repository information ################### 9 9 ''' … … 18 18 import GSASIIpath 19 19 import numpy as np 20 GSASIIpath.SetVersionNumber("$Revision : 3207$")20 GSASIIpath.SetVersionNumber("$Revision$") 21 21 class SFRM_ReaderClass(G2obj.ImportImage): 22 22 '''Routine to read a Read Bruker Advance image data .sfrm file. -
trunk/imports/G2pdf_gr.py
- Property svn:eol-style set to native
- Property svn:keywords set to Date Author Revision URL Id
r4192 r4339 1 1 # -*- coding: utf-8 -*- 2 2 ########### SVN repository information ################### 3 # $Date : 2017-03-04 08:34:05 -0600 (Sat, 04 Mar 2017)$4 # $Author : vondreele$5 # $Revision : 2738$6 # $URL : https://subversion.xray.aps.anl.gov/pyGSAS/trunk/imports/G2sad_xye.py$7 # $Id : G2sad_xye.py 2738 2017-03-04 14:34:05Z vondreele$3 # $Date$ 4 # $Author$ 5 # $Revision$ 6 # $URL$ 7 # $Id$ 8 8 ########### SVN repository information ################### 9 9 ''' … … 21 21 import GSASIIobj as G2obj 22 22 import GSASIIpath 23 GSASIIpath.SetVersionNumber("$Revision : 2738$")23 GSASIIpath.SetVersionNumber("$Revision$") 24 24 25 25 class txt_PDFReaderClass(G2obj.ImportPDFData): -
trunk/imports/G2phase_INS.py
- Property svn:eol-style set to native
- Property svn:keywords set to Date Author Revision URL Id
r3455 r4339 1 1 # -*- coding: utf-8 -*- 2 2 ########### SVN repository information ################### 3 # $Date : 2015-04-27 13:22:06 -0500 (Mon, 27 Apr 2015)$4 # $Author : vondreele$5 # $Revision : 1812$6 # $URL : https://subversion.xray.aps.anl.gov/pyGSAS/trunk/imports/G2phase_GPX.py$7 # $Id : G2phase_GPX.py 1812 2015-04-27 18:22:06Z vondreele$3 # $Date$ 4 # $Author$ 5 # $Revision$ 6 # $URL$ 7 # $Id$ 8 8 ########### SVN repository information ################### 9 9 ''' … … 23 23 import GSASIIlattice as G2lat 24 24 import GSASIIpath 25 GSASIIpath.SetVersionNumber("$Revision : 1812$")25 GSASIIpath.SetVersionNumber("$Revision$") 26 26 27 27 class PhaseReaderClass(G2obj.ImportPhase): -
trunk/imports/G2phase_rmc6f.py
- Property svn:eol-style set to native
- Property svn:keywords set to Date Author Revision URL Id
r4208 r4339 1 1 # -*- coding: utf-8 -*- 2 2 ########### SVN repository information ################### 3 # $Date : 2015-04-27 13:22:06 -0500 (Mon, 27 Apr 2015)$4 # $Author : vondreele$5 # $Revision : 1812$6 # $URL : https://subversion.xray.aps.anl.gov/pyGSAS/trunk/imports/G2phase_GPX.py$7 # $Id : G2phase_GPX.py 1812 2015-04-27 18:22:06Z vondreele$3 # $Date$ 4 # $Author$ 5 # $Revision$ 6 # $URL$ 7 # $Id$ 8 8 ########### SVN repository information ################### 9 9 ''' … … 24 24 import GSASIIctrlGUI as G2G 25 25 import GSASIIpath 26 GSASIIpath.SetVersionNumber("$Revision : 1812$")26 GSASIIpath.SetVersionNumber("$Revision$") 27 27 28 28 class PhaseReaderClass(G2obj.ImportPhase): -
trunk/imports/G2pwd_BrukerRAW.py
- Property svn:eol-style set to native
- Property svn:keywords set to Date Author Revision URL Id
r3979 r4339 1 1 # -*- coding: utf-8 -*- 2 2 ########### SVN repository information ################### 3 # $Date : 2014-12-27 11:14:59 -0600 (Sat, 27 Dec 2014)$4 # $Author : vondreele$5 # $Revision : 1620$6 # $URL : https://subversion.xray.aps.anl.gov/pyGSAS/trunk/imports/G2pwd_xye.py$7 # $Id : G2pwd_xye.py 1620 2014-12-27 17:14:59Z vondreele$3 # $Date$ 4 # $Author$ 5 # $Revision$ 6 # $URL$ 7 # $Id$ 8 8 ########### SVN repository information ################### 9 9 ''' … … 21 21 import GSASIIobj as G2obj 22 22 import GSASIIpath 23 GSASIIpath.SetVersionNumber("$Revision : 1620$")23 GSASIIpath.SetVersionNumber("$Revision$") 24 24 class raw_ReaderClass(G2obj.ImportPowderData): 25 25 'Routines to import powder data from a binary Bruker .RAW file' -
trunk/imports/G2pwd_FP.py
- Property svn:eol-style set to native
- Property svn:keywords set to Date Author Revision URL Id
r3758 r4339 1 1 # -*- coding: utf-8 -*- 2 2 ########### SVN repository information ################### 3 # $Date : 2014-12-27 11:14:59 -0600 (Sat, 27 Dec 2014)$4 # $Author : vondreele$5 # $Revision : 1620$6 # $URL : https://subversion.xray.aps.anl.gov/pyGSAS/trunk/imports/G2pwd_xye.py$7 # $Id : G2pwd_xye.py 1620 2014-12-27 17:14:59Z vondreele$3 # $Date$ 4 # $Author$ 5 # $Revision$ 6 # $URL$ 7 # $Id$ 8 8 ########### SVN repository information ################### 9 9 ''' … … 20 20 import GSASIIobj as G2obj 21 21 import GSASIIpath 22 GSASIIpath.SetVersionNumber("$Revision : 1620$")22 GSASIIpath.SetVersionNumber("$Revision$") 23 23 class fp_ReaderClass(G2obj.ImportPowderData): 24 24 'Routines to import powder data from a FullProf 1-10 column .dat file' -
trunk/imports/G2pwd_Panalytical.py
- Property svn:eol-style set to native
- Property svn:keywords set to Date Author Revision URL Id
r3918 r4339 1 1 # -*- coding: utf-8 -*- 2 2 ########### SVN repository information ################### 3 # $Date :$4 # $Author : von dreele$5 # $Revision :$6 # $URL :$7 # $Id :$3 # $Date$ 4 # $Author$ 5 # $Revision$ 6 # $URL$ 7 # $Id$ 8 8 ########### SVN repository information ################### 9 9 … … 14 14 import GSASIIobj as G2obj 15 15 import GSASIIpath 16 GSASIIpath.SetVersionNumber("$Revision :$")16 GSASIIpath.SetVersionNumber("$Revision$") 17 17 class Panalytical_ReaderClass(G2obj.ImportPowderData): 18 18 '''Routines to import powder data from a Pananalytical.xrdm (xml) file. -
trunk/imports/G2pwd_rigaku.py
- Property svn:keywords set to Date Author Revision URL Id
r4132 r4339 1 1 # -*- coding: utf-8 -*- 2 2 ########### SVN repository information ################### 3 # $Date :$4 # $Author : toby$5 # $Revision :$6 # $URL :$7 # $Id :$3 # $Date$ 4 # $Author$ 5 # $Revision$ 6 # $URL$ 7 # $Id$ 8 8 ########### SVN repository information ################### 9 9 … … 14 14 import GSASIIobj as G2obj 15 15 import GSASIIpath 16 GSASIIpath.SetVersionNumber("$Revision :$")16 GSASIIpath.SetVersionNumber("$Revision$") 17 17 class Rigaku_txtReaderClass(G2obj.ImportPowderData): 18 18 '''Routines to import powder data from a Rigaku .txt file with an angle and -
trunk/imports/G2rfd_Panalytical.py
- Property svn:eol-style set to native
- Property svn:keywords set to Date Author Revision URL Id
r4142 r4339 1 1 # -*- coding: utf-8 -*- 2 2 ########### SVN repository information ################### 3 # $Date :$4 # $Author : von dreele$5 # $Revision :$6 # $URL :$7 # $Id :$3 # $Date$ 4 # $Author$ 5 # $Revision$ 6 # $URL$ 7 # $Id$ 8 8 ########### SVN repository information ################### 9 9 … … 15 15 import GSASIIpath 16 16 sind = lambda x: np.sin(x*np.pi/180.) 17 GSASIIpath.SetVersionNumber("$Revision :$")17 GSASIIpath.SetVersionNumber("$Revision$") 18 18 class Panalytical_ReaderClass(G2obj.ImportReflectometryData): 19 19 '''Routines to import reflectivity data from a Pananalytical.xrdm (xml) file. -
trunk/imports/G2rfd_xye.py
- Property svn:eol-style set to native
- Property svn:keywords set to Date Author Revision URL Id
r4213 r4339 1 1 # -*- coding: utf-8 -*- 2 2 ########### SVN repository information ################### 3 # $Date : 2017-03-04 08:34:05 -0600 (Sat, 04 Mar 2017)$4 # $Author : vondreele$5 # $Revision : 2738$6 # $URL : https://subversion.xray.aps.anl.gov/pyGSAS/trunk/imports/G2sad_xye.py$7 # $Id : G2sad_xye.py 2738 2017-03-04 14:34:05Z vondreele$3 # $Date$ 4 # $Author$ 5 # $Revision$ 6 # $URL$ 7 # $Id$ 8 8 ########### SVN repository information ################### 9 9 ''' … … 21 21 import GSASIIobj as G2obj 22 22 import GSASIIpath 23 GSASIIpath.SetVersionNumber("$Revision : 2738$")23 GSASIIpath.SetVersionNumber("$Revision$") 24 24 npasind = lambda x: 180.*np.arcsin(x)/np.pi 25 25 npsind = lambda x: np.sin(np.pi*x/180.)
Note: See TracChangeset
for help on using the changeset viewer.