Decimator
- class gpype.backend.timing.decimator.Decimator[source]
Bases:
IONodeDecimator node for downsampling data streams.
Reduces data rate by outputting only every Nth sample based on decimation factor. Adjusts sampling rate and frame size in output context accordingly.
- __init__(decimation_factor=1, **kwargs)[source]
Initialize decimator with decimation factor.
- Parameters:
decimation_factor (
int) – Factor by which to reduce data rate. Must be positive integer. Value of 1 means no decimation.**kwargs – Additional arguments for parent IONode.
- setup(data, port_context_in)[source]
Setup output context with adjusted sampling rate and frame size.
- Parameters:
- Return type:
- Returns:
Output port contexts with decimated sampling rate.
- Raises:
ValueError – If frame_size is not provided or doesn’t match decimation_factor.