Changeset 2418


Ignore:
Timestamp:
Aug 10, 2016 2:37:01 PM (5 years ago)
Author:
vondreele
Message:

another fix to GE importer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/imports/G2img_GE.py

    r2413 r2418  
    121121    more = False
    122122    File = open(filename,'rb')
    123     if os.path.splitext(filename) in ['.sum',]:
     123    if filename.split('.')[-1] in ['sum',]:
    124124        head = ['GE detector sum  data from APS 1-ID',]
    125125        sizexy = [2048,2048]
    126126        Npix = sizexy[0]*sizexy[1]
    127127        image = np.array(ar.array('f',File.read(4*Npix)),dtype=np.int32)
    128     elif os.path.splitext(filename) in ['.avg','.cor']:
     128    elif filename.split('.')[-1] in ['avg','cor']:
    129129        File.seek(0,2)
    130130        last = File.tell()
Note: See TracChangeset for help on using the changeset viewer.