RemoveNulledSubcarriers#
- class sionna.phy.ofdm.RemoveNulledSubcarriers(resource_grid: sionna.phy.ofdm.resource_grid.ResourceGrid, precision: Literal['single', 'double'] | None = None, device: str | None = None, **kwargs)[source]#
Bases:
sionna.phy.block.BlockRemoves nulled guard and/or DC subcarriers from a resource grid.
- Parameters:
resource_grid (sionna.phy.ofdm.resource_grid.ResourceGrid) –
ResourceGridto be usedprecision (Literal['single', 'double'] | None) – Precision used for internal calculations and outputs. If set to None,
precisionis used.device (str | None) – Device for tensor operations. If None,
deviceis used.
- Inputs:
inputs – [batch_size, num_tx, num_streams_per_tx, num_ofdm_symbols, fft_size], torch.complex. Full resource grid.
- Outputs:
grid – [batch_size, num_tx, num_streams_per_tx, num_ofdm_symbols, num_effective_subcarriers], torch.complex. Resource grid without nulled subcarriers.
Examples
import torch from sionna.phy.ofdm import ResourceGrid, RemoveNulledSubcarriers rg = ResourceGrid(num_ofdm_symbols=14, fft_size=64, subcarrier_spacing=30e3, num_guard_carriers=(5, 5), dc_null=True) remover = RemoveNulledSubcarriers(rg) x = torch.randn(32, 1, 1, 14, 64, dtype=torch.complex64) y = remover(x) print(y.shape) # torch.Size([32, 1, 1, 14, 53])