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
Serialized magnets: implement the agreed accessor convention in design and live #473
A serialized family (N magnets on one power supply) has a single degree of freedom, the PS current I. Today the
accessors do not follow one convention:
family.hardware.get() returns N × I. For the SOLEIL S9 family (16 sextupoles) it read -3512 A while the PS showed -219 A.
family.strength.get() returns the sum of the strengths, while family.strength.set(x) sets the strength of the first magnet to x. So x.set(x.get()) changes the machine.
In design, setting the strength of one magnet splits the value by magnet length. In live, it converts through that
magnet's own curve. The same call gives different results in the two modes.
Writing through a magnet array that contains only some of the magnets of a series moves the PS by only 1/N of the
request. The PS current is the mean over all N magnets, and the magnets not in the array keep their old value.
Expected behavior
Magnet i of the series has strength k_i = f_i(I), where f_i is its sub-model.
Accessor
get()
set(x)
family.hardware
I
write I = x
family.strength
average strength Σ f_i(I) / N
solve Σ f_i(I) / N = x for I, write it
magnet[i].hardware
I
write I = x (all magnets follow)
magnet[i].strength
k_i = f_i(I)
write I = f_i⁻¹(x), the others follow as f_j(I). No length weighting.
Writing through a magnet array: each magnet of a series that is in the array asks for a current (f_i⁻¹(x_i)). The PS
gets the average of the currents asked by the magnets present in the array, not by all N.
One magnet of the series in the array: I = f_i⁻¹(x), as in the table.
Several magnets with consistent values: the same I.
Inconsistent values: their average, with a warning.
This gives two guarantees:
x.set(x.get()) never changes the machine, for any accessor.
design and live return the same values for the same I.
Activity
get/setare not consitent anddesign/livedisagree #461