at.collective.wake_object#

Wake object creation

Classes

Wake(srange)

Class to generate a wake object

WakeComponent(value)

Enum class for wake component

WakeType(value)

Enum class for wake type

class Wake(srange)[source]#

Bases: object

Class to generate a wake object

The wake object is defined by its srange, specified at initialization, and one or several components corresponding to transverse dipoles or quadrupoles, or longitudinal wakes.

The srange is common to all components and cannot be changed once initialized, all added component are resampled to the srange.

Parameters:

srange – vector of s position where to sample the wake

Example

>>> # Build the range
>>> srange = Wake.build_srange(-0.36, 0.36, 1.0e-5, 1.0e-2,
... ring.circumference, ring.circumference)
>>> # Create the Wake object
>>> wake = Wake(srange)
>>> # Build a resonator and add it to the Wake
>>> freq = 10e9
>>> Q = 1
>>> Rs = 1e4
>>> wake.add(WakeType.RESONATOR, WakeComponent.Z, freq, Q, Rs,
... ring.beta)

See Wake.long_resonator() for a simple way of creatong the same Wake

Components may be retrieved using wake.DX for example

add(wtype, wcomp, *args, **kwargs)[source]#

Add a component to a Wake

Parameters:
  • wtype (WakeType) – Wake type

  • wcomp (WakeComponent) – Wake component

  • *args – parameters for the selected component

static build_srange(start, bunch_ext, short_step, long_step, bunch_interval, totallength)[source]#

Function to build the wake table s column. This is not the slicing but the look-up table, however it generates data where bunches are located to avoid using too much memory to store the table.

Parameters:
  • start (float) – starting s-coordinate of the table (can be negative for wake potential)

  • bunch_ext (float) – maximum bunch extension, function generates data at +/- bunch_ext around the bucket center

  • short_step (float) – step size for the short range wake table

  • long_step (float) – step size for the long range wake table

  • bunch_interval (float) – minimum bunch interval. Data will be generated for each bunch_interval step

  • totallength (float) – total length of the wake table, has to contain the full bunch extension

Returns:

srange – vector of s position where to sample the wake

static long_resonator(srange, frequency, qfactor, rshunt, beta, nelems=1)[source]#

Factory method to build a longitudinal resonator wake object

Parameters:
  • srange – vector of s position where to sample the wake

  • frequency – Resonator frequency [Hz]

  • qfactor – Q factor

  • rshunt – Shunt impedance, [\(\Omega\)] for longitudinal, [\(\Omega/m\)] for transverse

  • beta – Relativistic \(\beta\)

  • nelems – Number of resonators

Several resonators can be built in one step by setting nelems> 1 and giving array parameters

Example

>>> # Build the range
>>> srange = Wake.build_srange(-0.36, 0.36, 1.0e-5, 1.0e-2,
... ring.circumference, ring.circumference)
>>> # Create the resonator
>>> freq = 10e9
>>> Q = 1
>>> Rs = 1e4
>>> wake = Wake.long_resonator(srange, freq, Q, Rs, ring.beta)
static resistive_wall(srange, wakecomp, length, rvac, conduct, beta, yokoya_factor=1, nelems=1)[source]#

Factory method to build a resistive wall wake object

Parameters:
  • srange – vector of s position where to sample the wake

  • wakecomp (WakeComponent) – Wake component

  • length

  • rvac

  • conduct

  • beta (float) – Relativistic \(\beta\)

  • yokoya_factor – Yokoya factor

  • nelems (int)

static resonator(srange, wakecomp, frequency, qfactor, rshunt, beta, yokoya_factor=1, nelems=1)[source]#

Factory method to build a resonator wake object

Parameters:
  • srange – vector of s position where to sample the wake

  • wakecomp – Wake component

  • frequency – Resonator frequency [Hz]

  • qfactor – Q factor

  • rshunt – Shunt impedance, [\(\Omega\)] for longitudinal, [\(\Omega/m\)] for transverse

  • beta (float) – Relativistic \(\beta\)

  • yokoya_factor – Yokoya factor

  • nelems (int) – Number of resonators

Several resonators can be built in one step by setting nelems> 1 and giving array parameters

property DX#

Dipole X component

property DY#

Dipole Y component

property QX#

Quadrupole X component

property QY#

Quadrupole Y component

property Z#

Longitudinal component

property srange#
class WakeComponent(value)[source]#

Bases: Enum

Enum class for wake component

DX = 1#

Dipole X

DY = 2#

Dipole Y

QX = 3#

Quadrupole X

QY = 4#

Quadrupole Y

Z = 5#

Longitudinal

class WakeType(value)[source]#

Bases: Enum

Enum class for wake type

FILE = 1#

Import from file

RESONATOR = 3#

Analytical resonator

RESWALL = 4#

Analytical resistive wall

TABLE = 2#

Provide vectors