Changeset 4920


Ignore:
Timestamp:
Jun 3, 2021 8:12:01 PM (4 months ago)
Author:
vondreele
Message:

fix import of 2nd type of Pilatus images.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/imports/G2img_1TIF.py

    r4917 r4920  
    112112        IFD = int(st.unpack(byteOrd+'i',File.read(4))[0])       
    113113    else:
    114 #        print (tag)
    115114        lines = ['not a detector tiff file',]
    116115        return lines,0,0,0
     
    215214        File.seek(IFD[270][2][0])
    216215        S = File.read(IFD[273][2][0]-IFD[270][2][0])
    217         if b'ImageJ' in S:
     216        if b'Pilatus3' in S:
     217            tifType = 'Pilatus3'
     218            dataType = 0
     219            pixy = [172.,172.]
     220            File.seek(IFD[273][2][0])
     221            G2fil.G2Print ('Read Pilatus3 tiff file: '+filename)
     222            image = np.array(np.frombuffer(File.read(4*Npix),dtype=np.int32),dtype=np.int32)
     223        elif b'ImageJ' in S:
    218224            tifType = 'ImageJ'
    219225            dataType = 0
Note: See TracChangeset for help on using the changeset viewer.