Changeset 1658
 Timestamp:
 Feb 16, 2015 3:42:17 PM (7 years ago)
 Location:
 trunk
 Files:

 4 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIphsGUI.py
r1657 r1658 76 76 phasePage.SetScrollbars(10,10,Size[0]/104,Size[1]/101) 77 77 mainFrame.setSizePosLeft(Size) 78 mainFrame.SendSizeEvent() 78 79 79 80 def UpdatePhaseData(G2frame,Item,data,oldPage): … … 1069 1070 G2gd.HorizontalLine(mainSizer,General) 1070 1071 mainSizer.Add(MCSASizer()) 1072 G2frame.dataFrame.SetStatusText('') 1071 1073 SetPhaseWindow(G2frame.dataFrame,General,mainSizer) 1072 G2frame.dataFrame.SetStatusText('')1073 1074 1074 1075 ################################################################################ 
trunk/GSASIIpy3.py
r1447 r1658 73 73 :returns: a string with <= maxdigits characters (usually). 74 74 ''' 75 if 'str' in str(type(val)) and (val == '?' or val == '.'): 76 return val 75 77 if maxdigits is None: 76 78 digits = [10,2] … … 130 132 :returns: a string with <= maxdigits characters (I hope). 131 133 ''' 134 if 'str' in str(type(val)) and (val == '?' or val == '.'): 135 return val 132 136 if treatAsZero is not None: 133 137 if abs(val) < treatAsZero: 
trunk/GSASIIspc.py
r1643 r1658 2299 2299 #28 2300 2300 'P m a 2':['(00g)','(00g)s0s','(00g)ss0','(00g)0ss','(01/2g)','(01/2g)s0s', 2301 '(a00)','(a01/2)','(a1/20)','(a1/21/2)','(0b0)','(0b0)s00',], 2302 'P 2 m b':[], 2303 'P c 2 m':[], 2304 'P m 2 a':[], 2305 'P b m 2':[], 2306 'P 2 c m':[], 2301 '(0b1/2)','(0b1/2)s00','(a01/2)','(a00)','(0b0)','(0b0)0s0','(a1/20)','(a1/21/2)'], 2302 'P 2 m b':['(a00)','(a00)s0s','(a00)ss0','(a00)0ss','(a01/2)','(a01/2)s0s', 2303 '(1/20g)','(1/20g)s00','(1/2b0)','(0b0)','(00g)','(00g)0s0','(0b1/2)','(1/2b1/2)'], 2304 'P c 2 m':['(0b0)','(0b0)s0s','(0b0)ss0','(0b0)0ss','(1/2b0)','(1/2b0)s0s', 2305 '(a1/20)','(a1/20)s00','(01/2g)','(00g)','(a00)','(a00)0s0','(1/20g)','(1/21/2g)'], 2306 'P m 2 a':['(0b0)','(0b0)s0s','(0b0)ss0','(0b0)0ss','(0b1/2)','(0b1/2)s0s', 2307 '(01/2g)','(01/2g)s00','(a1/20)','(a00)','(00g)','(00g)0s0','(a01/2)','(a1/21/2)'], 2308 'P b m 2':['(00g)','(00g)s0s','(00g)ss0','(00g)0ss','(1/20g)','(1/20g)s0s', 2309 '(a01/2)','(a01/2)s00','(0b1/2)','(0b0)','(a00)','(a00)0s0','(1/2b0)','(1/2b1/2)'], 2310 'P 2 c m':['(a00)','(a00)s0s','(a00)ss0','(a00)0ss','(a1/20)','(a1/20)s0s', 2311 '(1/2b0)','(1/2b0)s00','(1/20g)','(00g)','(0b0)','(0b0)0s0','(01/2g)','(1/21/2g)'], 2307 2312 #29 2308 2313 'P c a 21':['(00g)','(00g)0ss','(01/2g)','(1/20g)', … … 2579 2584 'A c m m':[], 2580 2585 #68 o@i 2581 'C c c a':[], 2582 'A b a a':[], 2583 'B b c b':[], 2584 'B b a b':[], 2585 'C c c b':[], 2586 'A c a a':[], 2586 'C c c a':['(00g)','(00g)s00','(10g)','(01g)','(10g)s00','(01g)s00', 2587 '(a00)','(a00)s00','(a00)ss0','(a00)0s0','(0b0)','(0b0)s00','(0b0)ss0','(0b0)0s0'], 2588 'A b a a':['(a00)','(a00)s00','(a10)','(a01)','(a10)s00','(a01)s00', 2589 '(0b0)','(0b0)s00','(0b0)ss0','(0b0)0s0','(00g)','(00g)s00','(00g)ss0','(00g)0s0'], 2590 'B b c b':['(0b0)','(0b0)s00','(0b1)','(1b0)','(0b1)s00','(1b0)s00', 2591 '(00g)','(00g)s00','(00g)ss0','(0b0)0s0','(a00)','(a00)s00','(a00)ss0','(a00)0s0'], 2592 'B b a b':['(0b0)','(0b0)s00','(1b0)','(0b1)','(1b0)s00','(0b1)s00', 2593 '(a00)','(a00)s00','(a00)ss0','(a00)0s0','(00g)','(00g)s00','(00g)ss0','(00g)0s0'], 2594 'C c c b':['(00g)','(00g)ss0','(01g)','(10g)','(01g)s00','(10g)s00', 2595 '(0b0)','(0b0)s00','(0b0)ss0','(0b0)0s0','(a00)','(a00)s00','(a00)ss0','(a00)0s0'], 2596 'A c a a':['(a00)','(a00)ss0','(a01)','(a10)','(a01)s00','(a10)s00', 2597 '(00g)','(00g)s00','(00g)ss0','(00g)0s0','(0b0)','(0b0)s00','(0b0)ss0','(0b0)0s0'], 2587 2598 #69 2588 'F m m m':['(00g)','(00g)s00','(00g) 0s0','(00g)ss0','(a00)','(a00)0s0',2589 '(a00) 00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s',2590 '(10g)','(10g)s00','(10g) 0s0','(10g)ss0','(a10)','(a10)0s0',2599 'F m m m':['(00g)','(00g)s00','(00g)ss0','(a00)','(a00)s00', 2600 '(a00)ss0','(0b0)','(0b0)s00','(0b0)ss0', 2601 '(10g)','(10g)s00','(10g)ss0','(a10)','(a10)0s0', 2591 2602 '(a10)00s','(a10)0ss','(0b1)','(0b1)s00','(0b1)00s','(0b1)s0s', 2592 '(01g)','(01g)s00','(01g) 0s0','(01g)ss0','(a01)','(a01)0s0',2603 '(01g)','(01g)s00','(01g)ss0','(a01)','(a01)0s0', 2593 2604 '(a01)00s','(a01)0ss','(1b0)','(1b0)s00','(1b0)00s','(1b0)s0s'], 2594 2605 #70 o@i 2595 'F d d d':['(00g)','(00g)s00','(00g)0s0','(a00)','(a00)0s0', 2596 '(a00)00s','(0b0)','(0b0)s00','(0b0)00s',], 2597 2606 'F d d d':['(00g)','(00g)s00','(a00)','(a00)s00','(0b0)','(0b0)s00'], 2598 2607 #71 2599 'I m m m':['(00g)','(00g)s00','(00g) 0s0','(00g)ss0','(a00)','(a00)0s0',2600 '(a00) 00s','(a00)0ss','(0b0)','(0b0)s00','(0b0)00s','(0b0)s0s',],2608 'I m m m':['(00g)','(00g)s00','(00g)ss0','(a00)','(a00)0s0', 2609 '(a00)ss0','(0b0)','(0b0)s00','(0b0)ss0'], 2601 2610 #72 2602 2611 'I b a m':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0', 
trunk/exports/G2export_CIF.py
r1496 r1658 40 40 import GSASIIIO as G2IO 41 41 import GSASIIgrid as G2gd 42 import GSASIIctrls as G2ctrls 42 43 import GSASIIstrIO as G2stIO 43 44 import GSASIImath as G2mth … … 111 112 More could be done here, but this is a good start. 112 113 ''' 113 WriteCIFitem('_pd_proc_info_datetime', self.CIFdate) 114 WriteCIFitem('_pd_calc_method', 'Rietveld Refinement') 114 if self.ifPWDR: 115 WriteCIFitem('_pd_proc_info_datetime', self.CIFdate) 116 WriteCIFitem('_pd_calc_method', 'Rietveld Refinement') 115 117 #WriteCIFitem('_refine_ls_shift/su_max',DAT1) 116 118 #WriteCIFitem('_refine_ls_shift/su_mean',DAT2) … … 118 120 #WriteCIFitem('_refine_diff_density_min',rhomin) 119 121 WriteCIFitem('_computing_structure_refinement','GSASII (Toby & Von Dreele, J. Appl. Cryst. 46, 544549, 2013)') 122 if self.ifHKLF: 123 controls = self.OverallParms['Controls'] 124 if controls['F**2']: 125 thresh = 'F**2>%.1fu(F**2)'%(controls['minF/sig']) 126 else: 127 thresh = 'F>%.1fu(F)'%(controls['minF/sig']) 128 WriteCIFitem('_reflns_threshold_expression', thresh) 120 129 try: 121 130 vars = str(len(self.OverallParms['Covariance']['varyList'])) … … 1221 1230 if not self.quickmode: # statistics only in a full CIF 1222 1231 WriteReflStat(refcount,hklmin,hklmax,dmin,dmax) 1223 hId = histblk[0]['hId'] 1224 pfx = '0:'+str(hId)+':' 1225 WriteCIFitem('_reflns_wR_factor_obs ','%.4f'%(histblk[0]['wR']/100.)) 1226 WriteCIFitem('_reflns_R_F_factor_obs ','%.4f'%(histblk[0][pfx+'Rf']/100.)) 1227 WriteCIFitem('_reflns_R_Fsqd_factor_obs','%.4f'%(histblk[0][pfx+'Rf^2']/100.)) 1232 hId = histblk['hId'] 1233 hfx = '0:'+str(hId)+':' 1234 phfx = '%d:%d:'%(0,hId) 1235 extType,extModel,extParms = self.Phases[phasenam]['Histograms'][histlbl]['Extinction'] 1236 if extModel != 'None': 1237 WriteCIFitem('_refine_ls_extinction_method','BeckerCoppens %s %s'%(extModel,extType)) 1238 sig = 1.e3 1239 if extModel == 'Primary': 1240 parm = extParms['Ep'][0]*1.e5 1241 if extParms['Ep'][1]: 1242 sig = self.sigDict[phfx+'Ep']*1.e5 1243 text = G2mth.ValEsd(parm,sig) 1244 elif extModel == 'Secondary Type I': 1245 parm = extParms['Eg'][0]*1.e5 1246 if extParms['Eg'][1]: 1247 sig = self.sigDict[phfx+'Eg']*1.e5 1248 text = G2mth.ValEsd(parm,sig) 1249 elif extModel == 'Secondary Type II': 1250 parm = extParms['Es'][0]*1.e5 1251 if extParms['Es'][1]: 1252 sig = self.sigDict[phfx+'Es']*1.e5 1253 text = G2mth.ValEsd(parm,sig) 1254 elif extModel == 'Secondary Type I & II': 1255 parm = extParms['Eg'][0]*1.e5 1256 if extParms['Es'][1]: 1257 sig = self.sigDict[phfx+'Es']*1.e5 1258 text = G2mth.ValEsd(parm,sig) 1259 sig = 1.0e3 1260 parm = extParms['Es'][0]*1.e5 1261 if extParms['Es'][1]: 1262 sig = self.sigDict[phfx+'Es']*1.e5 1263 text += G2mth.ValEsd(parm,sig) 1264 WriteCIFitem('_refine_ls_extinction_coef',text) 1265 WriteCIFitem('_refine_ls_extinction_expression','Becker & Coppens (1974). Acta Cryst. A30, 129147') 1266 1267 WriteCIFitem('_refine_ls_wR_factor_gt ','%.4f'%(histblk['wR']/100.)) 1268 WriteCIFitem('_refine_ls_R_factor_gt ','%.4f'%(histblk[hfx+'Rf']/100.)) 1269 WriteCIFitem('_refine_ls_R_Fsqd_factor ','%.4f'%(histblk[hfx+'Rf^2']/100.)) 1228 1270 def EditAuthor(event=None): 1229 1271 'dialog to edit the CIF author info' … … 1262 1304 if instrname is None: 1263 1305 d['InstrName'] = '' 1264 return G2 gd.CallScrolledMultiEditor(1306 return G2ctrls.CallScrolledMultiEditor( 1265 1307 self.G2frame,dictlist,keylist, 1266 1308 prelbl=range(1,len(dictlist)+1), … … 1619 1661 1620 1662 # check there is an instrument name for every histogram 1663 self.ifPWDR = False 1664 self.ifHKLF = False 1621 1665 if not self.quickmode: 1622 1666 invalid = 0 1623 1667 key3 = 'InstrName' 1624 1668 for hist in self.Histograms: 1625 if hist.startswith("PWDR"): 1669 if hist.startswith("PWDR"): 1670 self.ifPWDR = True 1626 1671 key2 = "Sample Parameters" 1627 1672 d = self.Histograms[hist][key2] 1628 elif hist.startswith("HKLF"): 1673 elif hist.startswith("HKLF"): 1674 self.ifHKLF = True 1629 1675 key2 = "Instrument Parameters" 1630 1676 d = self.Histograms[hist][key2][0] … … 2397 2443 if rng[0]: mn = hint(rng[0]) 2398 2444 if rng[1]: mx = hint(rng[1]) 2399 ent = G2 gd.ValidatedTxtCtrl(2445 ent = G2ctrls.ValidatedTxtCtrl( 2400 2446 self,dct,item,typeHint=hint,min=mn,max=mx, 2401 2447 CIFinput=True, … … 2404 2450 return ent 2405 2451 rw1 = rw.ResizeWidget(self) 2406 ent = G2 gd.ValidatedTxtCtrl(2452 ent = G2ctrls.ValidatedTxtCtrl( 2407 2453 rw1,dct,item,size=(100, 20), 2408 2454 style=wx.TE_MULTILINEwx.TE_PROCESS_ENTER,
Note: See TracChangeset
for help on using the changeset viewer.