accelphys

The accelphys module makes it simpler to do generic accelerator physics calculations and conversions.

Conversions

BDES2K(bdes, quad_length, energy) Converts a quadrupole B_des into a geometric focusing strength K.
K2BDES(K, quad_length, energy) Returns the BDES for a quadrupole with geometric strength K and length quad_length for a beam with a given energy.

Fitting

fitimageslice(img, res_x, res_y, xslice, yslice) Fits a gaussian to a slice of an image img specified by xslice x-coordinates and yslice y-coordinates.