pytomography.utils.scatter#
Module Contents#
Functions#
|
Smooths SPECT projection metadata |
|
Computes triple energy window estimate from lower and upper scatter projections as well as window widths |
- pytomography.utils.scatter.get_smoothed_scatter(scatter, proj_meta, sigma_theta=0, sigma_r=0, sigma_z=0, N_sigmas=3, FOV_mask=None)[source]#
Smooths SPECT projection metadata
- Parameters:
scatter (torch.Tensor) – Input projection data
proj_meta (ProjMeta) – Projection metadata
sigma_theta (float, optional) – Smoothing in theta (specified in degrees). Defaults to 0.
sigma_r (float, optional) – Smoothing in r (specified in cm). Defaults to 0.
sigma_z (float, optional) – Smoothing in z (specified in cm). Defaults to 0.
N_sigmas (int, optional) – Number of sigmas to include in the smoothing kernel. Defaults to 3.
FOV_mask (torch.Tensor, optional) – Field of view mask. Defaults to None.
- Returns:
Smoothed projections
- Return type:
torch.Tensor
- pytomography.utils.scatter.compute_EW_scatter(projection_lower, projection_upper, width_lower, width_upper, width_peak, weighting_lower=0.5, weighting_upper=0.5, proj_meta=None, sigma_theta=0, sigma_r=0, sigma_z=0, N_sigmas=3, return_scatter_variance_estimate=False, fov_mask=None)[source]#
Computes triple energy window estimate from lower and upper scatter projections as well as window widths
- Parameters:
projection_lower (torch.Tensor) – Projection data corresponding to lower energy window
projection_upper (torch.Tensor) – Projection data corresponding to upper energy window
width_lower (float) – Width of lower energy window
width_upper (float) – Width of upper energy window
width_peak (float) – Width of peak energy window
return_scatter_variance_estimate (bool, optional) – Return scatter variance estimate. Defaults to False.
fov_mask (torch.tensor, optional) – Field of view mask; may be required when blurring scatter to avoid blurring accross edges. Defaults to None.
weighting_lower (float) –
weighting_upper (float) –
sigma_theta (float) –
sigma_r (float) –
sigma_z (float) –
N_sigmas (int) –
- Returns:
Scatter estimate (and scatter variance estimate if specified)
- Return type:
torch.Tensor | Sequence[torch.Tensor]