at.lattice.elements.variable_elements#

Time-dependent thin multipole.

Classes

ACMode(*values)

Class to define the excitation types.

VariableThinMultipole(family_name[, mode, ...])

Class to generate an AT variable thin multipole element.

class ACMode(*values)[source]#

Bases: IntEnum

Class to define the excitation types.

ARBITRARY = 2#
SINE = 0#
WHITENOISE = 1#
class VariableThinMultipole(family_name, mode=ACMode.SINE, AmplitudeA=None, AmplitudeB=None, **kwargs)[source]#

Bases: Element

Class 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 function

    • at.ACMode.WHITENOISE: gaussian white noise

    • at.ACMode.ARBITRARY: user defined turn-by-turn kick list

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

  • 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 zero

    • t0<t<t1: exciation amplitude is linearly ramped up

    • t1<t<t2: exciation amplitude is constant

    • t2<t<t3: exciation amplitude is linearly ramped down

    • t3<t: exciation amplitude is zero

Examples

>>> acmpole = at.VariableThinMultipole(
...     "ACMPOLE", at.ACMode.SINE, AmplitudeB=amp, FrequencyB=frequency
... )
>>> acmpole = at.VariableThinMultipole(
...     "ACMPOLE", at.ACMode.WHITENOISE, AmplitudeB=amp, ... )
>>> acmpole = at.VariableThinMultipole(
...     "ACMPOLE", at.ACMode.ARBITRARY, AmplitudeB=amp, FuncB=fun, ... )

Note

  • At least AmplitudeA or AmplitudeB has to be provided.

  • For mode=at.ACMode.SINE the Frequency(A,B) corresponding to the Amplitude(A,B) has to be provided

  • For mode=at.ACMode.ARBITRARY the Func(A,B) corresponding to the Amplitude(A,B) has to be provided