ImageD11.transform | index c:\python25\lib\site-packages\imaged11\transform.py

`Functions for transforming peaks`

Modules
`` |  |
logging | numpy.oldnumeric |  |

Functions
`` |  | compute_g_vectors(tth, eta, omega, wavelength, wedge=0.0, chi=0.0) `Generates spot positions in reciprocal space from twotheta, wavelength, omega and eta Assumes single axis vertical ... unless a wedge angle is specified` compute_k_vectors(tth, eta, wavelength) `generate k vectors - scattering vectors in laboratory frame` compute_lorentz_factors(tth, eta, omega, wavelength, wedge=0.0, chi=0.0) `From Kabsch 1988 J. Appl. Cryst. 21 619 Multiply the intensities by: Lorentz = | S.(u x So)| / |S|.|So| S = scattered vector So = incident vector u = unit vector along rotation axis` compute_polarisation_factors(args) `From Kabsch 1988 J. Appl. Cryst. 21 619 DIVIDE the intensities by: <sin2 psi> = ( 1 - 2p) [ 1 - (n.S/|S|^2) ] + p { 1 + [S.S_0/(|S||S_0|)^2]^2} p = degree of polarisation (sync = 1, tube = 0.5 , mono + tube in between) or "probability of finding electric field vector in plane having normal, n" S = scattered vector S_0 = incident vector n = normal to polarisation plane, typically perpendicular to S_0 In ImageD11 we normally expect to find: x axis along the beam z axis being up, and parallel to the normal n mentioned above` compute_tth_eta(peaks, y_center=0.0, y_size=0.0, tilt_y=0.0, z_center=0.0, z_size=0.0, tilt_z=0.0, tilt_x=0.0, distance=0.0, o11=1.0, o12=0.0, o21=0.0, o22=-1.0, t_x=0.0, t_y=0.0, t_z=0.0, omega=None, wedge=0.0, chi=0.0, return_pixel_xyz=False, **kwds) `Peaks is a 2 d array of x,y yc is the centre in y ys is the y pixel size ty is the tilt around y zc is the centre in z zs is the z pixel size tz is the tilt around z dist is the sample - detector distance detector_orientation is a matrix to apply to peaks arg to get ImageD11 convention (( 0, 1),( 1, 0)) for ( y, x) ((-1, 0),( 0, 1)) for (-x, y) (( 0,-1),(-1, 0)) for (-y,-x) etc... crystal_translation is the position of the grain giving rise to a diffraction spot in x,y,z ImageD11 co-ordinates x,y with respect to axis of rotation and or beam centre ?? z with respect to beam height, z centre omega data needed if crystal translations used` compute_tth_histo(finalpeaks, tth, no_bins=0, min_bin_ratio=1, **kwds) cross_product_2x2(a, b) `returns axb for two len(3) vectors a,b` degrees(x) `Convenience function` radians(x) `Convenience function` uncompute_g_vectors(g, wavelength, wedge=0.0, chi=0.0) `Given g-vectors compute tth,eta,omega assert uncompute_g_vectors(compute_g_vector(tth,eta,omega))==tth,eta,omega` uncompute_one_g_vector(gv, wavelength, wedge=0.0) `Given g-vectors compute tth,eta,omega assert uncompute_g_vectors(compute_g_vector(tth,eta,omega))==tth,eta,omega`

Data
`` |  | pi = 3.1415926535897931 test = array([ 1.57079633, 1.57079633, 1.57079633, 1...57079633, 1.57079633, 1.57079633, 1.57079633])