pytomography.projectors.shared.kem_system_matrix
#
Module Contents#
Classes#
Given a KEM transform \(K\) and a system matrix \(H\), implements the transform \(HK\) (and backward transform \(K^T H^T\)) |
- class pytomography.projectors.shared.kem_system_matrix.KEMSystemMatrix(system_matrix, kem_transform)[source]#
Bases:
pytomography.projectors.system_matrix.SystemMatrix
Given a KEM transform \(K\) and a system matrix \(H\), implements the transform \(HK\) (and backward transform \(K^T H^T\))
- Parameters:
system_matrix (SystemMatrix) – System matrix corresponding to a particular imaging system
kem_transform (KEMTransform) – Transform used to go from coefficient image to real image of predicted counts.
- compute_normalization_factor(subset_idx=None)[source]#
Function used to get normalization factor \(K^T H^T_m 1\) corresponding to projection subset \(m\).
- Parameters:
subset_idx (int | None, optional) – Index of subset. If none, then considers all projections. Defaults to None.
- Returns:
normalization factor \(K^T H^T_m 1\)
- Return type:
torch.Tensor
- forward(object, subset_idx=None)[source]#
Forward transform \(HK\)
- Parameters:
object (torch.tensor) – Object to be forward projected
subset_idx (int, optional) – Only uses a subset of angles \(g_m\) corresponding to the provided subset index \(m\). If None, then defaults to the full projections \(g\).
- Returns:
Corresponding projections generated from forward projection
- Return type:
torch.tensor
- backward(proj, subset_idx=None, return_norm_constant=False)[source]#
Backward transform \(K^T H^T\)
- Parameters:
proj (torch.tensor) – Projection data to be back projected
subset_idx (int, optional) – Only uses a subset of angles \(g_m\) corresponding to the provided subset index \(m\). If None, then defaults to the full projections \(g\).
return_norm_constant (bool, optional) – Additionally returns \(K^T H^T 1\) if true; defaults to False.
- Returns:
Corresponding object generated from back projection.
- Return type:
torch.tensor