Skip to main content

LAURA: Lattice Architecture for a Unified Representation of Accelerators

LAURA is a Python package for describing, simulating, and controlling particle accelerator lattices. It provides a standardized, extensible data model for elements, sections, layouts, and full machine models.


Architecture Overview

LAURA organizes accelerator elements using a hierarchical structure:

Element Structure

LAURA Element Structure

  • baseElement: Core identification (name, hardware_class, hardware_type, machine_area)
  • Element: Extends with simulation, controls, electrical, manufacturer info
  • PhysicalBaseElement: Adds position, rotation, length, error, survey

Lattice Structure

LAURA Lattice Structure

  • ElementList: Container for elements
  • SectionLattice: Ordered list of elements (a section of the beamline)
  • MachineLayout: Sequence of sections (a full beam path)
  • MachineModel: All layouts, sections, and elements (the full accelerator)

Quick Examples

Create a Basic Element

from laura.models.element import baseElement

element = baseElement(
    name="QUAD-01",
    hardware_class="Magnet",
    hardware_type="Quadrupole",
    machine_area="LINAC-1"
)
print(element.name)  # "QUAD-01"

Element with Physical Properties

from laura.models.element import PhysicalBaseElement
from laura.models.physical import PhysicalElement, Position

cavity = PhysicalBaseElement(
    name="CAV-01",
    hardware_class="RF",
    hardware_type="Cavity",
    machine_area="LINAC-1",
    physical=PhysicalElement(
        length=1.0,
        middle=Position(x=0, y=0, z=5.0)
    )
)
print(cavity.physical.length)  # 1.0

Create a Section Lattice

from laura.models.elementList import SectionLattice, ElementList

section = SectionLattice(
    name="INJECTOR",
    order=["BPM-01", "QUAD-01"],
    elements=ElementList(elements={
        "BPM-01": element,
        "QUAD-01": cavity
    })
)
print(section.names)  # ["BPM-01", "QUAD-01"]

Build a Machine Layout

from laura.models.elementList import MachineLayout

layout = MachineLayout(
    name="MainBeamline",
    sections={"INJECTOR": section}
)
print(layout.names)  # ["INJECTOR"]

Full Machine Model

from laura.models.elementList import MachineModel

model = MachineModel(
    elements={"QUAD-01": element, "CAV-01": cavity}
)
print(list(model.sections.keys()))  # ["LINAC-1"]

Translator Module

LAURA includes a translator system for exporting accelerator models to various simulation codes, such as ASTRA, GPT, Elegant, CSRTrack, Ocelot, Cheetah, Xsuite, Wake-T, Genesis, and MAD-X (via cpymad).

  • Translate individual elements, sections, layouts, or full machine models.
  • Export to code-specific formats and objects.
  • Automatically manage drift spaces, field maps, and code-specific configuration.

Example: Export a section to Elegant and Ocelot

from laura.translator.converters.section import SectionLatticeTranslator

translator = SectionLatticeTranslator.from_section(section)
translator.directory = "./output"

elegant_string = translator.to_elegant(charge=1e-9)
ocelot_lattice = translator.to_ocelot(save=True)

See the Translator documentation for details and more examples.


Features

  • Hierarchical lattice structure: elements → sections → layouts → machine
  • Flexible element definition: physical, simulation, controls, electrical, manufacturer
  • Extensible API: add new element types and metadata
  • Simulation & controls integration: store simulation parameters and control variables
  • Export to simulation codes via the Translator module


Installation

Install LAURA from PyPI:

pip install laura-accelerator

Or add to your requirements.txt:

laura-accelerator

Documentation


Contributing

Issues and pull requests are welcome! See GitHub Issues.


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

laura_accelerator-1.0.1.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

laura_accelerator-1.0.1-py3-none-any.whl (709.0 kB view details)

Uploaded Python 3

File details

Details for the file laura_accelerator-1.0.1.tar.gz.

File metadata

  • Download URL: laura_accelerator-1.0.1.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.20

File hashes

Hashes for laura_accelerator-1.0.1.tar.gz
Algorithm Hash digest
SHA256 9b801f20ec7a692675001682e2c3899744d9188181d6b2bdd45bb6ec9fd0fd21
MD5 7563cf23224443954e389c0de10e498d
BLAKE2b-256 816bbaa8b34fff07d7a8e7b636482a05d3a6381e6e2d7e07026526b9659ddf00

See more details on using hashes here.

File details

Details for the file laura_accelerator-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for laura_accelerator-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 53077552fdbfc992cd3e0da56a724f8f57b27a013425cc8cc1d27130a68eebd6
MD5 f4dd378d432aa7cb17221e143a29245d
BLAKE2b-256 6f4fc636a9f3d9e4658c01a1169d45137eff702afc1f36f8c853f61803021bea

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.3

2 files

1.0.2

2 files

This release

1.0.1 This release

2 files

1.0.0

2 files

0.2.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page