Hello,
I would need some help, I am trying to index a frame of an Area detector into hkl coordinateds following the example provided in Appendix B of the reference paper and in some scripts provided in the example folder of the distribution.
I have some frames of an area detector with a 4-circles Eulerian cradle.
I paste below a dummy script, which
I prepared a script building on the examples but it does not give results, I do not understand why.
I guess because I do not understand the underlying action of xrayutilities.
I understand that Ang2HKL would create the arrays of hkl vlaues using the experimental angles.
Thus I could feed it with the scan parameters I retrieve from the scan files and the UB matrix determined during the sample alignment.
Would that work or I am getting wrong?
I paste below a dummy script to avoid useless details.
Thanks
Best regards
Ruggero
##__set the material
abcabg = [a,b,c,alpha, beta, gamma]
sam = xru.materials.material.Crystal(’sample1', abcabg)
##__the UB matrix is retrieved during the experiment
ubmat = np.array([[1.364,-0.131,0.270],[-0.044, 1.639, 0.083],[-0.950, -0.264, 0.384]])
##__load the frame and associated parameter file to get scan parameters,
omega, twotheta, chi, phi, energy, detector_distance = ...
##__fix detector spec
#__define experiment geometry
hxrd = xru.HXRD(sam.Q(-2, 0, 0), sam.Q(0, 0, -4), en=energy)
##__assign orientation matrix
hxrd.Ang2Q.init_area('z+','x+', cch1=cpix, cch2=cpiy, Nch1=npix, Nch2=npiy,
pwidth1=xpix, pwidth2=ypix, distance=sam_det)
## conversion to h,k,l
h,k,l = hxrd.Ang2HKL(omega, towtheta, U=ubmat)
==================================================================
Ruggero Frison
University of Zurich, Physik Institut
Winterthurerstrasse 190
CH-8057 Zurich, Switzerland
Office: Y36-H-76
Phone: +41 44 635 5780
==================================================================
|