scippneutron.conversion.tof#

Functions for computing coordinates in time-of-flight neutron scattering.

Some functions in this module use the neutron mass \(m_n\) and Planck constant \(h\). Their values are taken from scipp.constants.

Functions

Q_elements_from_wavelength(*, wavelength, ...)

Compute them momentum transfer vector from wavelength.

Q_from_wavelength(*, wavelength, two_theta)

Compute the absolute value of the momentum transfer from wavelength.

Q_vec_from_Q_elements(*, Qx, Qy, Qz)

Combine elements of Q into a single vector variable.

dspacing_from_energy(*, energy, two_theta)

Compute the d-spacing from the neutron energy.

dspacing_from_tof(*, tof, Ltotal, two_theta)

Compute the d-spacing from time-of-flight.

dspacing_from_wavelength(*, wavelength, ...)

Compute the d-spacing from wavelength.

energy_from_tof(*, tof, Ltotal)

Compute the neutron energy from time-of-flight.

energy_from_wavelength(*, wavelength)

Compute the neutron energy from wavelength.

energy_transfer_direct_from_tof(*, tof, L1, ...)

Compute the energy transfer in direct inelastic scattering.

energy_transfer_indirect_from_tof(*, tof, ...)

Compute the energy transfer in indirect inelastic scattering.

hkl_elements_from_hkl_vec(*, hkl_vec)

Unpack vector of hkl indices into separate variables.

hkl_vec_from_Q_vec(*, Q_vec, ub_matrix, ...)

Compute hkl indices from momentum transfer.

time_at_sample_from_tof(*, pulse_time, tof, ...)

Compute the absolute time when the neutron passed through the sample.

ub_matrix_from_u_and_b(*, u_matrix, b_matrix)

Compute the UB matrix from U and B matrices.

wavelength_from_Q(*, Q, two_theta)

Compute the wavelength from momentum transfer.

wavelength_from_energy(*, energy)

Compute the wavelength from the neutron energy.

wavelength_from_tof(*, tof, Ltotal)

Compute the wavelength from time-of-flight.