Changeset 3438
- Timestamp:
- Jun 18, 2018 11:35:30 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIIO.py
r3433 r3438 626 626 LastSavedUsing = datum[1]['LastSavedUsing'] 627 627 if datum[0] == 'Controls' and 'PythonVersions' in datum[1] and GSASIIpath.GetConfigValue('debug') and showProvenance: 628 print(' Packages used to create .GPX file:')628 print('DBG_Packages used to create .GPX file:') 629 629 if 'dict' in str(type(datum[1]['PythonVersions'])): #patch 630 630 for p in sorted(datum[1]['PythonVersions'],key=lambda s: s.lower()): -
trunk/GSASIIconstrGUI.py
r3413 r3438 1106 1106 if 'DELETED' in str(PhaseConstr): #seems to be no other way to do this (wx bug) 1107 1107 if GSASIIpath.GetConfigValue('debug'): 1108 print (' wx error: PhaseConstr not cleanly deleted after Refine')1108 print ('DBG_wx error: PhaseConstr not cleanly deleted after Refine') 1109 1109 return 1110 1110 UpdateConstraintPanel(PhaseConstr,'Phase') … … 1644 1644 if 'DELETED' in str(G2frame.GetStatusBar()): #seems to be no other way to do this (wx bug) 1645 1645 if GSASIIpath.GetConfigValue('debug'): 1646 print (' wx error: Rigid Body/Status not cleanly deleted after Refine')1646 print ('DBG_wx error: Rigid Body/Status not cleanly deleted after Refine') 1647 1647 return 1648 1648 SetStatusLine(' You may use e.g. "c60" or "s60" for a vector entry') -
trunk/GSASIIctrlGUI.py
r3426 r3438 171 171 for arg in args: 172 172 if GSASIIpath.GetConfigValue('debug') and not arg.startswith('wxID_'): 173 print (' Problem in name'+arg)173 print ('DBG_Problem in name'+arg) 174 174 if arg in globals(): 175 if GSASIIpath.GetConfigValue('debug'): print ( arg+'already defined')175 if GSASIIpath.GetConfigValue('debug'): print ('DBG_'+arg+'already defined') 176 176 continue 177 177 exec('global '+arg+';'+arg+' = wx.NewId()') … … 3058 3058 return G2frame.TutorialImportDir 3059 3059 elif GSASIIpath.GetConfigValue('debug'): 3060 print(' Tutorial location (TutorialImportDir) not found: '+G2frame.TutorialImportDir)3060 print('DBG_Tutorial location (TutorialImportDir) not found: '+G2frame.TutorialImportDir) 3061 3061 pth = GSASIIpath.GetConfigValue('Import_directory') 3062 3062 if pth: … … 3071 3071 return G2frame.LastImportDir 3072 3072 elif GSASIIpath.GetConfigValue('debug'): 3073 print(' Warning: G2frame.LastImportDir not found = '+G2frame.LastImportDir)3073 print('DBG_Warning: G2frame.LastImportDir not found = '+G2frame.LastImportDir) 3074 3074 return None 3075 3075 … … 4115 4115 try: 4116 4116 helpKey = dW.helpKey # look up help from helpKey in data window 4117 #if GSASIIpath.GetConfigValue('debug'): print ' dataWindow help: key=',helpKey4117 #if GSASIIpath.GetConfigValue('debug'): print 'DBG_dataWindow help: key=',helpKey 4118 4118 except AttributeError: 4119 4119 helpKey = '' 4120 if GSASIIpath.GetConfigValue('debug'): print(' No helpKey for current dataWindow!')4120 if GSASIIpath.GetConfigValue('debug'): print('DBG_No helpKey for current dataWindow!') 4121 4121 helpType = self.HelpById.get(event.GetId(),helpKey) # see if there is a special help topic 4122 #if GSASIIpath.GetConfigValue('debug'): print ' helpKey=',helpKey,' helpType=',helpType4122 #if GSASIIpath.GetConfigValue('debug'): print 'DBG_helpKey=',helpKey,' helpType=',helpType 4123 4123 if helpType == 'Tutorials': 4124 4124 dlg = OpenTutorial(self.frame) … … 4479 4479 try: 4480 4480 vars['Starting_directory'][1] = path 4481 if GSASIIpath.GetConfigValue('debug'): print(' Saving GPX path: '+path)4481 if GSASIIpath.GetConfigValue('debug'): print('DBG_Saving GPX path: '+path) 4482 4482 SaveConfigVars(vars) 4483 4483 except KeyError: … … 4489 4489 try: 4490 4490 vars['Import_directory'][1] = path 4491 if GSASIIpath.GetConfigValue('debug'): print(' Saving Import path: '+path)4491 if GSASIIpath.GetConfigValue('debug'): print('DBG_Saving Import path: '+path) 4492 4492 SaveConfigVars(vars) 4493 4493 except KeyError: … … 4923 4923 if sys.platform.lower().startswith('win'): 4924 4924 pfx = '' 4925 #if GSASIIpath.GetConfigValue('debug'): print ' Help link=',pfx+helplink4925 #if GSASIIpath.GetConfigValue('debug'): print 'DBG_Help link=',pfx+helplink 4926 4926 if htmlFirstUse: 4927 4927 wb.open_new(pfx+helplink) … … 5362 5362 try: 5363 5363 vars['Tutorial_location'][1] = pth 5364 if GSASIIpath.GetConfigValue('debug'): print(' Saving Tutorial_location: '+pth)5364 if GSASIIpath.GetConfigValue('debug'): print('DBG_Saving Tutorial_location: '+pth) 5365 5365 GSASIIpath.SetConfigValue(vars) 5366 5366 SaveConfigVars(vars) -
trunk/GSASIIdataGUI.py
r3427 r3438 5455 5455 lines = "" 5456 5456 for line in data: 5457 lines += line.rstrip()+'\n' 5457 if 'phoenix' in wx.version(): 5458 lines += line.decode('latin-1').rstrip()+'\n' 5459 else: 5460 lines += line.rstrip()+'\n' 5458 5461 text = wx.StaticText(G2frame.dataWindow,wx.ID_ANY,lines) 5459 5462 G2frame.dataWindow.GetSizer().Add(text,1,wx.ALL|wx.EXPAND) -
trunk/GSASIIimgGUI.py
r3358 r3438 1344 1344 l2 = len(data[key]) 1345 1345 if GSASIIpath.GetConfigValue('debug') and l1 != l2: 1346 print (' Mask Cleanup: %s was %d entries, now %d'%(key,l1,l2))1346 print ('DBG_Mask Cleanup: %s was %d entries, now %d'%(key,l1,l2)) 1347 1347 1348 1348 def UpdateMasks(G2frame,data): … … 2737 2737 msg += 'PDF Processing Error: error with open or read of {}'.format(self.params['pdfprm']) 2738 2738 if GSASIIpath.GetConfigValue('debug'): 2739 print( msg)2740 print( err)2739 print('DBG_'+msg) 2740 print('DBG_'+err) 2741 2741 self.pdfControls = {} 2742 2742 return msg … … 2920 2920 interpDict,imgctrl,immask = self.Evaluator(dist) # interpolated calibration values 2921 2921 if GSASIIpath.GetConfigValue('debug'): 2922 print (' interpolated values: ',interpDict)2922 print ('DBG_interpolated values: ',interpDict) 2923 2923 self.ImageControls = ReadControls(imgctrl) 2924 2924 self.ImageControls.update(interpDict) … … 3201 3201 if GSASIIpath.GetConfigValue('debug'): 3202 3202 import datetime 3203 print (" Timer tick at {:%d %b %Y %H:%M:%S}\n".format(datetime.datetime.now()))3203 print ("DBG_Timer tick at {:%d %b %Y %H:%M:%S}\n".format(datetime.datetime.now())) 3204 3204 self.PreventReEntryTimer = False 3205 3205 self.Raise() -
trunk/GSASIImpsubs.py
r3207 r3438 63 63 if ncores > 1: 64 64 useMP = True 65 #if GSASIIpath.GetConfigValue('debug') and useMP:66 65 if useMP: 67 66 print('Multiprocessing with {} cores enabled'.format(ncores)) -
trunk/GSASIIpath.py
r3420 r3438 190 190 host,port = getsvnProxy() 191 191 if GetConfigValue('debug') and host: 192 print(' Using proxy host {} port {}'.format(host,port))192 print('DBG_Using proxy host {} port {}'.format(host,port)) 193 193 # add likely places to find subversion when installed with GSAS-II 194 194 pathlist = os.environ["PATH"].split(os.pathsep) -
trunk/GSASIIphsGUI.py
r3437 r3438 385 385 MatSizer = wx.BoxSizer(wx.HORIZONTAL) 386 386 transSizer = wx.BoxSizer(wx.VERTICAL) 387 transSizer.Add(wx.StaticText(self.panel,label=" XYZ Transformation matrix & vectors: M*(X-U)+V = X'")) 387 transSizer.Add((5,5),0) 388 transSizer.Add(wx.StaticText(self.panel,label= 389 " Cell transformation via g'=gM; g=metric tensor \n XYZ transformation via M*(X-U)+V = X'; M* = inv(M)")) 388 390 # if self.Super: 389 391 # Trmat = wx.FlexGridSizer(4,4,0,0) … … 400 402 commonSizer.Add(common,0,WACV) 401 403 transSizer.Add(commonSizer) 402 Trmat = wx.FlexGridSizer(3,6,0,0) 404 Trmat = wx.FlexGridSizer(4,6,0,0) 405 Trmat.Add((10,0),0) 406 Trmat.Add(wx.StaticText(self.panel,label=' M'),wx.ALIGN_CENTER) 407 Trmat.Add((10,0),0) 408 Trmat.Add((10,0),0) 409 Trmat.Add(wx.StaticText(self.panel,label=' U'),wx.ALIGN_CENTER) 410 Trmat.Add(wx.StaticText(self.panel,label=' V'),wx.ALIGN_CENTER) 411 403 412 for iy,line in enumerate(self.Trans): 404 413 for ix,val in enumerate(line): … … 444 453 mainSizer.Add(BNSizer,0,WACV) 445 454 else: 446 mag = wx.Button(self.panel,label=' 455 mag = wx.Button(self.panel,label='Make new phase magnetic?') 447 456 mag.Bind(wx.EVT_BUTTON,OnMag) 448 457 mainSizer.Add(mag,0,WACV) … … 450 459 label=' NB: Nonmagnetic atoms will be deleted from new phase'),0,WACV) 451 460 constr = wx.CheckBox(self.panel,label=' Make constraints between phases?') 452 mainSizer.Add(wx.StaticText(self.panel, \453 label=' Constraints not correct for non-diagonal transforms'),0,WACV)461 # mainSizer.Add(wx.StaticText(self.panel, \ 462 # label=' Constraints not correct for non-diagonal transforms'),0,WACV) 454 463 constr.SetValue(self.ifConstr) 455 464 constr.Bind(wx.EVT_CHECKBOX,OnConstr) -
trunk/GSASIIplot.py
r3429 r3438 7139 7139 try: 7140 7140 return G2frame.phaseDisplay.GetSelection() 7141 except AttributeError:7141 except: 7142 7142 G2frame.G2plotNB.status.SetStatusText('Select this from Phase data window!',1) 7143 7143 return 0 -
trunk/GSASIIscriptable.py
r3437 r3438 1006 1006 repeat = rd.repeat 1007 1007 else: 1008 if GSASIIpath.GetConfigValue('debug'): print(" {} Reader failed to read {}".format(rd.formatName,filename))1008 if GSASIIpath.GetConfigValue('debug'): print("DBG_{} Reader failed to read {}".format(rd.formatName,filename)) 1009 1009 if rd_list: 1010 1010 if rd.warnings: -
trunk/GSASIIstrIO.py
r3392 r3438 2354 2354 hapData['newLeBail'] = False 2355 2355 refList = [] 2356 Uniq = []2357 Phi = []2356 # Uniq = [] 2357 # Phi = [] 2358 2358 useExt = 'magnetic' in Phases[phase]['General']['Type'] and 'N' in inst['Type'][0] 2359 2359 if Phases[phase]['General'].get('Modulated',False): … … 2370 2370 refList.append([h,k,l,m,mul,d, pos,0.0,0.0,0.0,100., 0.0,0.0,1.0,1.0,1.0]) 2371 2371 #... sig,gam,fotsq,fctsq, phase,icorr,prfo,abs,ext 2372 Uniq.append(uniq)2373 Phi.append(phi)2372 # Uniq.append(uniq) 2373 # Phi.append(phi) 2374 2374 elif 'T' in inst['Type'][0]: 2375 2375 pos = G2lat.Dsp2pos(inst,d) … … 2379 2379 # ... sig,gam,fotsq,fctsq, phase,icorr,alp,bet,wave, prfo,abs,ext 2380 2380 #TODO - if tabulated put alp & bet in here 2381 Uniq.append(uniq)2382 Phi.append(phi)2381 # Uniq.append(uniq) 2382 # Phi.append(phi) 2383 2383 else: 2384 2384 ifSuper = False … … 2387 2387 for h,k,l,d in HKLd: 2388 2388 ext,mul,uniq,phi = G2spc.GenHKLf([h,k,l],SGData) 2389 if 'N' in inst['Type'][0] and 'MagSpGrp' in SGData: 2390 ext = G2spc.checkMagextc([h,k,l],SGData) 2389 2391 mul *= 2 # for powder overlap of Friedel pairs 2390 if ext and not useExt:2392 if ext:# and not useExt: 2391 2393 continue 2392 2394 if 'C' in inst['Type'][0]: … … 2395 2397 refList.append([h,k,l,mul,d, pos,0.0,0.0,0.0,100., 0.0,0.0,1.0,1.0,1.0]) 2396 2398 #... sig,gam,fotsq,fctsq, phase,icorr,prfo,abs,ext 2397 Uniq.append(uniq)2398 Phi.append(phi)2399 # Uniq.append(uniq) 2400 # Phi.append(phi) 2399 2401 elif 'T' in inst['Type'][0]: 2400 2402 pos = G2lat.Dsp2pos(inst,d) … … 2403 2405 refList.append([h,k,l,mul,d, pos,0.0,0.0,0.0,100., 0.0,0.0,0.0,0.0,wave, 1.0,1.0,1.0]) 2404 2406 # ... sig,gam,fotsq,fctsq, phase,icorr,alp,bet,wave, prfo,abs,ext 2405 Uniq.append(uniq)2406 Phi.append(phi)2407 # Uniq.append(uniq) 2408 # Phi.append(phi) 2407 2409 Histogram['Reflection Lists'][phase] = {'RefList':np.array(refList),'FF':{},'Type':inst['Type'][0],'Super':ifSuper} 2408 2410 elif 'HKLF' in histogram:
Note: See TracChangeset
for help on using the changeset viewer.