at.lattice.elements.variable_elements#
Time-dependent 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#
- SINE = 0#
- WHITENOISE = 1#
- class VariableMultipole(family_name, AmplitudeA=None, AmplitudeB=None, mode=ACMode.SINE, **kwargs)[source]#
Bases:
ElementClass to generate an AT variable thin multipole element
- Parameters:
family_name (str) – Element name
- Keyword Arguments:
AmplitudeA (list,float) – Amplitude of the excitation for PolynomA. Default None
AmplitudeB (list,float) – Amplitude of the excitation for PolynomB. Default None
mode (ACMode) –
defines the evaluation grid. Default ACMode.SINE
ACMode.SINE: sine functionACMode.WHITENOISE: gaussian white noiseGridMode.ARBITRARY: user defined turn-by-turn kick list
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
MaxOrder (int) – Order of the multipole for scalar amplitude. Default 0
Seed (int) – Seed of the random number generator for white noise excitation. Default datetime.now()
FuncA (list) – User defined tbt kick list for PolynomA
FuncB (list) – 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: exciation amplitude is linearly ramped upt1<t<t2: exciation amplitude is constantt2<t<t3: exciation amplitude is linearly ramped downt3<t: exciation amplitude is zero
Examples
>>> acmpole = at.VariableMultipole( ... "ACMPOLE", AmplitudeB=amp, FrequencyB=frequency ... ) >>> acmpole = at.VariableMultipole( ... "ACMPOLE", AmplitudeB=amp, mode=at.ACMode.WHITENOISE ... ) >>> acmpole = at.VariableMultipole( ... "ACMPOLE", AmplitudeB=amp, FuncB=fun, mode=at.ACMode.ARBITRARY ... )
Note
For all excitation modes at least one amplitude has to be provided. The default excitation is
ACMode.SINEFor
mode=ACMode.SINEtheFrequency(A,B)corresponding to theAmplitude(A,B)has to be providedFor
mode=ACMode.ARBITRARYtheFunc(A,B)corresponding to theAmplitude(A,B)has to be provided