skbeam.core.calibration.refine_center

skbeam.core.calibration.refine_center(image, calibrated_center, pixel_size, phi_steps, max_peaks, thresh, window_size, nx=None, min_x=None, max_x=None)

Refines the location of the center of the beam.

This relies on being able to see the whole powder pattern.

Parameters
imagendarray

The image

calibrated_centertuple

(row, column) the estimated center

pixel_sizetuple

(pixel_height, pixel_width)

phi_stepsint

How many regions to split the ring into, should be >10

max_peaksint

Number of rings to look it

threshfloat

Fraction of maximum peak height

window_sizeint, optional

The window size to use (in bins) to use when refining peaks

nxint, optional

Number of bins to use for radial binning

min_xfloat, optional

The minimum radius to use for radial binning

max_xfloat, optional

The maximum radius to use for radial binning

Returns
calibrated_centertuple

The refined calibrated center.