georges_core.codes_io package
Submodules
georges_core.codes_io.csv module
georges_core.codes_io.mad module
Import sequence that can be generated using MAD-X or MAD-NG.
- georges_core.codes_io.mad.MADX_TWISS_TABLE_HEADER_ROWS: int = 47
MAD-X Twiss table header rows (lines to be skipped when reading the table’s content.
- georges_core.codes_io.mad.load_mad_twiss_headers(filename: str = 'twiss.outx', path: str = '.', lines: int | None = None) Series [source]
- Parameters:
filename – name of the Twiss table file
path – path to the Twiss table file
lines – number of lines in the Twiss table file
Returns:
- georges_core.codes_io.mad.load_mad_twiss_table(filename: str = 'twiss.outx', path: str = '.', lines: int | None = None, with_units: bool = True) DataFrame [source]
- Parameters:
filename – name of the Twiss table file
path – path to the Twiss table file
lines – number of lines in the Twiss table file to skip
with_units –
- Returns:
A DataFrame representing the Twiss table.
- georges_core.codes_io.mad.get_twiss_values(table: DataFrame, element: str = '$start') Series [source]
Extract the initial Twiss parameters from a Twiss table
- Parameters:
table – a MAD twiss table read as a DataFrame
element – the name of the element at which the parameters need to be extracted
- Returns:
A Pandas Series containing the extracted Twiss parameters.
georges_core.codes_io.transport module
TODO
- class georges_core.codes_io.transport.TransportInputOriginalFlavor[source]
Bases:
TransportInputFlavor
- class georges_core.codes_io.transport.TransportInputIBAFlavor[source]
Bases:
TransportInputFlavor
- georges_core.codes_io.transport.load_transport_input_file(filename: str, path: str = '.') List [source]
- georges_core.codes_io.transport.transport_element_factory(d: ~typing.Any, sequence_metadata: ~typing.Any, flavor: ~typing.Type[~georges_core.codes_io.transport.TransportInputOriginalFlavor] | ~typing.Type[~georges_core.codes_io.transport.TransportInputIBAFlavor] = <class 'georges_core.codes_io.transport.TransportInputOriginalFlavor'>) Tuple[Element, Dict[str, Any]] [source]