nabu.resources.helical_calc
source module nabu.resources.helical_calc
Module for calculations of helical scans
Classes
Functions
-
get_angular_precision — Return the angular precision, in degrees of an array of angles Angles are assumed to be a monotonic sequence, possibly wrapped (eg. to pi or 2pi).
-
get_memory_footprint — Return the memory footprint in GB (not GiB !) for various components
source get_angular_precision(angles_deg, percentile=1)
Return the angular precision, in degrees of an array of angles Angles are assumed to be a monotonic sequence, possibly wrapped (eg. to pi or 2pi).
source class HelicalScanCalc(dataset_info, dz=None, all_angles=None)
Methods
-
height — Get the "heights" (in pixels) for a given z-slice, as a function of angular indices. Ideally: h(z, i) = z + i*dz
-
i_min — Return the first angular index where "z" enters the field of view
-
i_max — Return the last angular index where "z" enters the field of view
-
z_min — Return the minimum "z" that enters the FoV starting from angular index "i"
-
z_max — Return the maximum "z" that exits the FoV at angular index "i"
-
get_angles — Get angles associated to "z", i.e, get all the angles for which the sample at height "z" is imaged.
-
compute_angles_weights — Compute the "weights" to be applied at each angle for a given z-sinogram. When doing a helical tomography, some angles are imaged more than others. This function counts how many times each angle of a given z-sinogram is seen.
-
get_number_of_steps — Return the number of steps to reconstruct the whole scan, i.e maximum k such that k * chunk_size < n_angles - 1 and (k+1)*chunk_size >= n_angles - 1
source method HelicalScanCalc.height(z, i)
Get the "heights" (in pixels) for a given z-slice, as a function of angular indices. Ideally: h(z, i) = z + i*dz
source method HelicalScanCalc.get_angular_indices(z)
Get the indices corresponding to angles where a given "z" is imaged
angular_indices(z) = {i, h(z, i) is in FoV}
source method HelicalScanCalc.i_min(z)
Return the first angular index where "z" enters the field of view
source method HelicalScanCalc.i_max(z)
Return the last angular index where "z" enters the field of view
source method HelicalScanCalc.get_z_indices(i)
Get the z-indices corresponding to slices that are in the FoV at angular index "i"
z_indices(i) = {z, h(z, i) is in FoV}
source method HelicalScanCalc.z_min(i)
Return the minimum "z" that enters the FoV starting from angular index "i"
source method HelicalScanCalc.z_max(i)
Return the maximum "z" that exits the FoV at angular index "i"
source method HelicalScanCalc.get_angles(z)
Get angles associated to "z", i.e, get all the angles for which the sample at height "z" is imaged.
source method HelicalScanCalc.compute_angles_weights(z, angles=None, tol=None)
Compute the "weights" to be applied at each angle for a given z-sinogram. When doing a helical tomography, some angles are imaged more than others. This function counts how many times each angle of a given z-sinogram is seen.
source method HelicalScanCalc.get_number_of_steps(chunk_size)
Return the number of steps to reconstruct the whole scan, i.e maximum k such that k * chunk_size < n_angles - 1 and (k+1)*chunk_size >= n_angles - 1
source get_extraction_points(z1, z2, helical_calc, angles_chunk_size=1000)
source get_memory_footprint(helical_calculator, start_z, end_z, angles_chunk_size=1000, rec_shape=None)
Return the memory footprint in GB (not GiB !) for various components
end_z is included!