Flat2dDetector

class odl.tomo.geometry.detector.Flat2dDetector(partition, axes, check_bounds=True)[source]

Bases: odl.tomo.geometry.detector.Detector

A 2D flat panel detector aligned two given axes in 3D space.

Attributes
axes

Fixed array of unit vectors with which the detector is aligned.

check_bounds

If True, methods computing vectors check input arguments.

grid

Sampling grid of the parameters.

ndim

Number of dimensions of the parameters (= surface dimension).

params

Surface parameter set of this detector.

partition

Partition of the detector parameter set into subsets.

shape

Number of subsets (pixels) of the detector per axis.

size

Total number of pixels.

space_ndim

Number of dimensions of the embedding space.

Methods

surface(self, param)

Return the detector surface point corresponding to param.

surface_deriv(self, param)

Return the surface derivative at param.

surface_measure(self, param)

Density function of the surface measure.

surface_normal(self, param)

Unit vector perpendicular to the detector surface at param.

__init__(self, partition, axes, check_bounds=True)[source]

Initialize a new instance.

Parameters
partition2-dim. RectPartition

Partition of the parameter rectangle, corresponding to the pixels.

axessequence of array-like’s

Fixed pair of of unit vectors with which the detector is aligned. The vectors must have shape (3,) and be linearly independent.

check_boundsbool, optional

If True, methods computing vectors check input arguments. Checks are vectorized and add only a small overhead.

Examples

>>> part = odl.uniform_partition([0, 0], [1, 1], (10, 10))
>>> det = Flat2dDetector(part, axes=[(1, 0, 0), (0, 0, 1)])
>>> det.axes
array([[ 1.,  0.,  0.],
       [ 0.,  0.,  1.]])
>>> det.surface_normal([0, 0])
array([ 0., -1.,  0.])