Flat1dDetector¶
- class odl.tomo.geometry.detector.Flat1dDetector(partition, axis, check_bounds=True)[source]¶
Bases:
DetectorA 1d line detector aligned with a given axis in 2D space.
- Attributes:
axisFixed axis along which this detector is aligned.
check_boundsIf
True, methods computing vectors check input arguments.gridSampling grid of the parameters.
ndimNumber of dimensions of the parameters (= surface dimension).
paramsSurface parameter set of this detector.
partitionPartition of the detector parameter set into subsets.
shapeNumber of subsets (pixels) of the detector per axis.
sizeTotal number of pixels.
space_ndimNumber of dimensions of the embedding space.
Methods
surface(param)Return the detector surface point corresponding to
param.surface_deriv(param)Return the surface derivative at
param.surface_measure(param)Density function of the surface measure.
surface_normal(param)Unit vector perpendicular to the detector surface at
param.- __init__(partition, axis, check_bounds=True)[source]¶
Initialize a new instance.
- Parameters:
- partition1-dim.
RectPartition Partition of the parameter interval, corresponding to the line elements.
- axis
array-like, shape(2,) Fixed axis along which this detector is aligned.
- check_boundsbool, optional
If
True, methods computing vectors check input arguments. Checks are vectorized and add only a small overhead.
- partition1-dim.
Examples
>>> part = odl.uniform_partition(0, 1, 10) >>> det = Flat1dDetector(part, axis=[1, 0]) >>> det.axis array([ 1., 0.]) >>> np.allclose(det.surface_normal(0), [0, -1]) True