CCPi Plugins

Operators

class ccpi.plugins.operators.CCPiProjectorSimple(geomv, geomp, default=False)[source]

ASTRA projector modified to use DataSet and geometry.

__init__(geomv, geomp, default=False)[source]

Creator

Parameters:
  • domain_geometry – domain of the operator
  • range_geometry (optional, default None) – range of the operator
direct(image_data, out=None)[source]

Returns the application of the Operator on x

domain_geometry()[source]

Returns the domain of the Operator: X space

is_linear()[source]

Returns if the operator is linear

norm()[source]

Returns the norm of the Operator

Calling norm triggers the calculation of the norm of the operator. Normally this is a computationally expensive task, therefore we store the result of norm into a member of the class. If the calculation has already run, following calls to norm just return the saved member. It is possible to force recalculation by setting the optional force parameter. Notice that norm doesn’t take notice of how many iterations or of the initialisation of the PowerMethod, so in case you want to recalculate by setting a higher number of iterations or changing the starting point or both you need to set force=True

Parameters:
  • iterations (int, optional, default = 25) – number of iterations to run
  • x_init (same type as domain, a subclass of DataContainer, optional, default None) – starting point for the iteration in the operator domain
  • force (boolean, default False) – forces the recalculation of the norm
range_geometry()[source]

Returns the range of the Operator: Y space

Processors

class ccpi.plugins.processors.AcquisitionDataPadder(center_of_rotation=None, acquisition_geometry=None, pad_value=1e-05)[source]

Normalization based on flat and dark

This processor read in a AcquisitionData and normalises it based on the instrument reading with and without incident photons or neutrons.

Input: AcquisitionData Parameter: 2D projection with flat field (or stack)

2D projection with dark field (or stack)

Output: AcquisitionDataSetn

__init__(center_of_rotation=None, acquisition_geometry=None, pad_value=1e-05)[source]

Initialize self. See help(type(self)) for accurate signature.

check_input(dataset)[source]

Checks parameters of the input DataContainer

Should raise an Error if the DataContainer does not match expectation, e.g. if the expected input DataContainer is 3D and the Processor expects 2D.

class ccpi.plugins.processors.CCPiForwardProjector(image_geometry=None, acquisition_geometry=None, output_axes_order=None)[source]

Normalization based on flat and dark

This processor read in a AcquisitionData and normalises it based on the instrument reading with and without incident photons or neutrons.

Input: AcquisitionData Parameter: 2D projection with flat field (or stack)

2D projection with dark field (or stack)

Output: AcquisitionDataSetn

__init__(image_geometry=None, acquisition_geometry=None, output_axes_order=None)[source]

Initialize self. See help(type(self)) for accurate signature.

check_input(dataset)[source]

Checks parameters of the input DataContainer

Should raise an Error if the DataContainer does not match expectation, e.g. if the expected input DataContainer is 3D and the Processor expects 2D.

class ccpi.plugins.processors.CCPiBackwardProjector(image_geometry=None, acquisition_geometry=None, output_axes_order=None)[source]

Backward projector

This processor reads in a AcquisitionData and performs a backward projection, i.e. project to reconstruction space. Notice that it assumes that the center of rotation is in the middle of the horizontal axis: in case when that’s not the case it can be chained with the AcquisitionDataPadder.

Input: AcquisitionData Parameter: 2D projection with flat field (or stack)

2D projection with dark field (or stack)

Output: AcquisitionDataSetn

__init__(image_geometry=None, acquisition_geometry=None, output_axes_order=None)[source]

Initialize self. See help(type(self)) for accurate signature.

check_input(dataset)[source]

Checks parameters of the input DataContainer

Should raise an Error if the DataContainer does not match expectation, e.g. if the expected input DataContainer is 3D and the Processor expects 2D.

class ccpi.plugins.processors.setupCCPiGeometries[source]

Regularisers

class ccpi.plugins.regularisers.ROF_TV(lambdaReg, iterationsTV, tolerance, time_marchstep, device)[source]
__call__(x)[source]

Returns the value of the function F at x: \(F(x)\)

__init__(lambdaReg, iterationsTV, tolerance, time_marchstep, device)[source]

Initialize self. See help(type(self)) for accurate signature.

proximal(x, tau, out=None)[source]

Returns the proximal operator of function \(\tau F\) at x .. math:: mathrm{prox}_{tau F}(x) = underset{z}{mathrm{argmin}} frac{1}{2}|z - x|^{2} + tau F(z)

class ccpi.plugins.regularisers.FGP_TV(lambdaReg, iterationsTV, tolerance, methodTV, nonnegativity, printing, device)[source]
__call__(x)[source]

Returns the value of the function F at x: \(F(x)\)

__init__(lambdaReg, iterationsTV, tolerance, methodTV, nonnegativity, printing, device)[source]

Initialize self. See help(type(self)) for accurate signature.

convex_conjugate(x)[source]

Returns the convex conjugate of function \(F\) at \(x^{*}\),

\[F^{*}(x^{*}) = \underset{x^{*}}{\sup} <x^{*}, x> - F(x)\]
proximal(x, tau, out=None)[source]

Returns the proximal operator of function \(\tau F\) at x .. math:: mathrm{prox}_{tau F}(x) = underset{z}{mathrm{argmin}} frac{1}{2}|z - x|^{2} + tau F(z)

class ccpi.plugins.regularisers.SB_TV(lambdaReg, iterationsTV, tolerance, methodTV, printing, device)[source]
__call__(x)[source]

Returns the value of the function F at x: \(F(x)\)

__init__(lambdaReg, iterationsTV, tolerance, methodTV, printing, device)[source]

Initialize self. See help(type(self)) for accurate signature.

proximal(x, tau, out=None)[source]

Returns the proximal operator of function \(\tau F\) at x .. math:: mathrm{prox}_{tau F}(x) = underset{z}{mathrm{argmin}} frac{1}{2}|z - x|^{2} + tau F(z)

Return Home