Step 1
When parsing a lattice in an external format (e.g., MAD-X), the question arises of how best to treat element fringe fields.
When a MAD-X SBEND is specified, the default MAD-X parser adds DipEdge elements at entry and exit of the ImpactX bending element, to model the treatment of fringe fields. Depending on the value of min_model, either the linear or nonlinear fringe field model is applied. This is a reasonable approach.
When a MAD-X QUAD is specified, the default MAD-X parser does not currently apply a fringe field model. Suggested fix: Since the currently-implemented quadrupole fringe field model has no effect at linear order, ignore fringe fields when min_model="linear". When min_model="exact", apply a corresponding QuadEdge at entry and exit. The case min_model="paraxial" is tbd.
Step 2, maybe as a how-to workflow
Another suggestion: Add a global flag to the parser to turn fringe fields on or off. (When turned on, the rules above can be applied.) This case is useful because different codes often use different fringe field models, and it is common to compare codes with FF turned off, or to study sensitivity to those models.
Step 1
When parsing a lattice in an external format (e.g., MAD-X), the question arises of how best to treat element fringe fields.
When a MAD-X SBEND is specified, the default MAD-X parser adds
DipEdgeelements at entry and exit of the ImpactX bending element, to model the treatment of fringe fields. Depending on the value ofmin_model, either the linear or nonlinear fringe field model is applied. This is a reasonable approach.When a MAD-X QUAD is specified, the default MAD-X parser does not currently apply a fringe field model. Suggested fix: Since the currently-implemented quadrupole fringe field model has no effect at linear order, ignore fringe fields when
min_model="linear". Whenmin_model="exact", apply a correspondingQuadEdgeat entry and exit. The casemin_model="paraxial"is tbd.Step 2, maybe as a how-to workflow
Another suggestion: Add a global flag to the parser to turn fringe fields on or off. (When turned on, the rules above can be applied.) This case is useful because different codes often use different fringe field models, and it is common to compare codes with FF turned off, or to study sensitivity to those models.