at.lattice.elements.variable_elements#
Time-dependent thin multipole.
Classes
|
Class to define the excitation types. |
|
Class to generate an AT variable thin multipole element. |
- class ACMode(*values)[source]#
Bases:
IntEnumClass to define the excitation types.
- ARBITRARY = 2#
- INTERPOLATION_TABLE = 3#
- SINE = 0#
- WHITENOISE = 1#
- class VariableThinMultipole(family_name, mode=ACMode.SINE, AmplitudeA=None, AmplitudeB=None, **kwargs)[source]#
Bases:
ElementClass to generate an AT variable thin multipole element.
Create a variable thin multipole.
- Parameters:
family_name (str) – Element name
mode (ACMode) –
one of the following at.ACMode. Default at.ACMode.SINE.
at.ACMode.SINE: sine functionat.ACMode.WHITENOISE: gaussian white noiseat.ACMode.ARBITRARY: user defined turn-by-turn kick listat.ACMode.INTERPOLATION_TABLE: linear interpolation from user curve
- Keyword Arguments:
AmplitudeA (list,float) – Amplitude of the excitation for PolynomA. Default None
AmplitudeB (list,float) – Amplitude of the excitation for PolynomB. Default None
FrequencyA (float) – Frequency of the sine excitation for PolynomA
FrequencyB (float) – Frequency of the sine excitation for PolynomB
PhaseA (float) – Phase of the sine excitation for PolynomA. Default 0
PhaseB (float) – Phase of the sine excitation for PolynomB. Default 0
Sinmin (float) – Sine function min limit. Default -1.1
Sinmax (float) – Sine function max limit. Default +1.1
MaxOrder (int) – Order of the multipole for scalar amplitude. Default 0
FuncA (list|array) – User defined tbt kick list for PolynomA
FuncB (list|array) – User defined tbt kick list for PolynomB
Periodic (bool) – If True (default) the user defined kick is repeated
Ramps (list) –
- Vector (t0, t1, t2, t3) in turn number to define the ramping
of the excitation
t<t0: excitation amplitude is zerot0<t<t1: excitation amplitude is linearly ramped upt1<t<t2: excitation amplitude is constantt2<t<t3: excitation amplitude is linearly ramped downt3<t: excitation amplitude is zero
Examples
>>> acmpole = at.VariableThinMultipole( ... "ACMPOLE", at.ACMode.SINE, AmplitudeB=amp, FrequencyB=frequency ... ) >>> pos_halfsine = at.VariableThinMultipole( ... "PHALFSINE", at.ACMode.SINE, AmplitudeB=amp, FrequencyB=frequency, ... Sinmin=0) >>> sine_saturated, at.VariableThinMultipole( ... "SATSINE", at.ACMode.SINE, AmplitudeB=amp, FrequencyB=frequency, ... Sinmax=0.9) >>> acmpole = at.VariableThinMultipole( ... "ACMPOLE", at.ACMode.WHITENOISE, AmplitudeB=amp, ... ) >>> acmpole = at.VariableThinMultipole( ... "ACMPOLE", at.ACMode.ARBITRARY, AmplitudeB=amp, FuncB=fun, ... ) >>> fvst = at.VariableThinMultipole( ... "FvsT", at.ACMode.INTERPOLATION_TABLE, AmplitudeB=amp, FuncB=func, ...)
Note
At least AmplitudeA or AmplitudeB has to be provided.
For
mode=at.ACMode.SINEtheFrequency(A,B)corresponding to theAmplitude(A,B)has to be providedFor
mode=at.ACMode.ARBITRARYtheFunc(A,B)corresponding to theAmplitude(A,B)has to be providedFor
mode=at.ACMode.INTERPOLATION_TABLEtheFnc(A,B)corresponding to theAmplitude(A,B)needs to be of shape (2, n) with n >= 2. The first row is time in seconds, and the second row is the function value.