Changeset 1359 for trunk/GSASIIIO.py


Ignore:
Timestamp:
May 21, 2014 12:59:59 PM (8 years ago)
Author:
vondreele
Message:

start allowing reading of multiple HKLF files.
put an IndexAllIds? into UpdateConstraints?
edf image fixes
more places in Pawley d-min
format of penalty fxn chi2
allow one Bank selection set to be used for multiple files
new reader for TOF HKLF2 data - nonworking just now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIIO.py

    r1355 r1359  
    306306    lines = head.split('\n')
    307307    sizexy = [0,0]
    308     pixSize = [0,0]
     308    pixSize = [154,154]     #Pixium4700?
    309309    cent = [0,0]
     310    wave = 1.54187  #default <CuKa>
     311    dist = 1000.
    310312    head = ['European detector data',]
    311313    for line in lines:
     314        line = line.replace(';',' ').strip()
    312315        fields = line.split()
    313316        if 'Dim_1' in line:
     
    317320        elif 'DataType' in line:
    318321            dType = fields[2]
    319         elif 'refined_wavelength' in line:
     322        elif 'wavelength' in line:
    320323            wave = float(fields[2])
    321324        elif 'Size' in line:
     
    335338        if line:
    336339            head.append(line)
     340        else:   #blank line at end of header
     341            break 
    337342    File.seek(fileSize-imSize)
    338343    if dType == 'UnsignedShort':       
    339344        image = np.array(ar.array('H',File.read(imSize)),dtype=np.int32)
    340345    elif dType == 'UnsignedInt':
     346        image = np.array(ar.array('L',File.read(imSize)),dtype=np.int32)
     347    elif dType == 'UnsignedLong':
    341348        image = np.array(ar.array('L',File.read(imSize)),dtype=np.int32)       
    342349    image = np.reshape(image,(sizexy[1],sizexy[0]))
     
    14101417        # more than one data block
    14111418        self.repeat = False
     1419        self.selections = []
    14121420        self.repeatcount = 0
    14131421        self.readfilename = '?'
Note: See TracChangeset for help on using the changeset viewer.