ZeroCrossings
Zero crossings: how often the signal changes sign over the window.
data
count
- Type name
signal:ZeroCrossings- Plane
signal- Tags
analysis- Language
python- Tier
in-process- Bundle
complexity- Source
node-bundles/complexity/zero_crossings.py- Availability
- available
Slots
| Slot | Direction | Type | |
|---|---|---|---|
data | input | ARRAY | |
count | output | ARRAY |
Parameters
zero
| Name | Type | Default | Range | Doc |
|---|---|---|---|---|
normalize | bool | false | Divide by the window length, for a rate per sample. |
common
| Name | Type | Default | Range | Doc |
|---|---|---|---|---|
autotrigger | bool | false | Run 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_frequency | float | 0 | 0 … 100 | Rate cap for this node, read through `frequency_mode`. 0 means uncapped — the node runs as often as the scheduler and its inputs allow. |
frequency_mode | string | updates_per_second | updates_per_second | seconds_per_update | How 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/zero_crossings.py.
"""ZeroCrossings — how often a signal changes sign, from antropy.
The crudest frequency estimate there is, and the cheapest: a sine at f crosses zero 2f times a
second. The last axis is time and is consumed; every axis before it survives.
"""
import antropy
import numpy as np
import goofi
class ZeroCrossings(goofi.Node):
"""Zero crossings: how often the signal changes sign over the window."""
TAGS = ["analysis"]
INPUTS = {"data": goofi.InputSlot(goofi.DataType.ARRAY, required=True)}
OUTPUTS = {"count": goofi.DataType.ARRAY}
PARAMS = {
"zero": {
"normalize": goofi.BoolParam(False, doc="Divide by the window length, for a rate per sample."),
}
}
def process(self, data):
return np.asarray(
antropy.num_zerocross(
np.asarray(data.data, dtype=np.float64), normalize=self.params.zero.normalize, axis=-1
),
dtype=np.float32,
)This reference describes goofi 3.1.0(537cd394), generated from a running instance on 2026-09-06.