2.3.2. accelphys¶
Calculates various useful quantities in accelerator physics.
-
scisalt.accelphys.BDES2K(bdes, quad_length, energy)[source]¶ Returns the geometric strength for a quadrupole with bdes and length quad_length for a beam with a given energy.
-
scisalt.accelphys.K2BDES(K, quad_length, energy)[source]¶ Returns the BDES for a quadrupole with geometric strength K and length quad_length for a beam with a given energy.
-
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)