LightWin
  • Installation
  • Usage
  • Example notebooks
  • The get method
  • Configuration
  • Units and conventions
  • Utility scripts
  • Bibliography
  • API Reference
    • beam_calculation package
    • config package
    • core package
    • data package
    • evaluator package
    • failures package
    • optimisation package
    • physics package
    • scripts package
    • tracewin_utils package
      • dat_files module
      • field_map_loaders module
      • interface module
      • line module
      • load module
    • ui package
    • util package
    • visualization package
    • constants module
  • Contributing
  • Changelog
LightWin
  • lightwin package
  • tracewin_utils package
  • View page source

tracewin_utils package

Define tools to communicate with TraceWin.

In particular: functions to read/write DAT file in the same fashion as TraceWin.

Submodules

  • dat_files module
    • dat_filecontent_from_file()
    • _filter_lines()
    • _insert_instructions()
    • dat_filecontent_from_smaller_list_of_elements()
    • _is_needed_element()
    • _is_useful_command()
    • export_dat_filecontent()
  • field_map_loaders module
    • warn_norm()
    • load_field_1d()
    • is_a_valid_1d_electric_field()
    • load_field_3d()
    • is_a_valid_3d_field()
    • get_number_of_cells()
    • field_values_on_axis()
    • FIELD_MAP_LOADERS
  • interface module
    • variables_to_command()
    • beam_calculator_to_command()
    • list_of_elements_to_command()
    • beam_parameters_to_command()
    • particle_initial_state_to_command()
    • set_of_cavity_settings_to_command()
    • failed_cavities_to_command()
    • _cavity_settings_to_command()
    • ARGS_POSITIONS
    • _alter_element()
    • _proper_type()
  • line module
    • DatLine
      • DatLine.__init__()
      • DatLine.__str__()
      • DatLine._parse_line()
      • DatLine.instruction
      • DatLine.line
      • DatLine.splitted_full
      • DatLine.n_args
      • DatLine.change_argument()
      • DatLine.append_argument()
    • _split_named_elements()
    • _split_weighted_elements()
    • slice_dat_line()
    • _is_a_path_instruction()
  • load module
    • load_dat_file()
    • _strip_comments()
    • _split_named_elements()
    • _split_weighted_elements()
    • slice_dat_line()
    • table_structure_file()
    • results()
    • transfer_matrices()
    • _transfer_matrix()
Previous Next

© Copyright 2026, A. Plaçais, F. Bouly, J.-M. Lagniel, D. Uriot, B. Yee-Rendon.

Built with Sphinx using a theme provided by Read the Docs.