Changeset 2460


Ignore:
Timestamp:
Sep 6, 2016 5:15:21 PM (5 years ago)
Author:
vondreele
Message:

further fixes to edf importer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIIO.py

    r2459 r2460  
    585585    File.seek(fileSize-imSize)
    586586    if dType == 'UnsignedShort':       
    587         image = np.array(ar.array('H',File.read(imSize)),dtype=np.int32)
    588     elif dType in ['UnsignedInt','UnsignedLong']:
    589         image = np.array(ar.array('L',File.read(imSize)),dtype=np.int32)
    590     elif dType in ['SignedInteger','SignedLong']:
    591         image = np.array(ar.array('l',File.read(imSize)),dtype=np.int32)
     587        image = np.array(np.frombuffer(File.read(imSize),dtype=np.int16),dtype=np.int32)
     588    else:
     589        image = np.array(np.frombuffer(File.read(imSize),dtype=np.int32),dtype=np.int32)
    592590    image = np.reshape(image,(sizexy[1],sizexy[0]))
    593591    data = {'pixelSize':pixSize,'wavelength':wave,'distance':dist,'center':cent,'size':sizexy}
Note: See TracChangeset for help on using the changeset viewer.