at.latticetools.rdt_observable#

Classes

RDTObservable(refpts, param[, name, ...])

Observe a resonance driving term at selected locations.

class RDTObservable(refpts, param, name=None, second_order=False, **kwargs)[source]#

Bases: ElementObservable

Observe a resonance driving term at selected locations.

Process the local output of get_rdts().

Parameters:
  • refpts (Refpts) – Observation points. See “Selecting elements in a lattice

  • param (str) – RDT name

  • name (str) – Observable name. If None, an explicit name will be generated

  • second_order (bool) – Compute second order terms. Computation is significantly longer using this method

Keyword Arguments:
  • procfun – Post-processing function. It can be any numpy ufunc or a function name in {“real”, “imag”, “abs”, “angle”, “log”, “exp”, “sqrt”}.

  • statfun – Statistics post-processing function. it can be a numpy function or a function name in {“mean”, “std”, “var”, “min”, “max”}. Example: statfun=numpy.mean.

  • target – Target value for a constraint. If None (default), the residual will always be zero.

  • weight – Weight factor: the residual is ((value-target)/weight)**2

  • bounds – Tuple of lower and upper bounds. The parameter is constrained in the interval [target+low_bound target+up_bound]

The target, weight and bounds inputs must be broadcastable to the shape of value.

RDT parameter names

h20000 at.RDTType.FOCUSING h00200

h10010 at.RDTType.COUPLING h10100

h11001 at.RDTType.CHROMATIC h00111 h20001 h00201 h10002

h21000 at.RDTType.GEOMETRIC1 h30000 h10110 h10020 h10200

h22000 at.RDTType.GEOMETRIC2 h11110 h00220 h31000 h40000 h20110 h11200 h20020 h20200 h00310 h00400

dnux_dJx at.RDTType.DETUNING dnux_dJy dnuy_dJy

Examples

>>> obs = RDTObservable(at.Monitor, "h20000")

Observe “h20000” at all Monitor locations