pyphi.analyze#
- pyphi.analyze(substrate, state, *, subset=None, formalism=None, compute=None, grains=None, parallel_kwargs=None)[source]#
Analyze one candidate system over
substrateinstate, or run a grain search over the whole substrate.- Parameters:
substrate (Any) – The substrate to analyze.
state (tuple[int, ...]) – The state of the substrate’s nodes. When the bounds’ maximum micro grain (
max_update_grain ** max_depth) exceeds 1, a sequence of that many micro states (oldest first) instead — seepyphi.macro.complexes().subset (optional) – Node indices of the candidate system;
Noneuses the whole substrate. Incompatible withgrains.formalism (str or None, optional) – Leave unset to compute IIT under the active configuration. Pass an earlier version’s name (
"IIT_4_0_2023"or"IIT_3_0") only to reproduce published results; it applies to this call only. The name a preset is exported under ("iit3") and the preset itself (pyphi.iit3) select the same version."IIT_4_0_2026"names the default; passing it applies that version’s complete preset, which differs from leavingformalismunset only if the active configuration has been customized. See Reproduce results from earlier versions of IIT.compute (optional) –
Nonereturns anAnalysisbundle;"sia","ces", or"distinctions"returns the raw result object; a callable returnscompute(system). Incompatible withgrains."distinctions"skips the system-partition search, which is the whole cost of a cause-effect structure over a sparse substrate; seedistinctions().grains (optional) –
Noneanalyzes the single candidate system.Trueruns the bounded intrinsic-unit search with defaultSearchBounds; aSearchBoundsinstance runs it with those bounds. The search returns itsComplexesResult.parallel_kwargs (dict or None, optional) – Forwarded to
pyphi.macro.complexes(); meaningful only withgrains.
- Returns:
Analysis – The full analysis bundle; the raw result object when
computeselects one; or the grain search’sComplexesResultwhengrainsis set.- Raises:
ValueError – If
formalismis not a known version name; ifcomputeis not"sia","ces","distinctions", a callable, orNone; ifgrainsis notTrue, aSearchBounds, orNone; ifgrainsis combined withsubsetorcompute; or ifparallel_kwargsis given withoutgrains.- Return type:
Analysis | Any