ImageD11.rotdex module#

ImageD11.rotdex.compute_Cgve(txyz, peaks_Cxyz, beam_Cxyz, wavelength)#

Computes g-vectors from spots and beam in crystal frame txyz = (3,) origin position peaks_Cxyz = (3,n) spot position on rotated detector beam_Cxyz = (3,n) vectors of rotated incident beam

beam is already normalised to wavelength

wavelength = float radation, normalises length returns scattering vectors (g-vectors)

ImageD11.rotdex.compute_dgdt(txyz, peaks_Cxyz, beam_Cxyz, wavelength)#

Compute the gvectors and the derivatives with respect to tx,ty,tz txyz = (3,) origin position peaks_Cxyz = (3,n) spot position on rotated detector beam_Cxyz = (3,n) vectors of rotated incident beam

beam is already normalised to wavelength

wavelength = float radation, normalises length returns scattering vectors (g-vectors) and d(g)/d(txyz)

ImageD11.rotdex.fit_ub_t(ub, translation, hkl, peaks_Cxyz, beam_Cxyz, wavelength)#

Fits the ub and grain origin to a list of assigned peaks All unit cell and orientations parameters are free Runs 2 cycles (empirically this converges)

ub = (3,3) input UB matrix (so that h ~= UB.g) translation = (3,) grain origin hkl = (3,n) integer peak assignments peaks_Cxyz = (3,n) spot positions in crystal frame (getCxyz) beam_Cxyz = (3,n) beam directions in crystal frame (getCxyz) wavelength = float, radiation, normalises length returns fitted UB and translation

ImageD11.rotdex.fitagrain(gr, pars)#
ImageD11.rotdex.getCxyz(colf, pars)#

Find spot positions in crystal frame colf = columnfile (or other object) holding .sc, .fc, .omega pars = parameters for ImageD11 transform module

ImageD11.rotdex.main()#
ImageD11.rotdex.main2()#