Input#

class georges.manzoni.input.Input(sequence: List[ManzoniElement] | None = None, beam: Beam | None = None, mapper: Dict[str, int] | None = None)[source]#

Bases: object

Attributes Summary

beam

df

sequence

Methods Summary

adjust_energy(input_energy)

compute_efficiency(input_energy)

freeze()

Freezes all elements in the input sequence.

from_sequence(sequence[, from_element, ...])

Creates a new Input from a generic sequence from georges_core.

get_parameters(element[, parameters])

insert_thin_element([sequence, position, ...])

Insert a thin element (e.g fringes) in the sequence.

set_integrator([integrator])

set_parameters(element, parameters)

to_df()

Returns: A pandas.DataFrame of the sequence

track(beam[, observers, check_apertures])

param beam:

twiss(kinematics[, reference_particle, ...])

param kinematics:

unfreeze()

Unfreezes all elements in the input sequence.

Attributes Documentation

beam#
df#
sequence#

Methods Documentation

adjust_energy(input_energy: Quantity)[source]#
compute_efficiency(input_energy: Quantity) float[source]#
freeze()[source]#

Freezes all elements in the input sequence.

Returns:

self to allow method chaining

classmethod from_sequence(sequence: Sequence, from_element: str | None = None, to_element: str | None = None)[source]#

Creates a new Input from a generic sequence from georges_core.

Parameters:
  • sequence

  • from_element

  • to_element

Returns:

get_parameters(element: str, parameters: List | str | None = None)[source]#
classmethod insert_thin_element(sequence: Input | None = None, position: int = 0, thin_element: ManzoniElement | None = None) Input[source]#

Insert a thin element (e.g fringes) in the sequence.

Parameters:
  • sequence – the manzoni sequence

  • position – index of the position to insert in the sequence

  • thin_element – element to insert

Returns:

A new instance of manzoni.Input

set_integrator(integrator: ~georges.manzoni.integrators.Integrator = <class 'georges.manzoni.integrators.MadXIntegrator'>)[source]#
set_parameters(element: str, parameters: Dict)[source]#
to_df()[source]#

Returns: A pandas.DataFrame of the sequence

track(beam: Beam, observers: List[Observer] | Observer | None = None, check_apertures: bool = True) List[Observer] | Observer[source]#
Parameters:
  • beam

  • observers

  • check_apertures

Returns:

the Observer object containing the tracking results.

twiss(kinematics: Kinematics, reference_particle: ndarray | None = None, offsets=None, twiss_parametrization: bool = True, twiss_init: BetaBlock | None = None) DataFrame[source]#
Parameters:
  • kinematics

  • reference_particle

  • offsets

  • twiss_parametrization

  • twiss_init

Returns:

The dataframe with the Twiss functions at each element.

unfreeze()[source]#

Unfreezes all elements in the input sequence.

Returns:

self to allow method chaining