Hjorth

Hjorth mobility and complexity: mean frequency, and distance from a sine.

Hjorth py
data
mobility
complexity
Type name
signal:Hjorth
Plane
signal
Tags
analysis
Language
python
Tier
in-process
Bundle
complexity
Source
node-bundles/complexity/hjorth.py
Availability
available

Slots

SlotDirectionType
datainputARRAY
mobilityoutputARRAY
complexityoutputARRAY

Parameters

common

NameTypeDefaultRangeDoc
autotriggerboolfalseRun on the node's own schedule, instead of waiting for an input frame. Turn this on for sources; leave it off for transforms driven by their input.
max_frequencyfloat00 … 100Rate cap for this node, read through `frequency_mode`. 0 means uncapped — the node runs as often as the scheduler and its inputs allow.
frequency_modestringupdates_per_secondupdates_per_second | seconds_per_updateHow to read `max_frequency`: as a rate in Hz (updates per second), or as a period in seconds between updates — convenient for very slow nodes.

Source

The current source of this node, as it stands in the goofi repository at node-bundles/complexity/hjorth.py.

node-bundles/complexity/hjorth.py
"""Hjorth — mobility and complexity, the two derivative-based EEG descriptors, from antropy.

Mobility is the signal's mean frequency in units of the sample rate; complexity is how far its
shape is from a pure sine, which scores exactly 1. The last axis is time and is consumed; every
axis before it survives.
"""

import antropy
import numpy as np
import goofi


class Hjorth(goofi.Node):
    """Hjorth mobility and complexity: mean frequency, and distance from a sine."""

    TAGS = ["analysis"]
    INPUTS = {"data": goofi.InputSlot(goofi.DataType.ARRAY, required=True)}
    OUTPUTS = {"mobility": goofi.DataType.ARRAY, "complexity": goofi.DataType.ARRAY}

    def process(self, data):
        mobility, complexity = antropy.hjorth_params(np.asarray(data.data, dtype=np.float64), axis=-1)
        return {
            "mobility": np.asarray(mobility, dtype=np.float32),
            "complexity": np.asarray(complexity, dtype=np.float32),
        }

← All nodes

This reference describes goofi 3.1.0(537cd394), generated from a running instance on 2026-09-06.