Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 29 additions & 25 deletions examples/fodo.pals.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,36 @@
# - definition of a FODO channel that:
# - repeats a line (fodo_cell) three times
#
- drift1:
kind: Drift
length: 0.25
PALS:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed today: Start with PALS: or - PALS:?

Claude:
image

I personally also find the extra nesting to get a bit excessive if we start with a list. When we import into each other, we would anyway do it in the lattice: ... list.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image image

Copy link
Member Author

@ax3l ax3l Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed with @DavidSagan : We would combine files and use immediate evaluation / sets like this later on:

PALS:
  version: null  # later, we will put the version of the PALS standard here

  imports:
    - "first.pals.yaml"  # adds elements to the beginning of "lattice: ..."
    - "second.pals.yaml"  # adds more elements (to the end of) "lattice: ..."

  elements:
    # elements from first.pals.yaml
    # elements from second.pals.yaml

    - another_drift:
        kind: Drift
        length: 0.25   

    - set: "..."  # can manipulate all elements

first.pals.yaml and second.pals.yaml would use the same schema (PALS: version: elements: ...).
We can later on allow to sub-select a beamline in imports:, e.g., first.pals.yaml:FODO for a named BeamLine only.

Copy link
Member Author

@ax3l ax3l Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rolled somehow back today, now includes use a "magic element name" like the set command:

Discussed with @DavidSagan : We would combine files and use immediate evaluation / sets like this later on:

PALS:
  version: null  # later, we will put the version of the PALS standard here

  lattices:
    - include: "first.pals.yaml"  # adds elements & commands
    - include: "second.pals.yaml"  # adds more elements & commands

    - another_drift:
        kind: Drift
        length: 0.25   

    - set: "..."  # can manipulate all elements

first.pals.yaml and second.pals.yaml would use the same schema (PALS: version: lattices: ...).
We can later on allow to sub-select a beamline in imports:, e.g., first.pals.yaml:FODO for a named BeamLine only.

Copy link
Member Author

@ax3l ax3l Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My personal preference is to call this group elements:.

I do not think it is confusing if elements includes a list of elements and commands like include/set, and it is quite descriptive (vs. writing "nodes" or "objects" or "list").

PALS:
  version: null  # later, we will put the version of the PALS standard here

  elements:
    - include: "first.pals.yaml"  # adds elements & commands

    - another_drift:
        kind: Drift
        length: 0.25   

    - set: "..."  # can manipulate all elements

    - include: "second.pals.yaml"  # adds more elements & commands

    - my_lattice:
        kind: Lattice
        branches:
          - ...

version: null # later, we will put the version of the PALS standard here

- quad1:
kind: Quadrupole
MagneticMultipoleP:
Bn1: 1.0
length: 1.0

- fodo_cell:
kind: BeamLine
line:
- drift1
- quad1
- drift2:
elements:
- drift1:
kind: Drift
length: 0.5
- quad2:
inherit: quad1
length: 0.25

- quad1:
kind: Quadrupole
MagneticMultipoleP:
Bn1: -1.0
- drift1

- fodo_channel:
kind: BeamLine
line:
Bn1: 1.0
length: 1.0

- fodo_cell:
repeat: 3
kind: BeamLine
line:
- drift1
- quad1
- drift2:
kind: Drift
length: 0.5
- quad2:
inherit: quad1
MagneticMultipoleP:
Bn1: -1.0
- drift1

- fodo_channel:
kind: BeamLine
line:
- fodo_cell:
repeat: 3