xdesign.acquisition

Functions:

Beam(p1, p2[, size]) Beam (thick line) in 2-D cartesian space.
Probe(p1, p2[, size])
sinogram(sx, sy, phantom[, noise]) Generates sinogram given a phantom.
angleogram(sx, sy, phantom[, noise]) Generates angleogram given a phantom.
raster_scan(sx, sy) Provides a beam list for raster-scanning.
angle_scan(sx, sy) Provides a beam list for raster-scanning.
class xdesign.acquisition.Beam(p1, p2, size=0)[source]

Bases: xdesign.geometry.Line

Beam (thick line) in 2-D cartesian space.

It is defined by two distinct points.

p1

Point

p2

Point

size

scalar, optional

Size of the beam.

half_space

Returns the half space polytope respresentation of the infinite beam.

class xdesign.acquisition.Probe(p1, p2, size=0)[source]

Bases: xdesign.acquisition.Beam

measure(phantom, noise=False)[source]

Return the probe measurement given phantom. When noise is > 0, poisson noise is added to the returned measurement.

record()[source]
translate(dx)[source]

Translates beam along its normal direction.

xdesign.acquisition.sinogram(sx, sy, phantom, noise=False)[source]

Generates sinogram given a phantom.

Parameters:
  • sx (int) – Number of rotation angles.
  • sy (int) – Number of detection pixels (or sample translations).
  • phantom (Phantom)
Returns:

ndarray – Sinogram.

xdesign.acquisition.angleogram(sx, sy, phantom, noise=False)[source]

Generates angleogram given a phantom.

Parameters:
  • sx (int) – Number of rotation angles.
  • sy (int) – Number of detection pixels (or sample translations).
  • phantom (Phantom)
Returns:

ndarray – Angleogram.

xdesign.acquisition.raster_scan(sx, sy)[source]

Provides a beam list for raster-scanning.

Parameters:
  • sx (int) – Number of rotation angles.
  • sy (int) – Number of detection pixels (or sample translations).
Yields:

Probe

xdesign.acquisition.angle_scan(sx, sy)[source]

Provides a beam list for raster-scanning.

Parameters:
  • sx (int) – Number of rotation angles.
  • sy (int) – Number of detection pixels (or sample translations).
Yields:

Probe