xdesign.acquisition

Define objects and methods for simulated data acquisition.

This not only includes physical things like Probe, detectors, turntables, and lenses, but non-physical things such as scanning patterns.

Module author: Doga Gursoy <dgursoy@aps.anl.gov>

Module author: Daniel J Ching <carterbox@users.noreply.github.com>

Classes:

Probe([p1, p2, size, intensity, energy])

A square cross-section x-ray beam for probing Phantoms.

Functions:

raster_scan2D(sa, st[, meta])

Return the coordinates of a 2D raster scan.

class xdesign.acquisition.Probe(p1=None, p2=None, size=0.0, intensity=1.0, energy=15.0)[source]

Bases: xdesign.geometry.line.Line

A square cross-section x-ray beam for probing Phantoms.

p1, p2

Deprecated since version 0.4: Measure now uses theta, h, v coordinates instead.

Type

xdesign.geometry.Point

size

The size of probe in centimeters.

Type

float, cm (default: 0.0 cm)

intensity

The intensity of the beam in candela.

Type

float, cd (default: 1.0 cd)

energy

The energy of the probe in eV.

Type

float, eV (default: 15 eV)

.. todo::

Implement additional attributes for Probe such as wavelength, etc.

property cross_section

Return the cross-sectional area of a square beam.

distance(other)[source]

Return the closest distance between entities.

half_space()[source]

Return the half space polytope respresentation of the probe.

intersect(polygon)[source]

Return the intersection with polygon.

measure(phantom, theta, h, perc=None)[source]

Measure the phantom from the given position.

Parameters

theta, h – The coordinates of the Probe.

xdesign.acquisition.raster_scan2D(sa, st, meta=False)[source]

Return the coordinates of a 2D raster scan.

Parameters
  • sa (int) – The number of projeciton angles in [0, 2PI).

  • st (int) – The number of Probe steps at each projection angle. [-0.5, 0.5)

  • nmeta (int >= 0) – The number of meta steps. Meta steps are the offset from the starting Probe position after each rotation.

Returns

theta, h, v (np.array (M,)) – Probe positions for scan