This documentation page refers to a previous release of DIALS (1.14).
Click here to go to the corresponding page for the latest version of DIALS

dxtbx.model.detector

class dxtbx.model.Detector

Bases: Boost.Python.instance

add_group((Detector)arg1) → DetectorNode :
C++ signature :
dxtbx::model::Detector::Node* add_group(dxtbx::model::Detector {lvalue})

add_group( (Detector)arg1, (Panel)arg2) -> DetectorNode :

C++ signature :
dxtbx::model::Detector::Node* add_group(dxtbx::model::Detector {lvalue},dxtbx::model::Panel)
add_panel((Detector)arg1) → DetectorNode :
C++ signature :
dxtbx::model::Detector::Node* add_panel(dxtbx::model::Detector {lvalue})

add_panel( (Detector)arg1, (Panel)arg2) -> DetectorNode :

C++ signature :
dxtbx::model::Detector::Node* add_panel(dxtbx::model::Detector {lvalue},dxtbx::model::Panel)
static from_dict((dict)arg1) → Detector :
C++ signature :
dxtbx::model::Detector* from_dict(boost::python::dict)

from_dict( (dict)arg1, (ImageDouble)arg2, (ImageDouble)arg3) -> Detector :

C++ signature :
dxtbx::model::Detector* from_dict(boost::python::dict,dxtbx::format::Image<double>,dxtbx::format::Image<double>)
get_max_inscribed_resolution((Detector)arg1, (object)s0) → float :
C++ signature :
double get_max_inscribed_resolution(dxtbx::model::Detector {lvalue},scitbx::vec3<double>)
get_max_resolution((Detector)arg1, (object)s0) → float :
C++ signature :
double get_max_resolution(dxtbx::model::Detector {lvalue},scitbx::vec3<double>)
get_names((Detector)arg1) → std_string :
C++ signature :
scitbx::af::shared<std::string> get_names(dxtbx::model::Detector)
get_panel_intersection((Detector)arg1, (object)s1) → int :
C++ signature :
int get_panel_intersection(dxtbx::model::Detector {lvalue},scitbx::vec3<double>)
get_ray_intersection((Detector)arg1, (object)s1) → tuple :
C++ signature :
std::pair<int, scitbx::vec2<double> > get_ray_intersection(dxtbx::model::Detector {lvalue},scitbx::vec3<double>)
hierarchy((Detector)arg1) → DetectorNode :
C++ signature :
dxtbx::model::Detector::Node* hierarchy(dxtbx::model::Detector {lvalue})
is_similar_to((Detector)arg1, (Detector)other[, (float)fast_axis_tolerance=1e-06[, (float)slow_axis_tolerance=1e-06[, (float)origin_tolerance=1e-06[, (bool)static_only=False[, (bool)ignore_trusted_range=False]]]]]) → bool :
C++ signature :
bool is_similar_to(dxtbx::model::Detector {lvalue},dxtbx::model::Detector [,double=1e-06 [,double=1e-06 [,double=1e-06 [,bool=False [,bool=False]]]]])
iter_levelorder()

Iterate through the groups and panels depth-first.

iter_panels()

Iterate through just the panels depth-first.

iter_preorder()

Iterate through the groups and panels depth-first.

rotate_around_origin((Detector)arg1, (object)axis, (float)angle[, (bool)deg=True]) → None :
C++ signature :
void rotate_around_origin(dxtbx::model::Detector {lvalue},scitbx::vec3<double>,double [,bool=True])
to_dict((Detector)arg1) → dict :
C++ signature :
boost::python::dict to_dict(dxtbx::model::Detector)
class dxtbx.model.detector.DetectorFactory[source]

A factory class for detector objects, which will encapsulate standard detector designs to make it a little easier to get started with these. In cases where a CBF image is provided a full description can be used, in other cases assumptions will be made about the experiment configuration. In all cases information is provided in the CBF coordinate frame.

static complex(sensor, origin, fast, slow, pixel, size, trusted_range=(0.0, 0.0), mask=[], px_mm=None, mu=0.0, gain=None, pedestal=None, identifier='')[source]

A complex detector model, where you know exactly where everything is. This is useful for implementation of the Rigaku Saturn header format, as that is exactly what is in there. Origin, fast and slow are vectors in the CBF reference frame, pixel is the dimensions as a tuple as is size.

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

Convert the dictionary to a detector model

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

Convert phil parameters into detector model

static generate_from_phil(params, beam=None)[source]

Create a new detector model from phil parameters

static imgCIF(cif_file, sensor)[source]

Initialize a detector model from an imgCIF file.

static imgCIF_H(cbf_handle, sensor)[source]

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

static make_detector(stype, fast_axis, slow_axis, origin, pixel_size, image_size, trusted_range=(0.0, 0.0), px_mm=None, name='Panel', thickness=0.0, material='', mu=0.0, gain=None, pedestal=None, identifier='')[source]

Ensure all types are correct before creating c++ detector class.

static overwrite_from_phil(params, detector, beam=None)[source]

Overwrite from phil parameters

static sensor(name)[source]

Return the correct sensor token for a given name, for example:

ccd, CCD image_plate, IMAGE_PLATE pad, PAD

to the appropriate static token which will be used as a handle everywhere else in this. Also allow existing token to be passed in.

static simple(sensor, distance, beam_centre, fast_direction, slow_direction, pixel_size, image_size, trusted_range=(0.0, 0.0), mask=[], px_mm=None, mu=0.0, gain=None, pedestal=None, identifier='')[source]

Construct a simple detector at a given distance from the sample along the direct beam presumed to be aligned with -z, offset by the beam centre - the directions of which are given by the fast and slow directions, which are themselves given as +x, +y, -x, -y. The pixel size is given in mm in the fast and slow directions and the image size is given in pixels in the same order. Everything else is the same as for the main reference frame.

static two_theta(sensor, distance, beam_centre, fast_direction, slow_direction, two_theta_direction, two_theta_angle, pixel_size, image_size, trusted_range=(0.0, 0.0), mask=[], px_mm=None, mu=0.0, gain=None, pedestal=None, identifier='')[source]

Construct a simple detector at a given distance from the sample along the direct beam presumed to be aligned with -z, offset by the beam centre - the directions of which are given by the fast and slow directions, which are themselves given as +x, +y, -x, -y. The pixel size is given in mm in the fast and slow directions and the image size is given in pixels in the same order. Everything else is the same as for the main reference frame. Also given are the direction of the two-theta axis and the angle in degrees by which the detector is moved.