Skip to content

read_element

Vyacheslav Fedorov edited this page Dec 29, 2019 · 4 revisions

The Read element function

Reads and interpolates the field profile of an element / elements from a text file and returns the functions - the field and its derivative.

def kenv.read_fields(beamline, z)

def kenv.read_offsets(beamline, z)

In case of an empty beamline returns null functions.


Parameters:

  • beamline (dict) - dictionary of elements of the form {'element id': kenv.Element(element_z0, element_max_field, element_file_name, element_id)}.

  • z (numpy.array) [m] - array of axis z.