PlacementSequence

class georges_core.sequences.PlacementSequence(name: str = '', data: Optional[List[Tuple[georges_core.sequences.elements.Element, pint.quantity.build_quantity_class.<locals>.Quantity, pint.quantity.build_quantity_class.<locals>.Quantity, pint.quantity.build_quantity_class.<locals>.Quantity]]] = None, metadata: Optional[georges_core.sequences.sequence.SequenceMetadata] = None, reference_placement: str = 'ENTRY', element_keys: Optional[Mapping[str, str]] = None)[source]

Bases: georges_core.sequences.sequence.Sequence

Placement Sequence.

Parameters
  • name – the name of the physics

  • data – the list of commands composing the physics

  • metadata

  • reference_placement

  • element_keys

Attributes Summary

betablock

TODO

df

param df

expanded

Methods Summary

add(element_or_sequence)

param element_or_sequence

expand([drift_element])

TODO Use namedtuples

join(other)

place(element_or_sequence[, at, at_entry, …])

param element_or_sequence

place_after_last(element_or_sequence[, at, …])

param element_or_sequence

place_before_first(element_or_sequence[, …])

param element_or_sequence

reverse()

Returns:

sort([reverse])

param reverse

to_df([df, strip_units])

param df

Attributes Documentation

betablock

TODO

df
Parameters
  • df

  • strip_units

Returns:

expanded

Methods Documentation

add(element_or_sequence: Union[georges_core.sequences.elements.Element, georges_core.sequences.sequence.Sequence])[source]
Parameters

element_or_sequence

Returns:

expand(drift_element: georges_core.sequences.elements.ElementClass = <class 'abc.Drift'>) → georges_core.sequences.sequence.PlacementSequence[source]

TODO Use namedtuples

Parameters

drift_element

Returns:

join(other)[source]
place(element_or_sequence: Union[georges_core.sequences.elements.Element, georges_core.sequences.sequence.Sequence], at: Optional[pint.quantity.build_quantity_class.<locals>.Quantity] = None, at_entry: Optional[pint.quantity.build_quantity_class.<locals>.Quantity] = None, at_center: Optional[pint.quantity.build_quantity_class.<locals>.Quantity] = None, at_exit: Optional[pint.quantity.build_quantity_class.<locals>.Quantity] = None, after: Optional[str] = None, before: Optional[str] = None) → georges_core.sequences.sequence.PlacementSequence[source]
Parameters
  • element_or_sequence

  • at

  • at_center

  • at_entry

  • at_exit

  • after

  • before

Returns:

place_after_last(element_or_sequence: Union[georges_core.sequences.elements.Element, georges_core.sequences.sequence.Sequence], at: Optional[pint.quantity.build_quantity_class.<locals>.Quantity] = None, at_entry: Optional[pint.quantity.build_quantity_class.<locals>.Quantity] = None, at_center: Optional[pint.quantity.build_quantity_class.<locals>.Quantity] = None, at_exit: Optional[pint.quantity.build_quantity_class.<locals>.Quantity] = None) → georges_core.sequences.sequence.PlacementSequence[source]
Parameters
  • element_or_sequence

  • at

  • at_center

  • at_entry

  • at_exit

Returns:

place_before_first(element_or_sequence: Union[georges_core.sequences.elements.Element, georges_core.sequences.sequence.Sequence], at: Optional[pint.quantity.build_quantity_class.<locals>.Quantity] = None, at_entry: Optional[pint.quantity.build_quantity_class.<locals>.Quantity] = None, at_center: Optional[pint.quantity.build_quantity_class.<locals>.Quantity] = None, at_exit: Optional[pint.quantity.build_quantity_class.<locals>.Quantity] = None) → georges_core.sequences.sequence.PlacementSequence[source]
Parameters
  • element_or_sequence

  • at

  • at_center

  • at_entry

  • at_exit

Returns:

reverse() → georges_core.sequences.sequence.PlacementSequence[source]

Returns:

sort(reverse: bool = False) → georges_core.sequences.sequence.PlacementSequence[source]
Parameters

reverse

Returns:

to_df(df: Optional[pandas.core.frame.DataFrame] = None, strip_units: bool = False) → pandas.core.frame.DataFrame[source]
Parameters
  • df

  • strip_units

Returns: