Changeset 1665 for trunk/GSASIIimage.py


Ignore:
Timestamp:
Feb 20, 2015 12:07:16 PM (7 years ago)
Author:
vondreele
Message:

fix image calibrate so dist can be fixed & wave unknown

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimage.py

    r1653 r1665  
    636636            HKL += hkl
    637637    HKL = G2lat.sortHKLd(HKL,True,False)[skip:]
    638     wave = data['wavelength']
    639638#set up 1st ring
    640639    elcent,phi,radii = ellipse              #from fit of 1st ring
    641640    dsp = HKL[0][3]
    642641    print '1st ring: try %.4f'%(dsp)
    643     tth = 2.0*asind(wave/(2.*dsp))
     642    if varyDict['dist']:
     643        wave = data['wavelength']
     644        tth = 2.0*asind(wave/(2.*dsp))
     645    else:   #varyDict['wave']!
     646        dist = data['distance']
     647        tth = npatan2d(radii[0],dist)
     648        data['wavelength'] = wave =  2.0*dsp*sind(tth/2.0)
    644649    Ring0 = makeRing(dsp,ellipse,3,cutoff,scalex,scaley,self.ImageZ)
    645650    ttth = nptand(tth)
Note: See TracChangeset for help on using the changeset viewer.