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.

1{
2 "RX FT filename": "rx_dump.h5"
3}

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.

1import h5py
2
3file_path = "worker/data/rx_dump.h5"
4
5with h5py.File(file_path, "r") as h5_file:
6 slot = "0"
7 slot_group = h5_file[slot]
8
9 rx_raw = slot_group["mRxSignal"][:]
10 rx_data = rx_raw["real"] + 1j * rx_raw["imag"]
11
12 slot_type = slot_group["slot_type"][:] # 0: DL, 1: UL
13 uids = slot_group["uids"][:]
14 cids = slot_group["cids"][:]
15
16print(rx_data.shape)