latform Documentation¶
latform is a Bmad lattice parser/formatter tool for parsing, formatting, analyzing, and comparing particle accelerator lattice files.
Installation¶
pip install latform
For development:
pip install -e ".[test]"
Quick Start¶
Format a lattice file and print to stdout:
latform my_lattice.bmad
Format in-place:
latform -i my_lattice.bmad
Preview what the formatter would change:
latform --diff my_lattice.bmad
Tools¶
latform provides these CLI commands:
- latform -- Format Bmad lattice files
- latform-dump -- Extract parameters and element information
- latform-diff -- Compare two lattice files
- latform-gitdiff -- Compare a lattice file across git revisions
- latform-graph -- Visualize file dependency trees
Documentation¶
- CLI Reference -- Full command-line usage for all tools
- Python API -- Using latform as a library
- Style Guide -- The formatting rules latform applies