Changeset 246 for trunk/GSASIIIO.py


Ignore:
Timestamp:
Feb 13, 2011 6:20:15 PM (11 years ago)
Author:
vondreele
Message:

fix copy controls for images - needed deepcopy
multi frame GE detector images now automatically summed when read.
also earlier commit - image calibration will compute a "suggested" new wavelength - not imposed however as it may be wrong.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIIO.py

    r244 r246  
    467467   
    468468def GetGEsumData(filename,imageOnly=False):
     469    import struct as st
    469470    import array as ar
    470471    if not imageOnly:
     
    479480    else:
    480481        head = ['GE detector raw data from APS 1-ID',]
     482        File.seek(18)
     483        size,nframes = st.unpack('<ih',File.read(6))
    481484        sizexy = [2048,2048]
    482485        pos = 8192
     
    489492    else:
    490493        image = np.array(ar.array('H',File.read(2*Npix)),dtype=np.int32)
     494        while nframes > 1:
     495            image += np.array(ar.array('H',File.read(2*Npix)),dtype=np.int32)
     496            nframes -= 1
    491497    image = np.reshape(image,(sizexy[1],sizexy[0]))
    492498    data = {'pixelSize':(200,200),'wavelength':0.15,'distance':250.0,'center':[204.8,204.8],'size':sizexy} 
Note: See TracChangeset for help on using the changeset viewer.