Changeset 2413


Ignore:
Timestamp:
Aug 9, 2016 1:53:45 PM (5 years ago)
Author:
vondreele
Message:

fix bug in ge image importer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/imports/G2img_GE.py

    r2409 r2413  
    121121    more = False
    122122    File = open(filename,'rb')
    123     if '.sum' in filename:
     123    if os.path.splitext(filename) 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 '.avg' or '.cor' in filename in filename:
     128    elif os.path.splitext(filename) in ['.avg','.cor']:
    129129        File.seek(0,2)
    130130        last = File.tell()
Note: See TracChangeset for help on using the changeset viewer.