hexrd.instrument.cylindrical_detector module

class hexrd.instrument.cylindrical_detector.CylindricalDetector(radius=49.51, **detector_kwargs)[source]

Bases: Detector

2D cylindrical detector

A cylindrical detector is a simple rectangular row-column detector which has been bent in the shape of a cylinder. Inherting the PlanarDetector class except for a few changes to account for the cylinder ray intersection.

property angle_extent
angles_to_cart(tth_eta, rmat_s=None, tvec_s=None, rmat_c=None, tvec_c=None, apply_distortion=False)[source]

Transform angular coordinates to cartesian.

Parameters

tth_etaarray_like

The (n, 2) array of n (tth, eta) coordinates to be transformed.

rmat_sarray_like, optional

The (3, 3) COB matrix for the sample frame. The default is None.

tvec_sarray_like, optional

The (3, ) translation vector for the sample frame. The default is None.

rmat_carray_like, optional

(3, 3) COB matrix for the crystal frame. The default is None.

tvec_carray_like, optional

The (3, ) translation vector for the crystal frame. The default is None.

apply_distortionbool, optional

If True, apply distortion to take cartesian coordinates to the “warped” configuration. The default is False.

Returns

xy_detarray_like

The (n, 2) array on the n input coordinates in the .

property beam_position

returns the coordinates of the beam in the cartesian detector frame {Xd, Yd, Zd}. NaNs if no intersection.

property calibration_flags_to_lmfit_names
cart_to_angles(xy_data, rmat_s=None, tvec_s=None, tvec_c=None, apply_distortion=False, normalize=True)[source]

Transform cartesian coordinates to angular.

Parameters

xy_dataTYPE

The (n, 2) array of n (x, y) coordinates to be transformed in either the raw or ideal cartesian plane (see apply_distortion kwarg below).

rmat_sarray_like, optional

The (3, 3) COB matrix for the sample frame. The default is None.

tvec_sarray_like, optional

The (3, ) translation vector for the sample frame. The default is None.

tvec_carray_like, optional

The (3, ) translation vector for the crystal frame. The default is None.

apply_distortionbool, optional

If True, apply distortion to the inpout cartesian coordinates. The default is False.

Returns

tth_etaTYPE

DESCRIPTION.

g_vecTYPE

DESCRIPTION.

cart_to_dvecs(xy_data, tvec_s=array([[0.], [0.], [0.]]), rmat_s=array([[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]]), tvec_c=array([[0.], [0.], [0.]]))[source]

Convert cartesian coordinates to dvectors

property caxis
property detector_type
property extra_config_kwargs
property paxis
property physical_size
pixel_angles(origin=array([0., 0., 0.]))[source]
pixel_eta_gradient(origin=array([0., 0., 0.]))[source]
property pixel_solid_angles
pixel_tth_gradient(origin=array([0., 0., 0.]))[source]
property radius
static update_memoization_sizes(all_panels)[source]