mappy_ds.root.find_cycle#

mappy_ds.root.find_cycle(diffeo, y0, params=None, *, period=1, **root_options)#

Find a periodic point of a map.

Solves \(T^n(y) - y = 0\) with scipy.optimize.root(), where \(T\) is diffeo and \(n\) is period, using the analytic Jacobian \(DT^n(y) - I\) provided by the map.

Parameters:
diffeoMap

The map, e.g. a Diffeomorphism or a PoincareMap.

y0array_like

Initial guess of the periodic point.

paramsmapping, optional

Parameters of the map.

periodint, optional

Period \(n\) of the cycle, by default 1 (a fixed point).

**root_options

Forwarded to scipy.optimize.root() (method, tol, options, …).

Returns:
CycleResult

See also

trace_cycle

Continue a periodic point along a parameter.

Examples

Fixed point of the Hénon map:

>>> import numpy as np
>>> from mappy_ds import Diffeomorphism, mapping
>>> from mappy_ds.root import find_cycle
>>> @mapping(2)
... def henon(y, p):
...     x, u = y
...     return np.array([1 - p["a"] * x**2 + u, p["b"] * x])
>>> res = find_cycle(Diffeomorphism(henon), [0.6, 0.2], {"a": 1.4, "b": 0.3})
>>> res.success
True
>>> res.y.round(6)
array([0.631354, 0.189406])
>>> np.sort(res.eigvals.real).round(6)
array([-1.923739,  0.155946])