10. Symplectic Maps

The celmech.maps module implements a couple of area-preserving maps, StandardMap and EncounterMap.

10.1. Chirikov Standard Map

The Chirikov standard map is a symplectic map that depends on a single parameter, \(K\), defined by the equations

\[\begin{split}p' &= p + K \sin\theta \\ \theta' &= \theta + p'~.\end{split}\]

10.2. Encounter Map

The encounter map is a symplectic map that approximates the dynamics of a pair of closely-spaced planets. The map depends on three parameters , \(\epsilon,y\), and \(J\). The map is defined by the equations

\[\begin{split}x' &= x + \epsilon f(\theta;y) \\ \theta' &= \theta + 2\pi(J-x')\end{split}\]

where

\[f(\theta;y) = -\frac{4\pi}{3}\sum_{k}s_k(y)k\sin(k\theta)\]

and the \(s_k(y)\) are the resonance amplitude functions given by the sk() function.

10.3. API

class celmech.maps.EncounterMap(m, J, y0, Nmax=7, mod=True)[source]

A class representing the encounter map. The map depends on three parameters, \(\epsilon,y\), and \(J\). The map is defined by the equations

\[\begin{split}\begin{align} x' &= x + \epsilon f(\theta;y) \\ \theta' &= \theta + 2\pi(J-x') \end{align}\end{split}\]

By default, the map is defined on the cylinder with the \(\theta\) coordinate taken mod \(2\pi\). The parameter mod_p=True can be set to take the \(p\) coordinate modulo \(2\pi\) as well.

Parameters
  • m (float) – Planet-star mass ratio

  • y (float) – The eccentricity divided by the orbit-crossing eccentricity.

  • J (float) – Center the map on the \(J\):\(J-1\) MMR. For integer J, the map is centered on a first order MMR. For rational \(J=p/q\), the map is centered on a :math:`q`th order MMR

  • mod_theta (bool, optional) – If True, the \(\theta\) coordinate is taken modulo \(2\pi\). Default is True

  • mod_p (bool, optional) – If True, the \(p\) coordinate is taken modulo \(2\pi\). Default is False.

inv_partial_derivs(x0, Nmax)[source]

Get the partial derivatives of the map up to order Nmax evaluated at point x0.

partial_derivs(x0, Nmax)[source]

Get the partial derivatives of the map up to order Nmax evaluated at point x0.

class celmech.maps.StandardMap(K, mod_theta=True, mod_p=False)[source]

A class representing the Chirikov standard map. The map depends on a single parameter, \(K\) and is defind by

\[\begin{split}\begin{align} p' &=& p + K \sin\theta\\ \theta' &=& \theta + p' \end{align}\end{split}\]

By default, the map is defined on the cylinder with the \(\theta\) coordinate taken mod \(2\pi\). The parameter mod_p=True can be set to take the \(p\) coordinate modulo \(2\pi\) as well.

Parameters
  • K (float) – Map non-linearity parameter.

  • mod_theta (bool, optional) – If True, the \(\theta\) coordinate is taken modulo \(2\pi\). Default is True

  • mod_p (bool, optional) – If True, the \(p\) coordinate is taken modulo \(2\pi\). Default is False.

action(pt)[source]

Evaluate The action zero-form,

\[\]

lambda(theta,w) = 2pileft(frac{w’^2}{2}- frac{epsilon}{2pi} F_beta(theta)right)~,

where \(w' = w - \epsilon \partial_\theta F_\beta(\theta)\). The action zero-form satisfies \(T^*(w d\theta) - w d\theta = d\lambda\) where \(T^*\) is the pullback of the map.

Parameters

pt (array-like) – the point \((\theta,w)\) at which to evlauate the action.

Returns

The value of the action zero-form, \(\lambda(\theta,w)\)

Return type

float

inv(x)[source]

The inverse mapping

\[\begin{split}\begin{align} \theta &=& p' - \theta' \\ p &=& p' - K \sin\theta \end{align}\end{split}\]
Parameters

x (array-like) – The point \((\theta',p')\)

Returns

The point \((\theta,p)\)

Return type

array-like

inv_partial_derivs(x, Nmax)[source]

Get the partial derivatives of the inverse map evaluated at the point x0 up to order Nmax.

Parameters
  • x (array-like) – The point at which derivatives are to be evaluated

  • Nmax (int) – Maximum order of the partial derivatives

Returns

T – The partial derivatives of the map. Writing the value of the map at a point \((x_1,x_2)\) as \(T(x_1,x_2) = (T_1(x_1,x_2),T_2(x_1,x_2))\), the entry T[i,n,m] stores

\[\frac{\partial^{(n+m)}}{\partial x_1^n \partial x_2^m} T_i\]

Note that T[:,0,0] give the value of the map.

Return type

array, shape (2,Nmax+1,Nmax+1)

jac(x)[source]

Evaluate the Jacobian map at \(x=(\theta,p)\), given by

\[\begin{split}DT(x) = \begin{pmatrix} 1 + K\cos\theta & 1 \\ K\cos\theta & 1 \end{pmatrix}\end{split}\]

10. Aruments

xarray

Point(s) at which to evaluate the Jacobian.

returns

DT – Value of the Jacobain at point x.

rtype

array

property mod_theta

Is the coordinate \(\theta\) calculated modulo \(2\pi\)?

partial_derivs(x, Nmax)[source]

Get the partial derivatives of the map evaluated at the point x0 up to order Nmax.

Parameters
  • x (array-like) – The point at which derivatives are to be evaluated

  • Nmax (int) – Maximum order of the partial derivatives to return

Returns

T – The partial derivatives of the map. Writing the value of the map at a point \((x_1,x_2)\) as \(T(x_1,x_2) = (T_1(x_1,x_2),T_2(x_1,x_2))\), the entry T[i,n,m] stores .. math:

\frac{\partial^{(n+m)}}{\partial x_1^n \partial x_2^m} T_i

Note that T[:,0,0] give the value of the map.

Return type

array, shape (2,Nmax+1,Nmax+1)

symmetry_lines()[source]

Return the symmetry lines of the map.

Returns

Tuple containing three functions that parameterize the symmetry lines of the map.

Return type

tuple

with_variational(X, dX)[source]

Apply the map along with the tangent map to point plus variationals. In particular,

\[\begin{split}\begin{align} (\theta', w') &=& T(\theta, w) \\ (\delta \theta',\delta w') &=& DT(\theta, w) \cdot (\delta \theta,\delta w)\end{split}\]

where \(T\) is the usual map and \(DT\) is the Jacobian of the map.

Parameters
  • X (array-like) – The point \(X = (\theta,w)\)

  • dX (array-like) – The variational vector \((\delta\theta,\delta w)\)

Returns

  • X’ (array-like) – The new point

  • dX’ (array-lke) – The new variationl vector