HopfStep#

class brainmass.HopfStep(in_size, a=0.25, w=0.2, beta=1.0, noise_x=None, noise_y=None, init_x=ZeroInit(unit=1), init_y=ZeroInit(unit=1), method='exp_euler')#

Normal-form Hopf oscillator (two-dimensional rate model).

This model implements the supercritical Hopf normal form for a single node in terms of its real and imaginary components, often used as a simple mesoscopic model of oscillatory neural population activity.

The complex form is

\[\frac{dz}{dt} = (a + i\,\omega)\,z - \beta\,|z|^{2} z + I_{\text{ext}}(t),\]

where \(z = x + i y\) and \(|z|^2 = x^2 + y^2\). In real variables:

\[\begin{split}\begin{aligned} \dot x &= (a - \beta r)\,x - \omega\,y + \text{coupled}_x + I_x(t),\\ \dot y &= (a - \beta r)\,y + \omega\,x + \text{coupled}_y + I_y(t), \\ r &= x^2 + y^2. \end{aligned}\end{split}\]
Parameters:
  • in_size (int | Sequence[int] | integer | Sequence[integer]) – Spatial shape of the node. Can be an int or tuple of ints.

  • a (Callable | Array | ndarray | bool | number | bool | int | float | complex | Quantity | Param) – Bifurcation parameter (dimensionless). For a > 0 the system exhibits a stable limit cycle; for a < 0 the origin is a stable focus. Broadcastable to in_size. Default is 0.25.

  • w (Callable | Array | ndarray | bool | number | bool | int | float | complex | Quantity | Param) – Angular frequency \(\omega\) (dimensionless in this implementation). Broadcastable to in_size. Default is 0.2.

  • beta (Callable | Array | ndarray | bool | number | bool | int | float | complex | Quantity | Param) – Nonlinear saturation coefficient (dimensionless) setting the limit-cycle amplitude (approximately \(\sqrt{a/\beta}\) when a>0). Broadcastable to in_size. Default is 1.0.

  • noise_x (Noise) – Additive noise process to x. If provided, called each step and added to ext_x. Default is None.

  • noise_y (Noise) – Additive noise process to y. If provided, called each step and added to ext_y. Default is None.

Return type:

Any

x#

State container for the real component x.

Type:

brainstate.HiddenState

y#

State container for the imaginary component y.

Type:

brainstate.HiddenState

Notes

Time derivatives returned by dx and dy carry unit 1/ms so that an explicit (exponential) Euler integrator with time step dt having unit ms evolves the state consistently with units.

dx(x, y, inp)[source]#

Right-hand side for x.

Parameters:
  • x (array-like) – Current real component.

  • y (array-like) – Current imaginary component (broadcastable to x).

  • inp (array-like or scalar) – External input to x (includes coupling and noise).

Returns:

Time derivative dx/dt with unit 1/ms.

Return type:

array-like

dy(y, x, inp)[source]#

Right-hand side for y.

Parameters:
  • y (array-like) – Current imaginary component.

  • x (array-like) – Current real component (broadcastable to y).

  • inp (array-like or scalar) – External input to y (includes coupling and noise).

Returns:

Time derivative dy/dt with unit 1/ms.

Return type:

array-like