beam_from_pars#

anri.io.beam_from_pars(pars, k_in_lab=None)[source]#

Beam from ImageD11 parameters: wavelength (angstrom), and a direction.

Parameters:
  • pars (dict) – ImageD11 parameters with wavelength. ImageD11 has no beam direction: its beam is along lab x.

  • k_in_lab (Array | ndarray | bool | number | bool | int | float | complex | None, default: None) – [3] Direction of the incoming beam in the lab frame (default lab x), normalised here. It must not be vertical: beam divergence and polarisation are defined across it, see anri.geom.beam_basis().

Returns:

beam (dict) – “wavelength” and “k_in_lab” [3], the unit vector of the incoming beam