Ignore:
Timestamp:
Nov 21, 2017 3:55:50 PM (6 years ago)
Author:
vondreele
Message:

add image correction via a gain map

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/imports/G2img_1TIF.py

    r3152 r3158  
    236236            File.seek(IFD[273][2][0])
    237237            print ('Read ImageJ tiff file: '+filename)
    238 #            image = ar.array('H',File.read(2*Npix))
    239 #            image = File.read(2*Npix,dtype=np.uint16)
    240238            if IFD[258][2][0] == 32:
    241239                image = File.read(4*Npix)
     
    245243                pixy = [109.92,109.92]      #for LCLS ImageJ tif files
    246244                image = np.array(np.frombuffer(image,dtype=byteOrd+'u2'),dtype=np.int32)
    247 #            if '>' in byteOrd:
    248 #                image.byteswap()
    249 #            image = np.array(np.frombuffer(image),dtype=np.int32)
    250 #            image = np.array(np.asarray(image,dtype='H'),dtype=np.int32)           
     245        else:   #gain map from  11-ID-C?
     246            pixy = [200.,200.]
     247            tifType = 'Gain map'
     248            image = File.read(4*Npix)
     249            image = np.array(np.frombuffer(image,dtype=byteOrd+'f4')*1000,dtype=np.int32)
     250           
    251251    elif 262 in IFD and IFD[262][2][0] > 4:
    252252        tifType = 'DND'
Note: See TracChangeset for help on using the changeset viewer.