spectral_connectivity.wrapper.MeasureInfo#

class MeasureInfo(name: str, category: str, description: str, is_default: bool, is_directed: bool, requires_two_sided: bool, long_name: str, units: str, value_range: tuple[float, float], is_complex: bool, dims: tuple[str, ...], interpretation: str, diagonal_policy: str, diagonal_value: float | None, nan_for_zero_power_signal: bool, sign_convention: str | None, quantity: str | None, formula: str | None)[source]#

Bases: object

A single connectivity measure the high-level wrapper can compute.

Its repr shows only name, category, value_range, is_directed (when true), and description, so list_measures() prints one line per measure. description is the one-line summary of the measure; interpretation says how to read its values. Read any field below as an attribute, or all of them with dataclasses.asdict.

name#

Value to pass as method to multitaper_connectivity() or fourier_connectivity(), and the name of the corresponding Connectivity method.

Type:

str

category#

The output-shape contract, one of "pairwise", "power", "group_pairwise", "multivariate_components", "delay", "global", "group_delay", or "phase_slope".

Type:

str

description#

One-line summary taken from the Connectivity method’s docstring.

Type:

str

is_default#

Whether the measure is in the default set computed when method is omitted (see DEFAULT_METHODS).

Type:

bool

is_directed#

Whether the measure is directional (source -> target asymmetric).

Type:

bool

requires_two_sided#

Whether the measure requires a full two-sided spectrum, including negative-frequency bins.

Type:

bool

long_name#

Human-readable name, also the long_name attribute of the result.

Type:

str

units#

Units of the values: "1" for a dimensionless score, "rad", "s", or "(input units)^2/Hz" for a spectral density.

Type:

str

value_range#

(lower, upper) theoretical bounds of the values, or of their magnitude when is_complex; inf marks an unbounded side. When a computed value can lie outside them is stated in docs/CONNECTIVITY_METRIC_RANGES.md.

Type:

tuple of float

is_complex#

Whether the values are complex.

Type:

bool

dims#

Dimensions of the measure’s variable in the wrapper’s result, before band reduction or squeezing. Rich results (canonical_coherency, global_coherence, …) are Datasets whose variable named name has these dimensions.

Type:

tuple of str

interpretation#

How to read the values.

Type:

str

diagonal_policy#

What a self-connection (a signal, or group, with itself) holds: "masked_nan", "undefined_nan", "constant", "rounding_noise", "estimated", or "not_applicable", as defined in the diagonal-policy table of docs/CONNECTIVITY_METRIC_RANGES.md.

Type:

str

diagonal_value#

The value of a "constant" diagonal (to within rounding), or the nominal value of a "rounding_noise" one; None otherwise.

Type:

float or None

nan_for_zero_power_signal#

Whether every entry involving a zero-power (flat) signal, the diagonal included, is NaN.

Type:

bool

sign_convention#

Which signal leads when the sign or angle shows it; None for measures whose sign carries no lead/lag.

Type:

str or None

quantity#

For the coherency family, the form of the value: "magnitude", "squared_magnitude", "signed" (a real-valued component with its sign, e.g. the imaginary part of coherency), "phase" (an angle in radians), or "complex"; None for other measures.

Type:

str or None

formula#

For the coherency family, the definition of the value; None for other measures.

Type:

str or None

Methods

Attributes