# dxtbx.model.goniometer¶

class dxtbx.model.goniometer.GoniometerFactory[source]

A factory class for goniometer objects, which will encapsulate some standard goniometer designs to make it a little easier to get started with all of this - for cases when we are not using a CBF. When we have a CBF just use that factory method and everything will be peachy.

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

Convert the dictionary to a goniometer model

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

Convert the phil parameters into a beam model

static imgCIF(cif_file)[source]

Initialize a goniometer model from an imgCIF file.

static imgCIF_H(cbf_handle)[source]

Initialize a goniometer model from an imgCIF file handle, where it is assumed that the file has already been read.

static kappa(alpha, omega, kappa, phi, direction, scan_axis)[source]

Return a kappa goniometer where omega is the primary axis (i,e. aligned with X in the CBF coordinate frame) and has the kappa arm with angle alpha attached to it, aligned with -z, +y, +z or -y at omega = 0, that being the direction, which in turn has phi fixed to it which should initially be coincident with omega. We also need to know which axis is being used for the scan i.e. phi or omega. All angles should be given in degrees. This will work by first constructing the rotation axes and then composing them to the scan axis and fixed component of the rotation.

static known_axis(axis)[source]

Return an goniometer instance for a known rotation axis, assuming that nothing is known about the fixed element of the rotation axis.

static make_goniometer(rotation_axis, fixed_rotation)[source]
static make_kappa_goniometer(alpha, omega, kappa, phi, direction, scan_axis)[source]
static make_multi_axis_goniometer(axes, angles, names, scan_axis)[source]
static multi_axis(axes, angles, names, scan_axis)[source]
static multi_axis_goniometer_from_phil(params, reference=None)[source]
static single_axis()[source]

Construct a single axis goniometer which is canonical in the CBF reference frame.

static single_axis_goniometer_from_phil(params, reference=None)[source]

Generate or overwrite a single axis goniometer

static single_axis_reverse()[source]

Construct a single axis goniometer which is canonical in the CBF reference frame, but reversed in rotation.