Changeset 28


Ignore:
Timestamp:
Feb 8, 2010 9:53:27 AM (12 years ago)
Author:
vondreel
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIIO.py

    r24 r28  
    396396    File.close()
    397397    return [x,y,w,yc,yb,yd]
     398   
     399def GetGEsumData(filename):
     400    import array as ar
     401    print 'Read GE sum file: ',filename
     402    File = open(filename,'rb')
     403    size = 2048
     404    image = np.zeros(shape=(size,size),dtype=np.int32)
     405    head = ['GE detector sum data',]
     406    row = 0
     407    pos = 0
     408    while row < size:
     409        File.seek(pos)
     410        line = ar.array('f',File.read(4*size))
     411        image[row] = np.asarray(line)
     412        row += 1
     413        pos += 4*size
     414    data = {'pixelSize':(200,200),'wavelength':0.10,'distance':250.0,'center':[204.8,204.8]} 
     415    return head,data,size,image
     416    File.close()   
    398417       
    399418def GetImgData(filename):
Note: See TracChangeset for help on using the changeset viewer.