dirconn.Edge#

class dirconn.Edge(source: str, target: str, strength: float, delay_ms: float = 0.0, band: tuple[float, float] | None = None, active: tuple[tuple[float, float], ...] | None = None)#

A directed coupling from source to target.

Parameters:
  • source (str) – Node names; they must differ.

  • target (str) – Node names; they must differ.

  • strength (float) – Coupling strength: finite and non-zero, negative for inhibitory coupling.

  • delay_ms (float) – Transmission delay in milliseconds, 0 for instantaneous coupling.

  • band ((float, float), optional) – Frequency band in Hz where the coupling acts; None means broadband.

  • active (sequence of (float, float), optional) – Time intervals (start, stop) in seconds from the start of the recording in which the edge acts; None (default) means all the time. An interval contains start and not stop (it is half open, so intervals can follow each other), they are ascending and do not overlap, and the switching is hard: the coupling is on or off, never faded. The simulator needs them to lie inside the recording.

__init__(source: str, target: str, strength: float, delay_ms: float = 0.0, band: tuple[float, float] | None = None, active: tuple[tuple[float, float], ...] | None = None) → None#

Methods

__init__(source, target, strength[, ...])

delay_samples(sfreq[, rounding])

Return the delay as a whole number of samples at sfreq.

is_active(times)

Return a boolean array: whether the edge acts at each time in times (seconds).

to_dict()

Return a JSON/YAML-compatible dictionary; band is left out when broadband.

Attributes

active

band

delay_ms

source

target

strength