Changeset 475 for trunk/GSASIIIO.py


Ignore:
Timestamp:
Feb 7, 2012 3:21:36 PM (11 years ago)
Author:
toby
Message:

fix .EXP import with short SH record, more diagnostics on EXP/PDB read

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIIO.py

    r473 r475  
    14181418            E,SGData = G2spc.SpcGroup(SpGrp)
    14191419        elif 'OD    ' in key:
    1420             SHdata = EXPphase[key].split()
    1421             textureData['Order'] = int(SHdata[0])
    1422             textureData['Model'] = shModels[int(SHdata[2])]
    1423             textureData['Sample omega'] = [False,float(SHdata[6])]
    1424             textureData['Sample chi'] = [False,float(SHdata[7])]
    1425             textureData['Sample phi'] = [False,float(SHdata[8])]
    1426             shNcof = int(SHdata[1])
     1420            SHdata = EXPphase[key].split() # may not have all 9 values
     1421            SHvals = 9*[0]
     1422            for i in range(9):
     1423                try:
     1424                    float(SHdata[i])
     1425                    SHvals[i] = SHdata[i]
     1426                except:
     1427                    pass
     1428            textureData['Order'] = int(SHvals[0])
     1429            textureData['Model'] = shModels[int(SHvals[2])]
     1430            textureData['Sample omega'] = [False,float(SHvals[6])]
     1431            textureData['Sample chi'] = [False,float(SHvals[7])]
     1432            textureData['Sample phi'] = [False,float(SHvals[8])]
     1433            shNcof = int(SHvals[1])
    14271434    Atoms = []
    14281435    if Ptype == 'nuclear':
Note: See TracChangeset for help on using the changeset viewer.