Resource Grid

The module grid.py implements the Grid class, which encapsulates the functionality of a resource grid, including:

  • Keeping the Resource Element (RE) values for a specified resource grid size.

  • Providing easy access to a specific type of data in the resource grid (e.g., DM-RS values, CSI-RS values, PDSCH data, etc.)

  • Providing statistics and visualization for the resource grid map.

  • Applying OFDM modulation to the resource grid which results in a Waveform object.

  • Applying a Channel Model to the resource grid in the frequency domain.

  • Applying Additive White Gaussian Noise (AWGN) to the resource grid in the frequency domain.

  • Performing Channel Estimation based on a received resource grid and the configured reference signals.

class neoradium.grid.Grid(bwp, numPlanes=1, contents='UNASSIGNED', numSlots=1, numRbs=None)

This class implements the functionality of a resource grid. It stores the complex frequency-domain values of resource elements (REs) in the grid.

All transformation methods (ofdmModulate(), applyChannel(), addNoise(), clone(), etc.) return a new Grid or Waveform object; the source grid is never mutated in place.

Parameters:
  • bwp (BandwidthPart) – The bandwidth part object based on which this resource grid is created.

  • numPlanes (int (default: 1)) – A resource grid can be considered as a three-dimensional P x L x K complex tensor where L is the number of OFDM symbols, K is the number of subcarriers (based on bwp), and P is the number of planes. In different contexts, P can be equivalent to the number of layers, number of transmitter antenna ports, or number of receiver antennas. To avoid confusion, the resource grid implementation in NeoRadium uses the term “plane” for the first dimension of the resource grid.

  • contents (str) –

    The default content type of this resource grid. Each resource element (RE) in the resource grid has an associated content type. When data is assigned to REs in this resource grid without a specified content type, the default value is used. The following content types are currently defined:

    UNASSIGNED:

    A generic content type used when the type of data in the resource grid is unknown.

    PDSCH:

    The content type used for the data carried in a Physical Downlink Shared Channel (PDSCH)

    PDCCH:

    The content type used for the data carried in a Physical Downlink Control Channel (PDCCH)

    PUSCH:

    The content type used for the data carried in a Physical Uplink Shared Channel (PUSCH)

    PUCCH:

    The content type used for the data carried in a Physical Uplink Control Channel (PUCCH)

  • numSlots (int) – The number of time slots to include in the resource grid. The number of time symbols L (the second dimension of the resource grid tensor) is equal to numSlots * bwp.symbolsPerSlot.

  • numRbs (int or None) – If this is specified, the resource grid will contain this many resource blocks. Otherwise (default), the resource grid will have the same number of resource blocks as the bandwidth part.

Other Read-Only Properties:

Here is a list of additional properties:

shape:

Returns the shape of the 3-dimensional resource grid tensor.

numPorts:

The number of antenna ports. (The same as numPlanes)

numLayers:

The number of layers. (The same as numPlanes)

numSubcarriers:

The number of subcarriers in this resource grid.

numSymbols:

The number of time symbols in this resource grid. This is equal to numSlots*bwp.symbolsPerSlot.

size:

The size of the resource grid tensor.

noiseVar:

The variance of AWGN noise present in this resource grid. This is usually initialized to zero. When AWGN noise is applied to the grid using the addNoise() function, the variance of the noise is stored in this property. Also, if a noisy Waveform is OFDM-demodulated using the ofdmDemodulate() method, then the amount of noise is transferred to the new Grid object created.

Additionally, you can access the following read-only BandwidthPart class properties directly: nFFT, symbolsPerSlot, slotsPerSubFrame, slotsPerFrame, and symbolsPerSubFrame.

Resource Grid Indexing:

a) Reading: You can directly access the contents of the resource grid using indices. Here are a few examples of accessing the RE values in the resource grid:

myREs = myGrid[0,2:5,:]     # instead of using myGrid.grid[0,2:5,:]
print(myREs.shape)          # Assuming 612 subcarriers, this will print: "(3, 612)"

indexes = myGrid.getReIndexes("DMRS")   # Get the indices of all DM-RS REs
dmrsValues = myGrid[indexes]            # Get all DM-RS values as a 1-D array.
  1. Writing: You can assign different values to different REs in the resource grid. Here are a few examples:

# Set the RE at layer 1, symbol 2, and subcarrier 3 to the value
# 0.707 - 0.707j and RE type "DMRS".
myGrid[1,2,3] = (0.707 - 0.707j, "DMRS")

# Mark all REs in the time symbol 5 as "RESERVED" for layer 1. The
# RE values are set to 0 in this case.
myGrid[1,5,:] = "RESERVED"

# Update the 3 RE values at layer 0, subcarrier 5, and symbols [1, 4, 7]
# and set their RE content type to the grid's default content type.
myGrid[0,1:10:3,5] = [-0.948 - 0.948j, -0.316+0.316j, 0.316-0.948j]
print(indent=0, title=None, getStr=False)

Prints the properties of this resource grid object.

Parameters:
  • indent (int) – The number of indentation characters.

  • title (str) – If specified, it is used as the title for the printed information.

  • getStr (bool) – If True, returns a string instead of printing it.

Returns:

If the getStr parameter is True, then this function returns the information in a string. Otherwise, nothing is returned.

Return type:

None or str

clone()

Creates a copy of this resource grid object.

Returns:

A copy of this resource grid object.

Return type:

Grid

getStats()

Returns some statistics about the allocation of resources in the resource grid.

Returns:

A dictionary of items containing the number of resource elements allocated for different types of data in this resource grid.

Return type:

dict

reTypeAt(p, l, k)

Returns the content type (as a string) of the resource element at the position specified by p, l, and k.

Parameters:
  • p (int) – The plane number. It can be the layer or antenna index depending on the context.

  • l (int) – The time symbol index.

  • k (int) – The subcarrier index.

Returns:

The content type of the resource element specified by p, l, and k.

Return type:

str or tuple

reTypeAndObjIdAt(p, l, k)

Returns the content type and object ID of the resource element at the position specified by p, l, and k. For example, for a resource element assigned to non-zero-power CDI-RS, the RE type would be "CSIRS_NZP" and the object ID would be the resource ID of the CSI-RS resource.

Parameters:
  • p (int) – The plane number. It can be the layer or antenna index depending on the context.

  • l (int) – The time symbol index.

  • k (int) – The subcarrier index.

Returns:

The content type and object ID associated with the resource element specified by p, l, and k.

Return type:

tuple

getReIndexes(reTypeStr=None, objectId=255)

Returns the indices of all resource elements in the resource grid with the content type specified by the reTypeStr. For example, the code below gets the indices of all DM-RS resource elements in the resource grid and uses the returned indices to retrieve these values. Here are some examples:

dmrsIdx = myGrid.getReIndexes("DMRS")   # Get the indices of all DM-RS resource elements
dmrsValues = myGrid[dmrsIdx]            # Get all DM-RS values as a 1-D array.

# Get indices of all CSI-RS resource elements
allCsiRsIdx = myGrid.getReIndexes("CSIRS_NZP")

# Get indices of CSI-RS resource elements corresponding to a CsiRs with resourceId=1
csiRsIdx1 = myGrid.getReIndexes("CSIRS_NZP",1)  # Get indices of CSI-RS resource elements for the CsiRs
Parameters:
  • reTypeStr (str or None) –

    If reTypeStr is None, the default content type of this resource grid is used as the key. For example, if this resource grid was created with contents="PDSCH", then the indices of all resource elements with content type “PDSCH” are returned.

    Otherwise, this function returns the indices of all resource elements in the resource grid with the content type specified by reTypeStr. Here is a list of values that can be used:

    ”UNASSIGNED”:

    The un-assigned resource elements.

    ”RESERVED”:

    The reserved resource elements. This includes the resource blocks reserved by the ReservedPrbSet class.

    ”NO_DATA”:

    The resource elements that should not contain any data. See numCdmGroupsWithoutData parameter of DMRS class for more information.

    ”DMRS”:

    The resource elements used for DMRS.

    ”PTRS”:

    The resource elements used for PTRS.

    ”CSIRS_NZP”:

    The resource elements used for Non-Zero-Power (NZP) CSI-RS (See csirs).

    ”CSIRS_ZP”:

    The resource elements used for Zero-Power (ZP) CSI-RS (See csirs).

    ”PDSCH”:

    The resource elements used for user data in a Physical Downlink Shared Channel (PDSCH)

    ”PDCCH”:

    The resource elements used for user data in a Physical Downlink Control Channel (PDCCH)

    ”PUSCH”:

    The resource elements used for user data in a Physical Uplink Shared Channel (PUSCH)

    ”PUCCH”:

    The resource elements used for user data in a Physical Uplink Control Channel (PUCCH)

  • objectId (int) – Specifies the object ID corresponding to the resource elements of type reTypeStr. For example, if there are many CSI-RS resources with different resourceId values in this grid, you could use this parameter to specify the CsiRs resourceId and only return the RE indices for the specified resource ID. (See the above examples)

Returns:

A tuple of three 1-D NumPy arrays specifying a list of locations in the resource grid. This value can be used directly to access REs at the specified locations. (See the above example)

Return type:

3-tuple

getReValues(reTypeStr=None, objectId=255)

Returns the values of all resource elements in the resource grid with the content type specified by the reTypeStr. This is a shortcut method that allows accessing all the values in one step. For example, the following two methods are equivalent.

dmrsValues1 = myGrid[ myGrid.getReIndexes("DMRS") ] # Get indices, then access values
dmrsValues2 = myGrid.getReValues("DMRS")            # Using this method
assert np.all(dmrsValues1==dmrsValues2)             # The results are the same
Parameters:
  • reTypeStr (str or None) –

    If reTypeStr is None, the default content type of this resource grid is used as the key. For example, if this resource grid was created with contents="PDSCH", then the values of all resource elements with content type “PDSCH” are returned.

    Otherwise, this function returns the values of all resource elements in the resource grid with the content type specified by reTypeStr. See getReIndexes() for a list of values that could be used for reTypeStr.

  • objectId (int) – Specifies the object ID corresponding to the resource elements of type reTypeStr. For example, if there are many CSI-RS resources with different resourceId values in this grid, you could use this parameter to specify the CsiRs resourceId and only return the RE values for the specified resource ID.

Returns:

A 1-D complex NumPy array containing the values for all REs with the content type specified by reTypeStr.

Return type:

1-D NumPy array

precode(f, reIndices=None)

DEPRECATED: This method is deprecated and will be removed in future releases. Please use the precodeTo() method instead.

Applies the specified precoding matrix to this grid object and returns a new precoded grid. This function supports precoding resource block groups (PRGs) which means different precoding matrices could be applied to different groups of subcarriers in the resource grid. See 3GPP TS 38.214, Section 5.1.2.3 for more details.

Parameters:
  • f (NumPy array or list of tuples) –

    This function supports two types of precoding:

    Wideband:

    f is an Nt x Nl matrix where Nt is the number of transmitter antenna ports and Nl is the number of layers which must match the number of layers in the resource grid. In this case the same precoding is applied to all subcarriers of the resource grid.

    Using PRGs:

    f is a list of tuples of the form (groupRBs, groupF). For each entry in the list, the Nt x Nl precoding matrix groupF is applied to all subcarriers of the resource blocks listed in groupRBs.

  • reIndices (3-tuple or None) – A tuple of three 1-D NumPy arrays specifying a list of locations in this resource grid where the precoding is applied. If this is None (default), the precoding is applied to the whole grid.

Returns:

A new Grid object of shape Nt x L x K where Nt is the number of transmitter antenna ports, L is the number of OFDM symbols, and K is the number of subcarriers.

Return type:

Grid

ofdmModulate(f0=0, windowing='STD')

Applies OFDM modulation to the resource grid which results in a Waveform object. This function is based on 3GPP TS 38.211, Section 5.3.1.

Parameters:
  • f0 (float) – The carrier frequency of the generated waveform. If it is 0 (default), then a baseband waveform is generated and the up-conversion process explained in 3GPP TS 38.211, Section 5.4 is not applied.

  • windowing (str) – A string indicating which type of windowing should be applied to the waveform after OFDM modulation. The default value "STD" means that windowing is applied based on 3GPP TS 38.104, Sections B.5.2 and C.5.2. For more information, see applyWindowing() method of the Waveform class.

Returns:

A Waveform object containing the OFDM-modulated waveform information.

Return type:

Waveform

estimateTimingOffset(rxWaveform)

Estimates the timing offset of a received waveform. This method first applies OFDM modulation to the resource grid and then calculates the correlation of this waveform with the given rxWaveform. The timing offset is the index where the correlation reaches its maximum. The output of this function can be used by the sync() method of the Waveform class to synchronize a received waveform.

Parameters:

rxWaveform (Waveform) – The Waveform object containing the received waveform.

Returns:

The timing offset, in number of time-domain samples. This is the number of samples that should be ignored from the beginning of the rxWaveform.

Return type:

int

Notes

The correlation is computed independently for each (RX antenna, TX port) pair using scipy.signal.correlate. The magnitudes of those per-pair correlations are summed across all pairs, and the timing offset is the index of the peak of this aggregated magnitude. Magnitude is used (rather than the raw complex correlation) so that random per-pair phase offsets do not cancel out.

equalize(hf, noiseVar=None)

DEPRECATED: This method is deprecated and will be removed in future releases. Please use the equalize() method instead.

Equalizes a received resource grid using the estimated channel hf. The estimated channel is assumed to include the effect of the precoding matrix, therefore, its shape is L x K x Nr x Nl where L is the number of OFDM symbols, K is the number of subcarriers, Nr is the number of receiver antennas, and Nl is the number of layers. The output of the equalization process is a new Grid object of shape Nl x L x K.

This function also outputs Log-Likelihood Ratio (LLR) scaling factors which are used by the demodulation process when extracting Log-Likelihood Ratios (LLRs) from the equalized resource grid.

This method uses the Minimum Mean Squared Error (MMSE) algorithm for the equalization.

Parameters:
  • hf (4-D complex NumPy array) – This is an L x K x Nr x Nl NumPy array representing the estimated channel matrix, where L is the number of OFDM symbols, K is the number of subcarriers, Nr is the number of receiver antennas, and Nl is the number of layers.

  • noiseVar (float or None) – The variance of noise applied to the received resource grid. If this is not provided, this method tries to use the noise variance of the resource grid obtained by the OFDM demodulation process for the time-domain case or the variance of the noise applied to the received resource grid by the addNoise() method for the frequency domain case (See the noiseVar property of Grid class).

Returns:

  • eqGrid (Grid) – The equalized grid object of shape Nl x L x K where Nl is the number of layers, L is the number of OFDM symbols, and K is the number of subcarriers.

  • llrScales (3-D NumPy array) – The Log-Likelihood Ratios (LLR) scaling factors which are used by the demodulation process when extracting Log-Likelihood Ratios (LLRs) from the equalized resource grid. The shape of this array is Nl x L x K which is similar to eqGrid above.

estimateChannelLS(rsInfo, meanCdm=True, polarInt=False, kernel='linear')

DEPRECATED: This method is deprecated and will be removed in future releases. Please use the estimateChannel() method instead.

Performs channel estimation based on this received grid and the reference signal information in the rsInfo. Here is a list of steps taken by this function to calculate the estimated channel and noise variance:

1) First the channel information is calculated at each pilot location using the least-squares method based on the following equations:

\[Y_p = h_p \odot P + n_p\]

where \(Y_p\) is a vector of received values at the pilot locations which are the values in this Grid object at the pilot locations indicated in rsInfo, \(h_p\) is the vector of channel values at pilot locations, \(P\) is the vector of pilot values extracted from rsInfo, and \(n_p\) is the noise at pilot locations. The least-squares estimate of the channel values at pilot locations \(h_p\) is then calculated by:

\[h_p = \frac {Y_p} P \qquad \qquad \qquad \text{(element-wise division)}\]

2) If meanCdm is True, the \(h_p\) values in each CDM group are averaged which results in a new smaller set of \(h_p\) values located at centers of CDM groups.

3) Frequency interpolation along subcarriers is applied to \(h_p\) values at all OFDM symbols containing pilots based on polarInt and kernel values.

4) A raised-cosine low-pass filter is applied to the Channel Impulse Response (CIR) values to get a de-noised version of CIRs. The noise variance is estimated using the difference between the noisy and de-noised versions of the CIRs.

5) Finally another interpolation is applied along OFDM symbols to estimate the channel information for the whole channel matrix.

Parameters:
  • rsInfo (CsiRsConfig or DMRS) –

    This object contains reference-signal information for the channel estimation. If it is a CsiRsConfig object, the channel matrix is estimated based on the CSI-RS signals, which do not include precoding effects.

    If this is a DMRS object, the channel matrix is estimated based on the demodulation reference signals, which include the precoding effect.

  • meanCdm (bool) – If True, the \(h_p\) values at pilot locations for each CDM group are averaged before applying subcarrier interpolation. Otherwise, interpolation is applied directly on the \(h_p\) values.

  • polarInt (bool) –

    If True, the interpolation along the subcarriers is applied in polar coordinates. This means all \(h_p\) values are converted to polar coordinates and then the type of interpolation specified by kernel is applied to magnitudes and angles of these values. The results are then converted back to the cartesian coordinates. Otherwise (default), the interpolation is applied in the Cartesian coordinates.

    Doing polar interpolation provides slightly better results at the cost of longer execution time.

  • kernel (str) –

    The type of interpolation used for channel-estimation process. The same type of 1-D interpolations are applied along subcarriers and then OFDM symbols. Here is a list of supported values:

    linear:

    A linear interpolation is applied to the values using extrapolation at both ends of the arrays. This uses the function interp1d with kind set to linear.

    nearest:

    A nearest neighbor interpolation is applied to the values using extrapolation at both ends of the arrays. This uses the function interp1d with kind set to nearest.

    quadratic:

    A quadratic interpolation is applied to the values using extrapolation at both ends of the arrays. This uses the function interp1d with kind set to quadratic.

    thin_plate_spline:

    An RBF interpolation is applied with a thin_plate_spline kernel. This uses the RBFInterpolator class.

    multiquadric:

    An RBF interpolation is applied with a multiquadric kernel. This uses the RBFInterpolator class.

Returns:

  • hEst (4-D complex NumPy array) – If rsInfo is a CsiRsConfig object, an L x K x Nr x Nt complex NumPy array is returned where L is the number of OFDM symbols, K is the number of subcarriers, Nr is the number of receiver antennas, and Nt is the number of transmitter antennas.

    If rsInfo is a DMRS object, an L x K x Nr x Nl complex NumPy array is returned where L is the number of OFDM symbols, K is the number of subcarriers, Nr is the number of receiver antennas, and Nl is the number of layers.

  • estNoiseVar (float) – The estimated noise variance.

applyChannel(channelMatrix)

Applies a channel to this grid in the frequency domain which results in a new received Grid object. This function performs a matrix multiplication where this grid of shape Nt x L x K is multiplied by the channel matrix of shape L x K x Nr x Nt and results in the received grid of shape Nr x L x K, where L is the number of OFDM symbols, K is the number of subcarriers, Nr is the number of receiver antennas, and Nt is the number of transmitter antennas.

This method can be used as a shortcut method to get the received resource grid faster compared to the time-domain process of performing OFDM modulation, applying the channel, performing synchronization, and carrying out OFDM demodulation.

Please note that the results are slightly different when a channel is applied in the time domain vs. the frequency domain.

Parameters:

channelMatrix (4-D complex NumPy array) – This is an L x K x Nr x Nt NumPy array representing the estimated channel matrix, where L is the number of OFDM symbols, K is the number of subcarriers, Nr is the number of receiver antennas, and Nt is the number of transmitter antennas.

Returns:

The received grid of shape Nr x L x K, where Nr is the number of receiver antennas, L is the number of OFDM symbols, and K is the number of subcarriers.

Return type:

Grid

addNoise(**kwargs)

Adds Additive White Gaussian Noise (AWGN) to this resource grid and returns a new Grid object. The noiseVar property of the returned grid contains the variance of the applied noise.

You can provide the noise directly, or specify its standard deviation, variance, or a target SNR.

If you already have a noise signal in a NumPy array, use the noise parameter to add it directly to this grid:

Example
myNoise = random.awgn(rxGrid.shape, 0.1)    # Create AWGN with σ = 0.1
rxGrid.addNoise(noise=myNoise)

If you already know the standard deviation or variance of the noise, use noiseStd or noiseVar respectively:

Example
rxGrid.addNoise(noiseStd=0.1)       # Same result as above
rxGrid.addNoise(noiseVar=0.01)      # Same result as above

If you specify snrDb, this function supports two different interpretations of SNR, controlled by the useRxPower parameter.

1) Reference-power SNR (useRxPower=False)

In this mode, the noise power is computed using a fixed reference signal power, independent of the instantaneous received grid. This approach is closer to typical 3GPP-style link-level simulation methodology, where the AWGN level is fixed for a given SNR point and channel effects such as fading, path loss, and beamforming affect the received signal power without changing the injected noise power.

In NeoRadium, this corresponds to assuming a normalized received signal power of \(\frac{1}{N_r}\), where \(N_r\) is the number of receive antennas:

\[\sigma^2_{AWGN} = \frac{1}{N_r \cdot 10^{\frac{SNR_{dB}}{10}}}\]
Example
rxGrid.addNoise(snrDb=mySnrDb, useRxPower=False)

This mode is recommended for link-level performance evaluation and for generating results comparable to standard BLER vs. SNR curves. It is also the convention used by MATLAB 5G Toolbox link-level simulations.

2) Received-power-based SNR (useRxPower=True)

In this mode, the noise power is derived from the actual received grid. The function first estimates the average received signal power per resource element (RE), and then applies noise to achieve the requested SNR relative to that measured power:

\[\sigma^2_{AWGN} = \frac{\sigma^2_{RX}}{10^{\frac{SNR_{dB}}{10}}}\]

where \(\sigma^2_{RX}\) is the estimated average received power per RE.

Example
rxGrid.addNoise(snrDb=mySnrDb, useRxPower=True)

This mode enforces a post-channel SNR, meaning that the resulting SNR is tied to the instantaneous received signal. As a result, variations caused by fading or other channel effects are partially normalized out, since both signal and noise scale together.

This approach is useful for controlled algorithm evaluation, for example when benchmarking equalization, channel estimation, or decoding at a fixed received SNR. However, it is generally less suitable for 3GPP-style link-level performance studies, where channel variability is expected to directly impact the effective SNR.

In summary:

  • useRxPower=False: Reference-power SNR. Recommended for link-level simulation results that are closer to common 3GPP-style evaluation methodology.

  • useRxPower=True: Received-power-based SNR. Useful when you intentionally want to control the SNR relative to the actual received grid power.

Please refer to the notebook SNR Calculations in NeoRadium for a more detailed discussion of SNR definitions and AWGN scaling in NeoRadium.

Parameters:

kwargs (dict) –

The amount of noise must be specified by one of noise, noiseStd, noiseVar, or snrDb.

noise:

NumPy array with the same shape as this Grid object containing the noise values. If noise is provided, it is added directly to the grid and all other parameters are ignored.

noiseStd:

Standard deviation of the AWGN. Complex zero-mean AWGN is generated using the specified standard deviation. If noiseStd is specified, noiseVar and snrDb are ignored.

noiseVar:

Variance of the AWGN. Complex zero-mean AWGN is generated using the specified variance. If noiseVar is specified, snrDb is ignored.

snrDb:

Signal-to-noise ratio in decibels (dB). When snrDb is provided, the noise standard deviation is calculated from the given SNR and the useRxPower setting, and AWGN is generated accordingly.

useRxPower:

Controls how snrDb is interpreted.

  • False: Use the reference-power SNR convention. A normalized received power of \(\frac{1}{N_r}\) is assumed, where \(N_r\) is the number of receive antennas. This mode is closer to common 3GPP-style link-level evaluation practice and is the default.

  • True: Use the actual received grid power to compute the AWGN level. This sets the noise power relative to the measured received signal power.

Note

The default is False. This keeps the behavior closer to common 3GPP-style link-level simulations and to MATLAB 5G Toolbox conventions. For reproducibility and clarity, it is recommended to always set useRxPower explicitly in user code.

ranGen:

If provided, this random-number generator is used for AWGN generation. Typically a RanGen instance, or any object exposing an awgn(shape, noiseStd) method that returns complex Gaussian samples. Otherwise, NeoRadium’s global random generator (the module-level random singleton) is used.

Returns:

A new grid containing the noisy version of this grid. The noiseVar property of the returned grid contains the variance of the noise applied by this function.

Return type:

Grid

drawMap(ports=[0], rbRange=(0, 0), title=None, figSize=6.0, axes=None, reRange=None)

Draws a color-coded map of this grid object. Each port is drawn separately with subcarriers in the horizontal direction and OFDM symbols in vertical direction.

Parameters:
  • ports (list) – Specifies the list of ports (or planes) to draw. Each port is drawn separately. By default, this function draws only the first plane of the resource grid.

  • rbRange (tuple or int) – If this is an integer, this function draws the map for the specified resource block. If this is a tuple, it specifies the range of resource blocks (RBs) to draw. By default, this function only draws the first resource block of the grid (subcarriers 0 to 12). The tuple (a, b) means draw resource blocks a to b including both a and b.

  • title (str or None) – If specified, it is used as the title for the drawn resource-grid map. Otherwise, this function automatically creates a title based on the given parameters.

  • figSize (float) – The figure size. Use this to control size of the plot. The default is 6.0.

  • ax (matplotlib.axes.Axes or None) – If specified, it must be a matplotlib Axis object on which the resource grid map is drawn. This can be used to create a group of matplotlib subplots and draw the resource grid map in one of the subplots.

  • reRange (tuple) – This parameter is deprecated: and included only for backward compatibility. It will be removed in future releases. Please use rbRange instead.