Skip to content

Baker

Systems / Maps / Geometric maps

The baker's map — stretch, cut, and stack; the cleanest model of mixing and the horseshoe.

discrete · map2 dimensionsmixing

Baker attractor

attractor

Definition

@staticmethod
def _step(X, alpha):
    """
    Right-hand side of the Baker map.

    x, y: Current state variables
    alpha: Fraction determining the fold (0 < alpha < 1)

    Written branchlessly with ``np.where`` (rather than a Python ``if`` on
    the state) so the step traces to a straight-line tape and runs on the
    Rust engine.  On the attractor ``y in [0, 1)`` the single test
    ``y < alpha`` is equivalent to ``0 <= y < alpha``.
    """
    x, y = X
    lower = y < alpha
    xp = np.where(lower, (2 * x) % 1, (2 * x - 1) % 1)  # stretch / shift in x
    yp = np.where(lower, y / alpha, (y - alpha) / (1 - alpha))  # fold in y
    return xp, yp

Parameters

Symbol Default Role
alpha 0.5 fold fraction splitting the height (0.5 = area-preserving)

Properties

Lyapunov spectrum
$+0.6931,\; +0.6931$
computed at build
Kaplan–Yorke dimension
$D_{KY} = 2$
Divergence ∇·f
n/a — discrete map — flow divergence undefined (per-step contraction is |det J|)
Equilibria
2 fixed points
0 stable · 2 unstable

Define it in TSDynamics

import tsdynamics as ts

sys = ts.systems.Baker()
traj = sys.iterate(steps=10_000)

exps = sys.lyapunov_spectrum()
ts.kaplan_yorke_dimension(exps)

Reference

Hopf (1937), Ergodentheorie (Springer, Berlin)

BibTeX
@misc{baker,
  title = {Baker system},
  note = {Hopf (1937), Ergodentheorie (Springer, Berlin)}
}