Changeset 944


Ignore:
Timestamp:
Jun 5, 2013 4:13:00 PM (9 years ago)
Author:
vondreele
Message:

fix l/r u/d issues in some images (MAR mostly)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIIO.py

    r942 r944  
    379379    File.close()
    380380    image = np.zeros(shape=(size,size),dtype=np.int32)
    381     image = pf.pack_f(len(raw),raw,size,image)
     381    image = np.flipud(pf.pack_f(len(raw),raw,size,image).T)  #transpose to get it right way around & flip
    382382    if imageOnly:
    383         return image.T              #transpose to get it right way around
     383        return image
    384384    else:
    385         return head,data,Npix,image.T
     385        return head,data,Npix,image
    386386
    387387def GetTifData(filename,imageOnly=False):
     
    444444        if not imageOnly:
    445445            print 'Read MAR CCD tiff file: ',filename
    446         marFrame = rmf.marFrame(File,byteOrd,IFD)
    447         image = np.array(np.asarray(marFrame.image),dtype=np.int32)
    448         tifType = marFrame.filetitle
    449         pixy = (marFrame.pixelsizeX/1000.0,marFrame.pixelsizeY/1000.0)
    450         head = marFrame.outputHead()
     446        marFrame = rmf.marFrame(File,byteOrd,IFD)
     447        image = np.flipud(np.array(np.asarray(marFrame.image),dtype=np.int32))
     448        tifType = marFrame.filetitle
     449        pixy = (marFrame.pixelsizeX/1000.0,marFrame.pixelsizeY/1000.0)
     450        head = marFrame.outputHead()
    451451    elif 272 in IFD:
    452452        ifd = IFD[272]
Note: See TracChangeset for help on using the changeset viewer.