-
etspy.base.TomoStack.recon_error(nslice: int | None =
None, algorithm: 'SIRT' | 'SART' ='SIRT', iterations: int =50, constrain: bool =True, cuda: bool | None =None, thresh: float =0) tuple[Signal2D, Signal1D][source] Determine the optimum number of iterations for reconstruction.
Evaluates the difference between reconstruction and input data at each iteration and terminates when the change between iterations is below tolerance.
- Parameters:¶
- nslice: int | None =
None¶ Slice location at which to perform the evaluation.
- algorithm: 'SIRT' | 'SART' =
'SIRT'¶ Reconstruction algorithm use. Must be either
'SIRT'(default) or'SART'(this method is inapplicable for'FBP'and'DART').- constrain: bool =
True¶ If True, perform SIRT reconstruction with a non-negativity constraint. Default is
True- cuda: bool | None =
None¶ Whether or not to use CUDA-accelerated reconstruction algorithms. If
None(the default), the decision to use CUDA will be left toastra.astra.use_cuda().- thresh: float =
0¶ Value above which to constrain the reconstructed data
- nslice: int | None =
- Returns:¶
Examples¶
>>> import etspy.datasets as ds >>> stack = ds.get_needle_data(aligned=True) >>> rec_stack, error = stack.recon_error(iterations=5)