dxtbx.model.beam

class dxtbx.model.beam.BeamFactory[source]

A factory class for beam objects, which encapsulate standard beam models. In cases where a full cbf description is available this will be used, otherwise simplified descriptions can be applied.

static complex(sample_to_source, polarization_fraction, polarization_plane_normal, wavelength)[source]

Full access to the constructor for cases where we do know everything that we need…

static from_dict(d, t=None)[source]

Convert the dictionary to a beam model

Params:
d The dictionary of parameters t The template dictionary to use
Returns:The beam model
static from_phil(params, reference=None)[source]

Convert the phil parameters into a beam model

static imgCIF(cif_file)[source]

Initialize a detector model from an imgCIF file. N.B. the definition of the polarization plane is not completely helpful in this - it is the angle between the polarization plane and the +Y laboratory frame vector.

static imgCIF_H(cbf_handle)[source]

Initialize a detector model from an imgCIF file. N.B. the definition of the polarization plane is not completely helpful in this - it is the angle between the polarization plane and the +Y laboratory frame vector. This example works from a cbf_handle, which is already configured.

static make_beam(sample_to_source=None, wavelength=None, s0=None, unit_s0=None, divergence=None, sigma_divergence=None)[source]
static make_polarized_beam(sample_to_source=None, wavelength=None, s0=None, unit_s0=None, polarization=None, polarization_fraction=None, divergence=None, sigma_divergence=None, flux=None, transmission=None)[source]
static simple(wavelength)[source]

Construct a beam object on the principle that the beam is aligned with the +z axis, as is quite normal. Also assume the beam has polarization fraction 0.999 and is polarized in the x-z plane.

static simple_directional(sample_to_source, wavelength)[source]

Construct a beam with direction and wavelength.