tomophantom.flatsgen
#
Copyright 2023 The University of Manchester & Diamond Light Source Licensed under the Apache License, Version 2.0.
- tomophantom.flatsgen.synth_flats(projData3D_clean: numpy.ndarray, source_intensity: int, detectors_miscallibration: float = 0.05, variations_number: int = 3, arguments_Bessel: tuple = (1, 25), specklesize: int = 2, kbar: int = 2, sigmasmooth: int = 3, jitter_projections: float = 0.0, flatsnum: int = 20) list [source]#
Function to generate synthetic flat field images and raw data for projection data normalisation. This is more realistic modelling of stripes and various normalisation artefacts.
- Parameters
projData3D_clean (np.ndarray) – 3D projection data of the following shape: (DetectorsVert, anglesDim, DetectorsHoriz).
source_intensity (int) – Source intensity which affects the amount of the Poisson noise added to data.
detectors_miscallibration (float, optional) – A constant which perturbs some detectors positions, leading to more prounonced ring artefacts. Defaults to 0.05.
variations_number (int, optional) – A type of function to control stripe type (1 - linear, 2, - sinusoidal, 3 - exponential). Defaults to 3.
arguments_Bessel (tuple, optional) – A tuple of 2 arguments for 2 Bessel functions to control background variations in flats. Defaults to (1,25).
specklesize (int, optional) – Speckle size in pixel units for flats background simulation. Defaults to 2.
kbar (int, optional) – Mean photon density (photons per pixel) for background simulation. Defaults to 2.
sigmasmooth (int, optional) – Gaussian smoothing parameter to blur the speckled backround (1,3,5,7,…). Defaults to 3.
jitter_projections (float, optional) – An additional random jitter to the projections in pixels. Defaults to 0.0.
flatsnum (int, optional) – A number of flats to generate. Defaults to 20.
- Returns
List that contains [np.uint16(projData3D_raw), np.uint16(simulated_flats), blurred_speckles_map]
- Return type
list