channelize_poly#
Polyphase channelizer with a configurable number of channels
Added in version 0.6.0.
-
template<typename InType, typename FilterType>
inline auto matx::channelize_poly(const InType &in, const FilterType &f, index_t num_channels, index_t decimation_factor)# 1D polyphase channelizer
The polyphase channelizer supports the following properties:
PropAccum: Type of accumulator. This type should always be real, but it will be promoted to complex when necessary.
PropOutput: Type of output. This type should always be complex.
The default accumulator type is the output type, but the output type is context-dependent. The PropOutput property allows the user to explicitly set the output type and the PropAccum property allows the user to explicitly set the accumulator type.
- Template Parameters:
InType – Type of input.
FilterType – Type of filter.
- Parameters:
in – Input operator that represents the input signal. The last dimension of this tensor is assumed to contain a single input signal with all preceding dimensions being batch dimensions that are channelized independently.
f – Filter operator that represents the filter coefficients. This must be a 1D tensor.
num_channels – Number of channels to create.
decimation_factor – Factor by which to downsample the input signal into the channels. Currently, the only supported value of decimation_factor is a value equal to num_channels. This corresponds to the maximally decimated, or critically sampled, case. It is also possible for decimation_factor to be less than num_channels, which corresponds to an oversampled case with overlapping channels, but this implementation does not yet support oversampled cases.
- Returns:
Operator representing the channelized signal. The output tensor rank is one higher than the input tensor rank. The first Rank-2 dimensions are all batch dimensions. The second-to-last dimension is the sample dimension and the last dimension is the channel dimension.
Examples#
// Channelize "a" into "num_channels" channels using filter "f" and "decimation_factor" decimation
(b = channelize_poly(a, f, num_channels, decimation_factor)).run(this->exec);
// Single precision complex input (ac32) and double-precision filter (f64).
// Properties force double-precision accumulator and output.
auto chan_poly = channelize_poly(ac32, f64, num_channels, decimation_factor)
.props<PropAccum<double>, PropOutput<cuda::std::complex<double>>>();
(b64 = chan_poly).run(this->exec);