Waveform Dumping

Dump and inspect waveform outputs
View as Markdown

When running in RAN simulation mode, set RX FT filename in worker/config_ran.json to a non-empty H5 filename to dump received frequency-time signal grids. Leave it as an empty string to disable waveform dumping.

{
"RX FT filename": "rx_dump.h5"
}

After the run, find the H5 dump at worker/data/rx_dump.h5.

The simulator writes one HDF5 group per slot, using the slot number as the group name. Each dumped slot contains:

  • mRxSignal: received I/Q samples. Shape: (active cell num, rx ant num, symbol num, subcarrier num).
  • slot_type: slot direction. 0 is DL and 1 is UL.
  • uids: active UE IDs for the slot.
  • cids: active cell IDs for the slot.

Read dumped samples

Use h5py to read the dumped data. mRxSignal is stored as a compound complex dataset with real and imag fields.

import h5py
file_path = "worker/data/rx_dump.h5"
with h5py.File(file_path, "r") as h5_file:
slot = "0"
slot_group = h5_file[slot]
rx_raw = slot_group["mRxSignal"][:]
rx_data = rx_raw["real"] + 1j * rx_raw["imag"]
slot_type = slot_group["slot_type"][:] # 0: DL, 1: UL
uids = slot_group["uids"][:]
cids = slot_group["cids"][:]
print(rx_data.shape)