Changeset 1658


Ignore:
Timestamp:
Feb 16, 2015 3:42:17 PM (7 years ago)
Author:
vondreele
Message:

correct bugs in single crystal cif output - now good for TOF data
includes extinction & correct r-value defns.
added a couple more lists of SS space groups

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r1657 r1658  
    7676    phasePage.SetScrollbars(10,10,Size[0]/10-4,Size[1]/10-1)
    7777    mainFrame.setSizePosLeft(Size)
     78    mainFrame.SendSizeEvent()
    7879   
    7980def UpdatePhaseData(G2frame,Item,data,oldPage):
     
    10691070            G2gd.HorizontalLine(mainSizer,General)
    10701071            mainSizer.Add(MCSASizer())
     1072        G2frame.dataFrame.SetStatusText('')
    10711073        SetPhaseWindow(G2frame.dataFrame,General,mainSizer)
    1072         G2frame.dataFrame.SetStatusText('')
    10731074
    10741075################################################################################
  • trunk/GSASIIpy3.py

    r1447 r1658  
    7373    :returns: a string with <= maxdigits characters (usually). 
    7474    '''
     75    if 'str' in str(type(val)) and (val == '?' or val == '.'):
     76        return val       
    7577    if maxdigits is None:
    7678        digits = [10,2]
     
    130132    :returns: a string with <= maxdigits characters (I hope). 
    131133    '''
     134    if 'str' in str(type(val)) and (val == '?' or val == '.'):
     135        return val       
    132136    if treatAsZero is not None:
    133137        if abs(val) < treatAsZero:
  • trunk/GSASIIspc.py

    r1643 r1658  
    22992299#28       
    23002300    '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)'],
    23072312#29       
    23082313    'P c a 21':['(00g)','(00g)0ss','(01/2g)','(1/20g)',
     
    25792584    'A c m m':[],
    25802585#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'],
    25872598#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',
    25912602        '(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',
    25932604        '(a01)00s','(a01)0ss','(1b0)','(1b0)s00','(1b0)00s','(1b0)s0s'],
    25942605#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'],       
    25982607#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'],
    26012610#72       
    26022611    'I b a m':['(00g)','(00g)s00','(00g)0s0','(00g)ss0','(a00)','(a00)0s0',
  • trunk/exports/G2export_CIF.py

    r1496 r1658  
    4040import GSASIIIO as G2IO
    4141import GSASIIgrid as G2gd
     42import GSASIIctrls as G2ctrls
    4243import GSASIIstrIO as G2stIO
    4344import GSASIImath as G2mth
     
    111112            More could be done here, but this is a good start.
    112113            '''
    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')
    115117            #WriteCIFitem('_refine_ls_shift/su_max',DAT1)
    116118            #WriteCIFitem('_refine_ls_shift/su_mean',DAT2)
     
    118120            #WriteCIFitem('_refine_diff_density_min',rhomin)
    119121            WriteCIFitem('_computing_structure_refinement','GSAS-II (Toby & Von Dreele, J. Appl. Cryst. 46, 544-549, 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)               
    120129            try:
    121130                vars = str(len(self.OverallParms['Covariance']['varyList']))
     
    12211230            if not self.quickmode: # statistics only in a full CIF
    12221231                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','Becker-Coppens %s %s'%(extModel,extType))
     1238                    sig = -1.e-3
     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.0e-3
     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, 129-147')
     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.))
    12281270        def EditAuthor(event=None):
    12291271            'dialog to edit the CIF author info'
     
    12621304                if instrname is None:
    12631305                    d['InstrName'] = ''
    1264             return G2gd.CallScrolledMultiEditor(
     1306            return G2ctrls.CallScrolledMultiEditor(
    12651307                self.G2frame,dictlist,keylist,
    12661308                prelbl=range(1,len(dictlist)+1),
     
    16191661
    16201662        # check there is an instrument name for every histogram
     1663        self.ifPWDR = False
     1664        self.ifHKLF = False
    16211665        if not self.quickmode:
    16221666            invalid = 0
    16231667            key3 = 'InstrName'
    16241668            for hist in self.Histograms:
    1625                 if hist.startswith("PWDR"):
     1669                if hist.startswith("PWDR"):
     1670                    self.ifPWDR = True
    16261671                    key2 = "Sample Parameters"
    16271672                    d = self.Histograms[hist][key2]
    1628                 elif hist.startswith("HKLF"):
     1673                elif hist.startswith("HKLF"):
     1674                    self.ifHKLF = True
    16291675                    key2 = "Instrument Parameters"
    16301676                    d = self.Histograms[hist][key2][0]                   
     
    23972443                    if rng[0]: mn = hint(rng[0])
    23982444                    if rng[1]: mx = hint(rng[1])
    2399                     ent = G2gd.ValidatedTxtCtrl(
     2445                    ent = G2ctrls.ValidatedTxtCtrl(
    24002446                        self,dct,item,typeHint=hint,min=mn,max=mx,
    24012447                        CIFinput=True,
     
    24042450                    return ent
    24052451        rw1 = rw.ResizeWidget(self)
    2406         ent = G2gd.ValidatedTxtCtrl(
     2452        ent = G2ctrls.ValidatedTxtCtrl(
    24072453            rw1,dct,item,size=(100, 20),
    24082454            style=wx.TE_MULTILINE|wx.TE_PROCESS_ENTER,
Note: See TracChangeset for help on using the changeset viewer.