pyphi.actual.events#

pyphi.actual.events(substrate, previous_state, current_state, next_state, *, subset=None, mechanisms=None)[source]#

Find all events (mechanisms with actual causes and actual effects).

Parameters:
  • substrate (Substrate) – The substrate to analyze.

  • previous_state (tuple[int]) – The states of the substrate at t - 1, t and t + 1.

  • current_state (tuple[int]) – The states of the substrate at t - 1, t and t + 1.

  • next_state (tuple[int]) – The states of the substrate at t - 1, t and t + 1.

  • subset (optional) – The units, by index or label, whose transitions are analyzed. None uses the whole substrate.

  • mechanisms (iterable, optional) – The mechanisms to consider. None considers every mechanism over subset.

Returns:

tuple[Event] – The events, ordered by mechanism.

Raises:

TransitionUnreachableError – If either observed pair of the state triplet (previous_state → current_state or current_state → next_state) is impossible under the substrate dynamics.