Changeset 3141


Ignore:
Timestamp:
Oct 26, 2017 1:59:53 PM (4 years ago)
Author:
vondreele
Message:

fix bug in AutoIntegrate? (for py 2.7)
remove a debug print in tif importer
work on cbf image importer - ok for py 2.7 not 3.6

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimgGUI.py

    r3136 r3141  
    31333133                    self.parms,self.IMfileList = self.ReadFiles(files)
    31343134            finally:
    3135                 dlg.Destroy()
     3135                if dlg: dlg.Destroy()
    31363136            if not files:
    31373137                wx.CallAfter(self.EndModal,wx.ID_CANCEL)
     
    32823282    def FillList(self,parms):
    32833283        'Places the current parms into the table'
     3284        maxint = 2**31-1
    32843285        self.ClearAll()
    32853286        self.rowlen = len(self.parent.ParmList)
     
    32903291            if d == 'None': continue
    32913292            if float(d) < 0: continue
    3292             index = self.InsertStringItem(sys.maxsize, d)
     3293            index = self.InsertStringItem(maxint, d)
    32933294            for j in range(1,len(parms)):
    32943295                self.SetStringItem(index, j, parms[j][r])
  • trunk/imports/G2img_1TIF.py

    r3136 r3141  
    135135    File.seek(IFD)                                                  #get number of directory entries
    136136    NED = int(st.unpack(byteOrd+'h',File.read(2))[0])
    137     print (IFD,NED)
    138137    IFD = {}
    139138    nSlice = 1
  • trunk/imports/G2img_CBF.py

    r3136 r3141  
    9191            Npix = int(fields[1])
    9292    nxy = sizexy[0]*sizexy[1]
     93    cent = [cent[0]*pixSize[0]/1000.,cent[1]*pixSize[1]/1000.]
     94    File.seek(0)
     95    img = File.read()[imageBeg:imageBeg+compImageSize]
     96    nimg = len(img)
     97    if 'bytes' in str(type(img)):
     98        img = np.array(img,dtype='a')
    9399    image = np.zeros(nxy,dtype=np.int32)
    94     cent = [cent[0]*pixSize[0]/1000.,cent[1]*pixSize[1]/1000.]
    95     compImage = stream[imageBeg:imageBeg+compImageSize]
     100    time0 = time.time()
    96101#    GSASIIpath.IPyBreak()
    97     time0 = time.time()
    98     nimg = len(compImage)
    99     image = cbf.unpack_cbf(nimg,compImage,nxy,image)
     102    image = cbf.unpack_cbf(nimg,img,nxy,image)
    100103    image = np.reshape(image,(sizexy[1],sizexy[0]))
    101104    print ('import time: %.3f'%(time.time()-time0))
Note: See TracChangeset for help on using the changeset viewer.