neutronpy.instrument.get_angle_ki_Q

neutronpy.instrument.get_angle_ki_Q(ki, kf, Q, gonio_dir=-1, outside_scat_tri=False)[source]

Returns the angle between ki and Q for rotation from [ki, ki_perp, kz, w] to [q_perp, q_para, qz, w] reference frame.

Parameters:
ki : float

Initial wavevector in inverse angstroms

kf : float

Final wavevector in inverse angstroms

Q : float

Q position in inverse angstroms.

gonio_dir : bool, optional

If the goniometer direction is left-handed, set to -1. Default: 1

outside_scat_tri : bool, optional

Set to True if Q is outside the scattering triangle to fold back. Default: False

Returns:
angle : float