Changeset 239 for trunk/GSASIIimage.py


Ignore:
Timestamp:
Jan 13, 2011 1:34:07 PM (11 years ago)
Author:
vondreele
Message:

add 'any image file' to image file menu
add calibration skip & dmin to image data dictionary
fix to ellipse fitting
fix Pilatus reading - OK for 100K, not sure for 2M
now a image sizexy - 2 items for x & y sizes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimage.py

    r230 r239  
    341341        print 'no calibration material selected'
    342342        return True
    343        
    344     Bravais,cell,skip,limits = calFile.Calibrants[data['calibrant']]
     343   
     344    skip = data['calibskip']
     345    dmin = data['calibdmin']
     346    Bravais,cell = calFile.Calibrants[data['calibrant']][:2]
    345347    A = G2lat.cell2A(cell)
    346348    wave = data['wavelength']
    347349    cent = data['center']
    348350    elcent,phi,radii = ellipse
    349     HKL = G2lat.GenHBravais(limits[0],Bravais,A)[skip:]
     351    HKL = G2lat.GenHBravais(dmin,Bravais,A)[skip:]
    350352    dsp = HKL[0][3]
    351353    tth = 2.0*asind(wave/(2.*dsp))
     
    384386            numZ = len(Ring)
    385387            data['rings'].append(np.array(Ring))
    386             ellipse = FitRing(Ring)
    387             elcent,phi,radii = ellipse               
     388            newellipse = FitRing(Ring)
     389            elcent,phi,radii = newellipse               
    388390            if abs(phi) > 45. and phi < 0.:
    389391                phi += 180.
    390392            dist = calcDist(radii,tth)
    391393            distR = 1.-dist/data['distance']
     394            if abs(distR) > 0.1:
     395                print distR,dist,data['distance']
     396                del data['rings'][-1]
     397                continue
    392398            if distR > 0.001:
    393399                print 'Wavelength too large?'
     
    395401                print 'Wavelength too small?'
    396402            else:
     403                ellipse = newellipse
    397404                if abs((radii[1]/radii[0]-ratio)/ratio) > 0.01:
    398405                    print 'Bad fit for ring # %i. Try reducing Pixel search range'%(i)
Note: See TracChangeset for help on using the changeset viewer.