Skip to content

Adding Aperture VertexParameters - #101

Draft
danielkallendorf wants to merge 3 commits into
pals-project:mainfrom
danielkallendorf:main
Draft

danielkallendorf wants to merge 3 commits into
pals-project:mainfrom
danielkallendorf:main

Conversation

@danielkallendorf

Copy link
Copy Markdown

Hey,

I tried adding the generalized vertex description to 'ApertureP', but for some reasons this breaks the loading of an element:

import pals
from pals.parameters.ApertureParameters import Vertex, Vertices
lattice = pals.Lattice(
    name="test_lat",
    branches=[
        pals.BeamLine(
            name="test_bl",
            line=[pals.Sextupole(
                name="sextupole1",
                length=0.2,
                MagneticMultipoleP=pals.MagneticMultipoleParameters(
                    Bn2=1.0),
                ApertureP=pals.ApertureParameters(shape="VERTICES", vertices=Vertices(
                    list=[Vertex(point=(-0.1, 0), radius=0.1), Vertex(point=(0.1, 0))]))
            )
            ])
    ])
lattice.to_file("xyz.pals.yaml")
loaded_lattice = pals.Lattice.from_file('xyz.pals.yaml')
loaded_lattice.branches[0].line
gives `[PlaceholderName('sextupole1', unresolved)]`

Can you give me a hint what the issue might be?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant