pyfibre.model.tools.analysis module¶
PyFibre Image Tools Library
Created by: Frank Longford Created on: 09/03/2018
-
pyfibre.model.tools.analysis.angle_analysis(angles, weights=None, n_bin=200)[source]¶ Creates a histogram of values in array angles, with optional argument weights. Returns SDI value of each binned angle in histogram.
- Parameters
angles (array_like of floats) – Array of angles to bin
weights (array_like of floats, optional) – Array of weights corresponding to each value in angles
n_bin (int, optional) – Number of bins for histogram
- Returns
angle_sdi, angle_x – Angle and SDI values corresponding to each bin in histogram
- Return type
array_like of floats
-
pyfibre.model.tools.analysis.fourier_transform_analysis(image, n_split=1, sigma=None)[source]¶ Calculates fourier amplitude spectrum for image
- Parameters
- Returns
angles, fourier_spec (array_like of floats) – Angles and average fourier amplitudes of FFT performed on image
sdi (float)
-
pyfibre.model.tools.analysis.tensor_analysis(tensor)[source]¶ Calculates eigenvalues and eigenvectors of average tensor over area^2 pixels for n_samples
- Parameters
tensor (array_like of floats) – Average tensor over area under examination. Can either refer to a single image or stack of images; in which case outer dimension must represent a different image in the stack
- Returns
tot_coher, tot_angle, tot_energy – Coherence, angle and energy values of input tensor
- Return type
array_like of floats