phaseretrieval.phrt

Functions:

phrt_plan(im, energy, distance, pixsize, ...) Pre-compute data to save time in further execution of phase_retrieval.
phrt(im, plan[, method, nr_threads]) Process a tomographic projection image with the selected phase retrieval algorithm.
stp_core.phaseretrieval.phrt.phrt(im, plan, method=4, nr_threads=2)[source]

Process a tomographic projection image with the selected phase retrieval algorithm.

Parameters:
  • im (array_like) – Flat corrected image data as numpy array.
  • plan (structure) – Structure with pre-computed data (see prepare_plan function)
  • method (int) – Phase retrieval filter {1 = TIE (default), 2 = CTF, 3 = CTF first-half sine, 4 = Quasiparticle, 5 = Quasiparticle first half sine}.
  • nr_threads (int) – Number of threads to be used in the computation of FFT by PyFFTW
  • Credits
  • ——-
  • Julian Moosmann, KIT (Germany) is acknowledged for this code
stp_core.phaseretrieval.phrt.phrt_plan(im, energy, distance, pixsize, regpar, thresh, method, padding)[source]

Pre-compute data to save time in further execution of phase_retrieval.

Parameters:
  • im (array_like) – Image data as numpy array. Only image size (shape) is actually used.
  • energy [KeV] (double) – Energy in KeV of the incident X-ray beam.
  • distance [mm] (double) – Sample-to-detector distance in mm.
  • pixsize [mm] (double) – Size in mm of the detector element.
  • regpar (double) – Regularization parameter: RegPar is - log10 of the constant to be added to the denominator to regularize the singularity at zero frequency, i.e. 1/sin(x) -> 1/(sin(x)+10^-RegPar). Typical values in the range [2.0, 3.0]. (Suggestion for default: 2.5).
  • thresh (double) – Parameter for Quasiparticle phase retrieval which defines the width of the rings to be cropped around the zero crossing of the CTF denominator in Fourier space. Typical values in the range [0.01, 0.1]. (Suggestion for default: 0.1).
  • method (int) – Phase retrieval algorithm {1 = TIE (default), 2 = CTF, 3 = CTF first-half sine, 4 = Quasiparticle, 5 = Quasiparticle first half sine}.
  • padding (bool) – Apply image padding to better process the boundary of the image.

References

Notes

Credits to Julian Moosmann, KIT (Germany) is acknowledged for this code