mappy_ds.PoincareMap#
- class mappy_ds.PoincareMap(modes, transitions, initial_mode, end_modes=None, *, max_transitions=1000)#
Poincaré map of a hybrid system described by modes and transitions.
Starting in
initial_mode, the state is evolved mode by mode followingtransitionsuntil one of theend_modesis reached; that is one iteration of the map. The Jacobian and Hessian are composed with the chain rule along the way.- Parameters:
- modessequence of Mode
All modes of the system, with distinct names.
- transitionsmapping
Successor of each mode. The value is
a mode name (
str) for a discrete mode, a borderless continuous mode (which ends atmax_interval) or, as a shorthand, a continuous mode with a single border;a list of mode names, one per border in the order of
borders;a mapping
{border_name: mode_name}covering every border of the mode (see thenameargument ofborder()).
Only modes reachable from
initial_modeneed a rule.- initial_modestr
Mode the map starts in (the Poincaré section).
- end_modesstr or sequence of str, optional
Modes that terminate one iteration, by default
initial_mode.- max_transitionsint, optional
Safety bound on the number of mode transitions per iteration, by default
1000.
- Raises:
- UnknownModeError
If a mode name in
transitions,initial_modeorend_modesis not amongmodes.- TransitionError
If a rule does not match its mode (wrong number of entries, unknown or missing border name), if a mode reachable from
initial_modehas no rule, if the codomain of a mode and the domain of its successor have different dimensions, or if no end mode can be reached frominitial_mode.
Examples
See
mappy_dsfor a complete example.Properties
Dimension of the domain (and codomain) of the map.
Names of all parameters the map depends on.
Methods
image(y0[, params, n, mode])Compute the
n-th image ofy0.image_detail(y0[, params, n, jacobian, ...])Compute the
n-th image ofy0with derivatives.trajectory(y0[, params, n, mode])Compute the trajectory from
y0overniterations.