Changeset 3146


Ignore:
Timestamp:
Nov 1, 2017 9:05:28 AM (4 years ago)
Author:
vondreele
Message:

add time to G2img_MAR.py, fix open bug in G2pwd_fxye.py

Location:
trunk/imports
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/imports/G2img_MAR.py

    r3144 r3146  
    1414from __future__ import division, print_function
    1515import platform
    16 import sys
    17 import struct as st
     16import time
    1817import GSASIIobj as G2obj
    1918import GSASIIpath
     
    9089    File.seek(pos)
    9190    image = np.zeros(shape=(sizex,sizey),dtype=np.int32)   
     91    time0 = time.time()
    9292    if '2' in platform.python_version_tuple()[0]:
    9393        raw = File.read()
     
    9696        raw = np.frombuffer(File.read(),dtype=np.uint8)
    9797        image = np.flipud(pf.pack_f3(len(raw),raw,sizex,sizey,image).T)  #transpose to get it right way around & flip
     98    print ('image read time: %.3f'%(time.time()-time0))
    9899    File.close()
    99100    if imageOnly:
  • trunk/imports/G2pwd_fxye.py

    r3136 r3146  
    271271        title = ''
    272272        comments = None
    273         fp = open(filename,'r')
     273        fp = open(filename,'Ur')        #needs the 'U' to maintain py 2.7 compatibility
    274274        # reload previously saved values - used for multibank reads
    275275        if self.repeat and rdbuffer is not None:
Note: See TracChangeset for help on using the changeset viewer.