lineoutMinima
- xripl.magnification.lineoutMinima(lineoutX, lineoutY, window_length=51, polyOrder=3, peakWidth=50, plotsFlag=False)[source]
Given lineout should be lineout from flattened radiograph image. This function smoothes the lineout using a Savitzky-Golay filter, and finds the 2 deepest minima in the lineout. These minima should correspond to the inner diameter edge of the target tube.
- Parameters
lineoutX (numpy.ndarray) – 1D array of x-axis points of the lineout from which we want to get minima.
lineoutY (numpy.ndarray) – 1D array of y-axis points of the lineout from which we want to get minima. This should be a radial lineout through the tube target. Finds minima in intensity, which should correpsond to the inner diameter edge of the tube.
window_length (int) – Window length for Savitzky-Golay filter. Must be odd numbered. Default is window that is 51 points long.
polyOrder (int) – Polynomial order for Savitzky-Golay filter. Default is 3 (cubic).
peakWidth (int) – Minimum number of points required in peak width to select the peak as a minima. Default is 50 pts wide.
plotsFlag (bool) – Flag for plotting smoothed lineout over input lineout. Also plots minima points over smoothed lineout. Default is False.