Changeset 1127
- Timestamp:
- Oct 29, 2013 11:42:23 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIIO.py
r1122 r1127 2034 2034 name += '-1' 2035 2035 self.Histograms[name] = {} 2036 # the main info goes into Data, but the 0th 2037 # element contains refinement results, carry 2038 # that over too now. 2036 2039 self.Histograms[name]['Data'] = self.G2frame.PatternTree.GetItemPyData(item)[1] 2040 self.Histograms[name][0] = self.G2frame.PatternTree.GetItemPyData(item)[0] 2037 2041 item2, cookie2 = self.G2frame.PatternTree.GetFirstChild(item) 2038 2042 while item2: -
trunk/GSASIIgrid.py
r1126 r1127 3253 3253 mainSizer.Add(wx.StaticText(G2frame.dataDisplay,-1,' For phase '+name+':')) 3254 3254 mainSizer.Add(wx.StaticText(G2frame.dataDisplay,-1, 3255 ' Unweighted phase residuals RF^2: %.3f%%, RF: %.3f%% on %d reflections '% \3255 u' Unweighted phase residuals RF\u00b2: %.3f%%, RF: %.3f%% on %d reflections '% \ 3256 3256 (data[0][pfx+'Rf^2'],data[0][pfx+'Rf'],data[0][value]))) 3257 3257 mainSizer.Add((5,5),) -
trunk/GSASIIobj.py
r1126 r1127 353 353 Reflection Lists \ A dict with an entry for each phase in the 354 354 histogram. The contents of each dict item 355 is a list of reflections as described in the356 :ref:`Powder Reflections <PowderRefl_table>`355 is a dict containing reflections, as described in 356 the :ref:`Powder Reflections <PowderRefl_table>` 357 357 description. 358 358 Instrument Parameters \ A list containing two dicts where the possible … … 457 457 single: Data object descriptions; Powder Reflections 458 458 459 For every phase in a histogram, the ``Reflection Lists`` value is a list of 460 reflections. The items in that list are documented below. 459 For every phase in a histogram, the ``Reflection Lists`` value is a dict 460 one element of which is `'RefList'`, which is a np.array containing 461 reflections. The columns in that array are documented below. 461 462 462 463 ========== ==================================================== … … 472 473 9 :math:`F_{calc}^2` 473 474 10 reflection phase, in degrees 474 11 the equivalent reflections as a (m x 3) 475 np.array, where m is 0.5 * multiplicity. Note 476 that Freidel pairs, (-h,-k-,l), are not 477 included. 478 12 phase shift for each of the equivalent 479 reflections as a length (m) array 480 13 intensity correction for reflection, this times 475 11 intensity correction for reflection, this times 481 476 :math:`F_{obs}^2` or :math:`F_{calc}^2` gives Iobs or Icalc 482 14 dict with the form factor (f or b) by atom type483 symbol at the reflection position.484 477 ========== ==================================================== 485 478 … … 490 483 491 484 .. index:: 492 single: Single Cry tsal data object description485 single: Single Crystal data object description 493 486 single: Data object descriptions; Single crystal data 494 487 … … 508 501 ====================== =============== ==================================================== 509 502 Data 510 A list of lists, where each inner item511 is an individual reflection503 A dict that contains the 504 reflection table, 512 505 as described in the 513 506 :ref:`Single Crystal Reflections … … 549 542 single: Data object descriptions; Single Crystal Reflections 550 543 551 For every phase in a histogram, the ``Reflection Lists`` value is a list of 552 reflections. The items in that list are documented below. 544 For every simgle crystal a histogram, the ``'Data'`` item contains 545 the structure factors as an np.array in item `'RefList'`. 546 The columns in that array are documented below. 553 547 554 548 ========== ==================================================== … … 564 558 9 :math:`F_{calc}^2T` 565 559 10 reflection phase, in degrees 566 11 the equivalent reflections as a (m x 3) 567 np.array. 568 12 phase shift for each of the equivalent 569 reflections as a length (m) array 570 13 intensity correction for reflection, this times 560 11 intensity correction for reflection, this times 571 561 :math:`F_{obs}^2` or :math:`F_{calc}^2` 572 562 gives Iobs or Icalc 573 (not used in single crystals?)574 14 dict with the form factor (f or b) by atom type575 symbol at the reflection position.576 563 ========== ==================================================== 577 564 -
trunk/exports/G2export_CIF.py
r1126 r1127 1156 1156 'Write out the selected single crystal histogram info' 1157 1157 histblk = self.Histograms[histlbl] 1158 1158 1159 #refprx = '_refln.' # mm 1159 1160 refprx = '_refln_' # normal … … 1200 1201 dmin = min(dmin,ref[4]) 1201 1202 WriteCIFitem(s) 1202 WriteReflStat(refcount,hklmin,hklmax,dmin,dmax) 1203 hId = histblk['hId'] 1204 pfx = '0:'+str(hId)+':' 1205 WriteCIFitem('_reflns_wR_factor_obs ','%.4f'%(histblk['wR']/100.)) 1206 WriteCIFitem('_reflns_R_F_factor_obs ','%.4f'%(histblk[pfx+'Rf']/100.)) 1207 WriteCIFitem('_reflns_R_Fsqd_factor_obs','%.4f'%(histblk[pfx+'Rf^2']/100.)) 1203 if not self.quickmode: # statistics only in a full CIF 1204 WriteReflStat(refcount,hklmin,hklmax,dmin,dmax) 1205 hId = histblk[0]['hId'] 1206 pfx = '0:'+str(hId)+':' 1207 WriteCIFitem('_reflns_wR_factor_obs ','%.4f'%(histblk[0]['wR']/100.)) 1208 WriteCIFitem('_reflns_R_F_factor_obs ','%.4f'%(histblk[0][pfx+'Rf']/100.)) 1209 WriteCIFitem('_reflns_R_Fsqd_factor_obs','%.4f'%(histblk[0][pfx+'Rf^2']/100.)) 1208 1210 def EditAuthor(event=None): 1209 1211 'dialog to edit the CIF author info' … … 1565 1567 self.quickmode = False 1566 1568 phasenam = None # include all phases 1567 if self.mode != "full" or len(self.powderDict) + len(self.xtalDict) == 0: 1568 self.quickmode = True 1569 oneblock = True 1570 if len(self.Phases) == 0: 1569 if self.mode == "simple" and self.currentExportType == 'phase': 1570 if len(self.Phases) == 0: # this check is probably not needed 1571 1571 self.G2frame.ErrorDialog( 1572 1572 'No phase present', 1573 1573 'Cannot create a coordinates CIF with no phases') 1574 1574 return 1575 elif len(self.Phases) > 1: # quick mode: get selected phase 1575 self.quickmode = True 1576 oneblock = True 1577 if len(self.Phases) > 1: # quick mode: get selected phase 1576 1578 phasenam = self.phasenam[0] 1577 # will this require a multiblock CIF? 1579 elif self.mode == "simple": # powder/single xtal data export 1580 self.quickmode = True 1581 oneblock = True 1582 # Project export: will this require a multiblock CIF? 1578 1583 elif len(self.Phases) > 1: 1579 1584 oneblock = False … … 1583 1588 oneblock = True 1584 1589 1585 # make sure needed infomation is present1590 # make sure required information is present 1586 1591 # get CIF author name -- required for full CIFs 1587 1592 try: -
trunk/exports/G2export_csv.py
r1123 r1127 192 192 for i,phasenam in enumerate(sorted(histblk['Reflection Lists'])): 193 193 for ( 194 h,k,l,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase, eqlist,phaselist,Icorr,FFdict195 ) in histblk['Reflection Lists'][phasenam] :194 h,k,l,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,Icorr 195 ) in histblk['Reflection Lists'][phasenam]['RefList']: 196 196 self.Write(fmt.format(h,k,l,pos,Fobs,Fcalc,phase,mult,i)) 197 197 self.CloseFile() … … 229 229 fmt = "{:.0f},{:.0f},{:.0f},{:.3f},{:.2f},{:.4f},{:.2f},{:.2f},{:.0f}" 230 230 for ( 231 h,k,l,mult,dsp,Fobs,sigFobs,Fcalc,FobsT,FcalcT,phase, eqlist,phaselist,Icorr,FFdict232 ) in histblk['Data'] :231 h,k,l,mult,dsp,Fobs,sigFobs,Fcalc,FobsT,FcalcT,phase,Icorr 232 ) in histblk['Data']['RefList']: 233 233 self.Write(fmt.format(h,k,l,dsp,Fobs,sigFobs,Fcalc,phase,mult)) 234 234 self.CloseFile() -
trunk/exports/G2export_examples.py
r1123 r1127 195 195 self.Write(80*'=') 196 196 for ( 197 h,k,l,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase, eqlist,phaselist,Icorr,FFdict198 ) in histblk['Reflection Lists'][phasenam] :197 h,k,l,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,Icorr 198 ) in histblk['Reflection Lists'][phasenam]['RefList']: 199 199 self.Write(fmt.format(hklfmt.format(h,k,l),pos,Fobs,Fcalc,phase,mult)) 200 200 self.CloseFile() … … 237 237 self.Write(80*'=') 238 238 for ( 239 h,k,l,mult,dsp,Fobs,sigFobs,Fcalc,FobsT,FcalcT,phase, eqlist,phaselist,Icorr,FFdict240 ) in histblk['Data'] :239 h,k,l,mult,dsp,Fobs,sigFobs,Fcalc,FobsT,FcalcT,phase,Icorr 240 ) in histblk['Data']['RefList']: 241 241 self.Write(fmt.format(hklfmt.format(h,k,l),dsp,Fobs,sigFobs,Fcalc,phase,mult)) 242 242 self.CloseFile()
Note: See TracChangeset
for help on using the changeset viewer.