Skip to content

Conversation

@EZoni
Copy link
Member

@EZoni EZoni commented Apr 30, 2025

This is a prototype of custom element wrapper that could be done to achieve what was discussed in #3 (review) and #3 (comment).

In YAML format, the custom element wrapper produces this format

kind: Line
line:
- Drift:
    length: 0.25
    name: drift1
- Quadrupole:
    MagneticMultipoleP:
      Bn1: 1.0
    length: 1.0
    name: quad1
- Drift:
    length: 0.5
    name: drift2
- Quadrupole:
    MagneticMultipoleP:
      Bn1: -1.0
    length: 1.0
    name: quad2
- Drift:
    length: 0.5
    name: drift3

instead of this format

kind: Line
line:
- kind: Drift
  length: 0.25
  name: drift1
- MagneticMultipoleP:
    Bn1: 1.0
  kind: Quadrupole
  length: 1.0
  name: quad1
- kind: Drift
  length: 0.5
  name: drift2
- MagneticMultipoleP:
    Bn1: -1.0
  kind: Quadrupole
  length: 1.0
  name: quad2
- kind: Drift
  length: 0.5
  name: drift3

This would be alternative to the custom read/write example in #8.

@EZoni EZoni force-pushed the schema_custom_wrapper branch from 767a6e1 to 800024c Compare April 30, 2025 18:46
@EZoni
Copy link
Member Author

EZoni commented Jul 9, 2025

Closing as obsolete.

@EZoni EZoni closed this Jul 9, 2025
@EZoni EZoni deleted the schema_custom_wrapper branch July 21, 2025 21:32
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