etomo.operators.linear.base
etomo.operators.linear.base#
Base class for linear operators
- class LinearBase(n_jobs=4, backend='threading', n_channels=1, verbose=False)[source]#
Bases:
modopt.opt.linear.base.LinearParent
Creates a base class for all linear operators. Ensures that the operator is defined in a way that is compatible with modopt reconstruction algorithms and handles multithreading for multichannel reconstructions. Any linear operator in pysap-etomo inherits from this class. To create an operator based on this class, the direct and adjoint operators have to be implemented in the _op and _adj_op methods respectively.
- op(data)[source]#
Direct operator
- Parameters
data (numpy.ndarray) – 2D or 3D images to compute operator on.
- Returns
coeffs – Linear coefficients of imput images
- Return type
- adj_op(coeffs)[source]#
Adjoint operator
- Parameters
coeffs (numpy.ndarray) – Linear coefficients
- Returns
images – Reconstructed data from imput coefficients
- Return type