ocelot.adaptors.madx_old

Module Contents

Classes

MadObj

Functions

RFcavity(l, volt, lag, harmon)

line_transform(file)

replace “:=” by “=”

find_objects(lines)

searching mad’s objects. if there ara name and “:” it is object

subs_objects(mad_objs)

parse_obj(mad_objs)

replace_objects(lines, mad_objs)

translate(lines)

c2py(lines)

collect_sequence(lines)

lattice_str_from_madx(filename_seq)

save_lattice_str(lines, filename)

madx_seq2ocelot_seq(list_elem_pos, tot_length, exclude_elems=[])

madx2ocelot(file_seq, exclude_elems)

ocelot.adaptors.madx_old.__author__ = Sergey Tomin
ocelot.adaptors.madx_old.RFcavity(l, volt, lag, harmon)
class ocelot.adaptors.madx_old.MadObj
name =
type =
params =
parse_params(self)
ocelot.adaptors.madx_old.line_transform(file)

replace “:=” by “=” replace ‘!’ by ‘#’ if there is not “;” at the end line, collect the multiline all letters in lowercase

ocelot.adaptors.madx_old.find_objects(lines)

searching mad’s objects. if there ara name and “:” it is object

ocelot.adaptors.madx_old.subs_objects(mad_objs)
ocelot.adaptors.madx_old.parse_obj(mad_objs)
ocelot.adaptors.madx_old.replace_objects(lines, mad_objs)
ocelot.adaptors.madx_old.translate(lines)
ocelot.adaptors.madx_old.c2py(lines)
ocelot.adaptors.madx_old.collect_sequence(lines)
ocelot.adaptors.madx_old.lattice_str_from_madx(filename_seq)
ocelot.adaptors.madx_old.save_lattice_str(lines, filename)
ocelot.adaptors.madx_old.madx_seq2ocelot_seq(list_elem_pos, tot_length, exclude_elems=[])
ocelot.adaptors.madx_old.madx2ocelot(file_seq, exclude_elems)
ocelot.adaptors.madx_old.name_file = petra3.txt