pyoculus.maps.base_map
base_map.py
Contains the abstract base class for maps.
- authors:
Ludovic Rais (ludovic.rais@epfl.ch)
- class pyoculus.maps.base_map.BaseMap(dim=2, is_discrete=False, domain=None, periodicity=None, dzeta=1)
Defines an abstract base class for the map subclasses.
A map object is a function that takes a point in phase space to another point. The transformation can be either discrete or continuous. A continuous transformation allows the map to be applied for a continuous time (\(f^t\) where \(t\) is a real number), while a discrete transformation allows the map to be applied only for discrete times (\(f^t\) where \(t\) is an integer).
- dimension
The dimension of the phase space that the map operates on.
- Type:
int
- is_discrete
A flag indicating whether the map is discrete. If True, the map is discrete; if False, the map is continuous.
- Type:
bool
- domain
The domain of the map. Each tuple should contain the lower and upper bounds for each dimension. If None, the domain is assumed to be \((-\infty, \infty)\) for each dimension.
- Type:
list of tuples, optional
- abstractmethod f(t, y0)
This method represents the mapping function. It takes a point \(y_0\) in the domain and returns its image under \(t\) application of the map.
- Parameters:
t (float or int) – The number of times the map is applied.
y0 (array) – The initial point in the phase space.
- abstractmethod df(t, y0)
Computes the Jacobian matrix of the map at \(y_0\) after \(t\) applications \(df^t = (\frac{\partial f^t}{\partial x})_{i,j}\).
The
\[\begin{split}J_f(x) = \begin{bmatrix} \partial_{x^1}f^1 & \cdots & \partial_{x^n}f^1 \\ \vdots & \ddots & \vdots \\ \partial_{x^1}f^n & \cdots & \partial_{x^n}f^n \end{bmatrix}\end{split}\]- Parameters:
t (float or int) – The number of times the map is applied.
y0 (array) – The point in phase space where the Jacobian is computed.
- lagrangian(y0, t=None)
Calculates the Lagrangian at a given point or the difference in Lagrangian between two points. The Lagrangian is as defined in the paper by Meiss (https://doi.org/10.1063/1.4915831).
- Parameters:
y0 (array) – The point at which to calculate the Lagrangian.
t (int or float, optional) – The number of times the map is applied from \(y_0\).
- Returns:
Lagrangian at \(y_0\), or the difference in Lagrangian between \(y_1 = f^t(y_0)\) and \(y_0\): \((\mathcal{L}(y_1)-\mathcal{L}(y_0))\) if \(t\) is provided.
- Return type:
float
- winding(t, y0, y1=None)
Calculates how much the point \(y_0\) winds around the point \(y_1\) after applying the map \(t\) times.
- Parameters:
t (float or int) – The number of times the map is applied.
y0 (array) – The initial point in the phase space.
y1 (array) – The point around which \(y_0\) winds. If None, the origin should be used.
- dwinding(t, y0, y1=None)
Calculates the Jacobian of the winding of \(y_0\) around \(y_1\) after applying the map \(t\) times.
- Parameters:
t (float or int) – The number of times the map is applied.
y0 (array) – The initial point in the phase space.
y1 (array) – The point around which \(y_0\) winds. If None, the origin should be used.
- into_domain(x)
Maps the point x into the domain of the map.
- in_domain(x)
Checks if the point x is within the domain of the map.
- f_many(t, x_many)
apply map f t times to all the rows of xx.