Changeset 3159


Ignore:
Timestamp:
Nov 22, 2017 12:02:34 PM (4 years ago)
Author:
vondreele
Message:

new reader for PE 4343 detector

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/imports/G2img_1TIF.py

    r3158 r3159  
    322322                print ('Read PE 4Kx4K tiff file: '+filename)
    323323                image = np.array(np.frombuffer(File.read(4*Npix),dtype=np.float32)/2.**4,dtype=np.int32)
    324 #                image = np.fromfile(File,dtype=np.uint,count=4*Npix)[:Npix]
    325 #                if np.max(image) > 2**31:
    326 #                    image = np.array(image-2**30,dtype=np.int32)
    327 #                else:
    328 #                    image = np.array(image,dtype=np.int32)
    329 #                arry = ar.array('I',File.read(4*Npix))
    330 #                image = np.array(arry)/2**16           
    331324        elif IFD[273][2][0] == 4096:
    332325            tifType = 'Rayonix'
     
    335328            print ('Read Rayonix MX300HE tiff file: '+filename)
    336329            image = np.array(np.frombuffer(File.read(2*Npix),dtype=np.uint16),dtype=np.int32)
    337 #            image = np.fromfile(File,dtype=np.int16,count=2*Npix)[:Npix]
    338 #            image = np.array(ar.array('H',File.read(2*Npix)),dtype=np.int32)
    339330    elif sizexy == [391,380]:
    340331        pixy = [109.92,109.92]
     
    353344        File.seek(110)
    354345        image = np.array(np.frombuffer(File.read(Npix),dtype=np.uint8),dtype=np.int32)
     346    elif sizexy == [2880,2880]:
     347        pixy = [150.,150.]
     348        File.seek(8)
     349        image = np.array(np.frombuffer(File.read(Npix*4),dtype=np.uint32)//1024,dtype=np.int32)
    355350#    elif sizexy == [960,960]:
    356351#        tiftype = 'PE-BE'
Note: See TracChangeset for help on using the changeset viewer.