scisalt.accelphys.fitimageslice¶
-
scisalt.accelphys.fitimageslice(img, res_x, res_y, xslice, yslice, avg_e_func=None, h5file=None, plot=False)[source]¶ Fits a gaussian to a slice of an image img specified by xslice x-coordinates and yslice y-coordinates. res_x and res_y specify image resolution in x and y. avg_e_func is a function that returns the energy of the image as a function of x. It should have the form:
avg_e_func(x_1, x_2, h5file, res_y)
Fits a gaussian to a slice of an image.
Parameters: img : array
Image to be fitted.
res_x : int
Image resolution in
.res_y : int
Image resolution in
.xslice : (int, int)
Slice coordinates in

yslice : (int, int)
Slice coordinates in

avg_e_func : function
Of the form avg_e_func(x_1, x_2, h5file, res_y), returns the energy of the image as a function of
.h5file : h5file
Instance from dataset.
plot : boolean
Whether to plot or not.