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.


Metadata

Release files for laura-accelerator 1.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for laura-accelerator 1.1.5
File Size Uploaded Provenance Actions
laura_accelerator-1.1.5.tar.gz 1.5 MB Without provenance Details for laura_accelerator-1.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for laura-accelerator 1.1.5
File Interpreter ABI Platform Actions
laura_accelerator-1.1.5-py3-none-any.whl Python 3 none any Details for laura_accelerator-1.1.5-py3-none-any.whl

Total release size: 2.4 MB

Release files / laura_accelerator-1.1.5.tar.gz

Download URL laura_accelerator-1.1.5.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
c37a0a073b86fc7003f17cae07799161bbc9e2d6c3b6fcbf6f8ce3083a428f7e
BLAKE2b-256 checksum
How to use checksums
8746d25426d0bf244aeab7507adb16df29234e544b5ecccf39cf6bdeb2c373ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / laura_accelerator-1.1.5-py3-none-any.whl

Download URL laura_accelerator-1.1.5-py3-none-any.whl
Size 848.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7df6b42fa4758798f63d8e7695be3b8a6200df7308b614b851ad1f07811b5144
BLAKE2b-256 checksum
How to use checksums
c9ab687d7c7d53a4fa37ece88b32871f726f40faf6361530295b4a1f849bf5ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for laura-accelerator 1.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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