Changeset 3783


Ignore:
Timestamp:
Jan 16, 2019 7:56:58 AM (3 years ago)
Author:
vondreele
Message:

fix Bruker read problem - checked with 1 & 2 block RAW 1.01 files
add I-monoclinic to list of possible lattices for powder indexing
fix wavelength issue in PWDRcif import

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r3782 r3783  
    80948094        if not data:
    80958095            data.append([0,0.0,4,25.0,0,'P1',1.,1.,1.,90.,90.,90.,1.,'P 1']) #zero error flag, zero value, max Nc/No, start volume
    8096             data.append([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])      #Bravais lattice flags
     8096            data.append([0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0])      #Bravais lattice flags
    80978097            data.append([])                                 #empty cell list
    80988098            data.append([])                                 #empty dmin
  • trunk/GSASIIindex.py

    r3634 r3783  
    111111        A[2] *= R
    112112        A[3] = A[4] = A[5] = 0.       
    113     elif Bravais in [13,14]:        #monoclinic
     113    elif Bravais in [13,14,15]:        #monoclinic
    114114        A[0] *= R
    115115        A[1] *= R
     
    148148        c = abc[2]
    149149        alp = bet = gam = 90
    150     elif Bravais in [13,14]:        #monoclinic - C,P - a<c convention
     150    elif Bravais in [13,14,15]:        #monoclinic - C,P - a<c convention
    151151        ac = [ranaxis(dmin,dmax),ranaxis(dmin,dmax)]
    152         if Bravais == 13:
     152        if Bravais in [13,14]:
    153153            ac.sort()
    154154        a = ac[0]
     
    423423    elif ibrav in [7,8,9,10,11,12]:
    424424        return [values[0],values[1],values[2],0,0,0]
    425     elif ibrav in [13,14]:
     425    elif ibrav in [13,14,15]:
    426426        return [values[0],values[1],values[2],0,values[3],0]
    427427    else:
     
    436436    elif ibrav in [7,8,9,10,11,12]:
    437437        return [A[0],A[1],A[2]]
    438     elif ibrav in [13,14]:
     438    elif ibrav in [13,14,15]:
    439439        return [A[0],A[1],A[2],A[4]]
    440440    else:
     
    446446    elif ibrav in [7,8,9,10,11,12]:
    447447        Nskip = 3
    448     elif ibrav in [13,14]:
     448    elif ibrav in [13,14,15]:
    449449        Nskip = 4
    450450    else:
     
    478478        elif ibrav in [7,8,9,10,11,12]:
    479479            derv = [H[0]*H[0],H[1]*H[1],H[2]*H[2]]
    480         elif ibrav in [13,14]:
     480        elif ibrav in [13,14,15]:
    481481            derv = [H[0]*H[0],H[1]*H[1],H[2]*H[2],H[0]*H[2]]
    482482        else:
     
    510510    elif ibrav in [7,8,9,10,11,12]:
    511511        derv = [H[0]*H[0],H[1]*H[1],H[2]*H[2]]
    512     elif ibrav in [13,14]:
     512    elif ibrav in [13,14,15]:
    513513        derv = [H[0]*H[0],H[1]*H[1],H[2]*H[2],H[0]*H[2]]
    514514    else:
     
    557557    elif ibrav in [7,8,9,10,11,12]:
    558558        derv = [HM[0]*HM[0],HM[1]*HM[1],HM[2]*HM[2]]
    559     elif ibrav in [13,14]:
     559    elif ibrav in [13,14,15]:
    560560        derv = [HM[0]*HM[0],HM[1]*HM[1],HM[2]*HM[2],HM[0]*HM[2]]
    561561    else:
     
    610610    elif ibrav in [7,8,9,10,11,12]:
    611611        derv = [H[0]*H[0],H[1]*H[1],H[2]*H[2]]
    612     elif ibrav in [13,14]:
     612    elif ibrav in [13,14,15]:
    613613        derv = [H[0]*H[0],H[1]*H[1],H[2]*H[2],H[0]*H[2]]
    614614    else:
     
    654654    elif ibrav in [7,8,9,10,11,12]:
    655655        derv = [HM[0]*HM[0],HM[1]*HM[1],HM[2]*HM[2]]
    656     elif ibrav in [13,14]:
     656    elif ibrav in [13,14,15]:
    657657        derv = [HM[0]*HM[0],HM[1]*HM[1],HM[2]*HM[2],HM[0]*HM[2]]
    658658    else:
     
    836836# A = 0 for random cell, volume normalized to V1;
    837837# returns number of generated hkls, M20, X20 & A for best found
    838     mHKL = [3,3,3, 5,5, 5,5, 7,7,7,7,7,7, 9,9, 10]
     838    mHKL = [3,3,3, 5,5, 5,5, 7,7,7,7,7,7, 9,9,9, 10]
    839839    dmin = getDmin(peaks)-0.05
    840840    amin = 2.5
     
    927927        'Tetragonal-I','Tetragonal-P','Orthorhombic-F','Orthorhombic-I','Orthorhombic-A',
    928928        'Orthorhombic-B','Orthorhombic-C',
    929         'Orthorhombic-P','Monoclinic-C','Monoclinic-P','Triclinic']
     929        'Orthorhombic-P','Monoclinic-I','Monoclinic-C','Monoclinic-P','Triclinic']
    930930    tries = ['1st','2nd','3rd','4th','5th','6th','7th','8th','9th','10th']
    931     N1s = [1,1,1,   5,5,  5,5, 50,50,50,50,50,50,  50,50, 200]
    932     N2s = [1,1,1,   2,2,  2,2,     2,2,2,2,2,2,   2,2,   4]
    933     Nm  = [1,1,1,   1,1,  1,1,     1,1,1,1,1,1,   2,2,   4]
     931    N1s = [1,1,1,   5,5,  5,5, 50,50,50,50,50,50,  50,50,50, 200]
     932    N2s = [1,1,1,   2,2,  2,2,     2,2,2,2,2,2,   2,2,2,   4]
     933    Nm  = [1,1,1,   1,1,  1,1,     1,1,1,1,1,1,   2,2,2,   4]
    934934    notUse = 0
    935935    for peak in peaks:
  • trunk/GSASIIlattice.py

    r3774 r3783  
    10961096            * 11 C orthorhombic
    10971097            * 12 P orthorhombic
    1098             * 13 C monoclinic
    1099             * 14 P monoclinic
    1100             * 15 P triclinic
     1098            * 13 I monoclinic
     1099            * 14 C monoclinic
     1100            * 15 P monoclinic
     1101            * 16 P triclinic
    11011102           
    11021103    :param A: reciprocal metric tensor elements as [G11,G22,G33,2*G12,2*G13,2*G23]
     
    11081109    elif Bravais in [10,]:
    11091110        Cent = 'B'
    1110     elif Bravais in [11,13]:
     1111    elif Bravais in [11,14]:
    11111112        Cent = 'C'
    1112     elif Bravais in [1,5,8]:
     1113    elif Bravais in [1,5,8,13]:
    11131114        Cent = 'I'
    11141115    elif Bravais in [0,7]:
     
    11211122    dminsq = 1./(dmin**2)
    11221123    HKL = []
    1123     if Bravais == 15:                       #triclinic
     1124    if Bravais == 16:                       #triclinic
    11241125        for l in range(-Hmax[2],Hmax[2]+1):
    11251126            for k in range(-Hmax[1],Hmax[1]+1):
     
    11321133                    if 0 < rdsq <= dminsq:
    11331134                        HKL.append([h,k,l,rdsq2d(rdsq,6),-1])
    1134     elif Bravais in [13,14]:                #monoclinic - b unique
     1135    elif Bravais in [13,14,15]:                #monoclinic - b unique
    11351136        Hmax = SwapIndx(2,Hmax)
    11361137        for h in range(Hmax[0]+1):
  • trunk/GSASIIpwdGUI.py

    r3761 r3783  
    29912991    SPGlist = G2spc.spglist
    29922992    bravaisSymb = ['Fm3m','Im3m','Pm3m','R3-H','P6/mmm','I4/mmm','P4/mmm',
    2993         'Fmmm','Immm','Ammm','Bmmm','Cmmm','Pmmm','C2/m','P2/m','C1','P1']
     2993        'Fmmm','Immm','Ammm','Bmmm','Cmmm','Pmmm','I2/m','C2/m','P2/m','C1','P1']
    29942994    spaceGroups = ['F m 3 m','I m 3 m','P m 3 m','R 3 m','P 6/m m m','I 4/m m m',
    2995         'P 4/m m m','F m m m','I m m m','A m m m','B m m m','C m m m','P m m m','C 2/m','P 2/m','C -1','P -1']
     2995        'P 4/m m m','F m m m','I m m m','A m m m','B m m m','C m m m','P m m m','I 2/m','C 2/m','P 2/m','C -1','P -1']
    29962996    Inst = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Instrument Parameters'))[0]
    29972997    Limits = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Limits'))[1]
     
    30173017        elif controls[5] in ['Fmmm','Immm','Ammm','Bmmm','Cmmm','Pmmm']:
    30183018            controls[9] = controls[10] = controls[11] = 90.
    3019         elif controls[5] in ['C2/m','P2/m']:
     3019        elif controls[5] in ['C2/m','P2/m','I2/m']:
    30203020            controls[9] = controls[11] = 90.  # b unique
    30213021#        if len(controls) < 13: controls.append(0)
     
    31623162            Obj.SetValue(controls[6+ObjId])
    31633163            controls[9] = controls[10] = controls[11] = 90.0
    3164         elif controls[5] in ['C2/m','P2/m']:
     3164        elif controls[5] in ['I2/m','C2/m','P2/m']:
    31653165            controls[9] = controls[11] = 90.0
    31663166            if ObjId != 3:
     
    40784078    if len(bravais) < 16:
    40794079        bravais += [0,0,]
     4080    if len(bravais) < 17:
     4081        bravais += [0,]
    40804082    SGData = ssopt.get('SGData',G2spc.SpcGroup(controls[13])[1])
    40814083    G2frame.GPXtree.SetItemPyData(UnitCellsId,data)            #update with volume
     
    40834085        'Tetragonal-I','Tetragonal-P','Orthorhombic-F','Orthorhombic-I','Orthorhombic-A',
    40844086        'Orthorhombic-B','Orthorhombic-C','Orthorhombic-P',
    4085         'Monoclinic-C','Monoclinic-P','Triclinic','Triclinic']
     4087        'Monoclinic-I','Monoclinic-C','Monoclinic-P','Triclinic','Triclinic']
    40864088    cellGUIlist = [[[0,1,2],4,zip([" Unit cell: a = "," Vol = "],[(10,5),"%.3f"],[True,False],[0,0])],
    40874089    [[3,4,5,6],6,zip([" Unit cell: a = "," c = "," Vol = "],[(10,5),(10,5),"%.3f"],[True,True,False],[0,2,0])],
    40884090    [[7,8,9,10,11,12],8,zip([" Unit cell: a = "," b = "," c = "," Vol = "],[(10,5),(10,5),(10,5),"%.3f"],
    40894091        [True,True,True,False],[0,1,2,0])],
    4090     [[13,14],10,zip([" Unit cell: a = "," b = "," c = "," beta = "," Vol = "],
     4092    [[13,14,15],10,zip([" Unit cell: a = "," b = "," c = "," beta = "," Vol = "],
    40914093        [(10,5),(10,5),(10,5),(10,3),"%.3f"],[True,True,True,True,False],[0,1,2,4,0])],
    4092     [[15,16],8,zip([" Unit cell: a = "," b = "," c = "," Vol = "," alpha = "," beta = "," gamma = "],
     4094    [[16,17],8,zip([" Unit cell: a = "," b = "," c = "," Vol = "," alpha = "," beta = "," gamma = "],
    40934095        [(10,5),(10,5),(10,5),"%.3f",(10,3),(10,3),(10,3)],
    40944096        [True,True,True,False,True,True,True],[0,1,2,0,3,4,5])]]
  • trunk/imports/G2phase_CIF.py

    r3736 r3783  
    191191                        SpGrp = SpGrp.replace("1'",'')
    192192                        sspgrp[1] = sspgrp[1][:-1]  #take off extra 's'
    193                     SpGrp = G2spc.StandardizeSpcName(SpGrp)
     193#                    SpGrp = G2spc.StandardizeSpcName(SpGrp)
    194194                    self.Phase['General']['Type'] = 'nuclear'
    195195                if not SpGrp:
  • trunk/imports/G2pwd_BrukerRAW.py

    r3421 r3783  
    160160                        step = st.unpack('<d',fp.read(8))[0]
    161161                        pos += headLen      #position at start of data block
    162                         fp.seek(pos) 
     162                        if blockNum == nBlock:
     163                            fp.seek(pos-40)
     164                        else:
     165                            fp.seek(pos) 
    163166                        x = np.array([start2Th+i*step for i in range(nSteps)])
    164167                        y = np.array([max(1.,st.unpack('<f',fp.read(4))[0]) for i in range(nSteps)])
  • trunk/imports/G2pwd_CIF.py

    r3137 r3783  
    335335                w,e = cif.get_number_with_esd(val)
    336336                if w: wl.append(w)
    337             if wl: self.instdict['wave'] = wl
     337            if wl:
     338                if len(wl) > 1:
     339                    self.instdict['wave'] = wl
     340                else:
     341                    self.instdict['wave'] = wl[0]
    338342        if cf[blk].get('_diffrn_ambient_temperature'):
    339343            val = cf[blk]['_diffrn_ambient_temperature']
Note: See TracChangeset for help on using the changeset viewer.