pyFDN.td.ControllableFullWaveRect#

class pyFDN.td.ControllableFullWaveRect(channels, alpha, active_channels)[source]#

Stateful, controllable, memoryless nonlinearity, y[n, c] = g_cfwr * ((1 - alpha) * x[n, c] + alpha * abs(x[n, c])), applied to active_channels only; the rest pass through unchanged.

At alpha = 0 the nonlinearity drops out and only the DC blocker below is left, at alpha = 1 it is a full-wave rectifier; g_cfwr = sqrt(2 - 2 * abs(alpha - 0.5)) keeps the output power roughly constant across alpha. abs(x) here is not the plain absolute value but its first-order antiderivative-antialiasing approximation (Parker et al. 2016), which reduces the aliasing that rectification would otherwise fold back from above Nyquist. The result is passed through an internal DCBlocker with energy compensation, since rectification also injects a DC offset that would otherwise accumulate in a feedback loop.

__init__(channels, alpha, active_channels)[source]#

Methods

__init__(channels, alpha, active_channels)

abs(x)

anti_dev(x)

filter(block)

Filter one block and advance internal state.

process(signal, *[, squeeze])

Filter a whole signal in one call, from the current state.

reset()

Clear internal state (no-op for stateless operators).

Attributes

in_channels

out_channels

abs(x)[source]#
Return type:

ndarray

anti_dev(x)[source]#
Return type:

ndarray

filter(block)[source]#

Filter one block and advance internal state.

Return type:

ndarray

reset()[source]#

Clear internal state (no-op for stateless operators).

Return type:

None