Package reflectometry :: Package reduction :: Module qxqz

Module qxqz

source code

Translate coordinates between real and reciprical space.
Functions
 
ABL_to_QxQz(sample_angle, detector_angle, wavelength)
Compute Qx,Qz given incident and reflected angles and wavelength
source code
 
QxQzL_to_AB(Qx, Qz, wavelength)
Guess incident and reflected angles given Qx, Qz and wavelength.
source code
 
QxQzA_to_BL(Qx, Qz, alpha)
Guess detector angle and wavelength given Qx, Qz and sample angle.
source code
 
test() source code
Function Details

ABL_to_QxQz(sample_angle, detector_angle, wavelength)

source code 

Compute Qx,Qz given incident and reflected angles and wavelength

Returns (Qx,Qz)

If all inputs are scalars the result will be a scalar.

QxQzL_to_AB(Qx, Qz, wavelength)

source code 

Guess incident and reflected angles given Qx, Qz and wavelength.

This transform is not invertible: for any Qx, Qz there are two separate choices for sample angle and detector angle which give the same Q. We choose the one for which detector angle matches the sign of Qz.

Returns sample angle, detector angle

Sample angle is also called the incident angle, theta_i. Dectector angle is incident angle plus reflected angle, or theta_i + theta_f.

If all inputs are scalars the result will be a scalar.

Error is in the order of 1e-12 for off-specular coordinates.

QxQzA_to_BL(Qx, Qz, alpha)

source code 

Guess detector angle and wavelength given Qx, Qz and sample angle.

The detector angle is branch cut between -180 and 180 degrees.

Returns detector angle, wavelength

Sample angle is also called the incident angle, theta_i. Dectector angle is incident angle plus reflected angle, or theta_i + theta_f.

If all inputs are scalars the result will be a scalar.

Error is in the order of 1e-12 for off-specular.