You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature: CFM Refurbishment and Multipole Mapping Renaming #302
Description, motivation and use case
Following the discussions in issue #299, this sub-issue focuses strictly on the cleanup, refurbishment, and syntax improvement of the Combined Function Magnet (CFM) configuration.
The goal is to move away from rigid, hardcoded multipole keys (B0, A0, B1, etc.) towards a more readable, component-oriented syntax, while eliminating code and configuration duplication between the CFM magnets and their underlying models.
Proposed solution
Unified Mapping Syntax (Renaming)
Instead of using abstract polynomial coefficient names in the configuration file, the mapping will now use the explicit component/class names. This improves readability for users and simplifies internal code routing.
Remove the duplicate multipole declarations currently shared between cfm_magnet and its model.
The model should solely be responsible for computing the conversion from hardware units (e.g., current/voltage) to physics units, without redundant configuration blocks.
Core Behavior Preservation
No KickAngle Integration: As agreed, we will keep using PolynomA[0] / PolynomB[0] (integrated strengths/angles) for correctors within pyAML. A specific handling of KickAngle for AT's CorrectorPass is out of scope and will be treated later if needed.
No Higher-Order Polynomials (>3): This remains a topic for the error/commissioning layer (sr.errors) and is excluded from this control system refurbishment.
Describe alternatives you've considered
See issue #299
It looks ok to me too, but I would like a clarification on the model duplication cleanup.
Many cfm magnets are built so that e.g. Dipole and Quadrupole components are linked to one power-supply.
I imagine a suitable model will still be able to handle this link. Is this correct?
It looks ok to me too, but I would like a clarification on the model duplication cleanup.
Many cfm magnets are built so that e.g. Dipole and Quadrupole components are linked to one power-supply. I imagine a suitable model will still be able to handle this link. Is this correct?
Our DQ fit in this model but the model are for the moment limited to CFM on one single element and however invertible model.
The refurbishment proposed should not bring more limitation expect that you will have to know the order of your mapping when developing a model, which will be implicit.
@GamelinAl
In fact for controlling dipole we have an opened issue #136 concerning energy change.
Dipole and Corrector are different. We expect that controlled dipole depends only on Brho while a Corrector will depend on both Brho and angle.
Activity
gupichon commentedon Jun 26, 2026
@JeanLucPons, @TeresiaOlsson @kparasch @gubaidulinvadim @GamelinAl
JeanLucPons commentedon Jun 26, 2026
Seems ok to me.
TeresiaOlsson commentedon Jun 26, 2026
For me too. What names do you plan for the skew components? Something like skewsextupole or skew_sextupole?
JeanLucPons commentedon Jun 26, 2026
I expect the existing python class:
The above map will vanish.
kparasch commentedon Jun 26, 2026
It looks ok to me too, but I would like a clarification on the model duplication cleanup.
Many cfm magnets are built so that e.g. Dipole and Quadrupole components are linked to one power-supply.
I imagine a suitable model will still be able to handle this link. Is this correct?
TeresiaOlsson commentedon Jun 26, 2026
Maybe SkewQuad etc should be SkewQuadrupole to make the names consistent? Or alternatively accept both Quad and Quadrupole as names.
JeanLucPons commentedon Jun 26, 2026
Our DQ fit in this model but the model are for the moment limited to CFM on one single element and however invertible model.
The refurbishment proposed should not bring more limitation expect that you will have to know the order of your mapping when developing a model, which will be implicit.
gupichon commentedon Jun 26, 2026
I may create a fallback to the correct class for some known cases (SkewQuadrupole -> SkewQuad). I'll see when l'll work on that part...
GamelinAl commentedon Jun 30, 2026
If we have alias, then I would add:
For a ramped accelerator (e.g. booster), it makes more sense to talk about controlling dipoles
JeanLucPons commentedon Jun 30, 2026
@GamelinAl
In fact for controlling dipole we have an opened issue #136 concerning energy change.
Dipole and Corrector are different. We expect that controlled dipole depends only on Brho while a Corrector will depend on both Brho and angle.
gubaidulinvadim commentedon Oct 13, 2026
@gupichon-soleil Is this issue still relevant?
gupichon-soleil commentedon Oct 13, 2026
@gubaidulinvadim Nope