"""Migration Guide: DeepMIMO v3 to v4."""
'Migration Guide: DeepMIMO v3 to v4.'
Migration Guide: DeepMIMO v3 to v4.¶
Tutorial Overview:
- Key differences between v3 and v4
- Channel generation changes
- Data access and format changes
- User selection changes
- Legacy v3 row/column compatibility
- Best practices for migration
Related Video: Migration Video
import deepmimo as dm
Overview¶
DeepMIMO v4 introduces significant changes for improved performance, storage efficiency, and expanded capabilities. This guide helps you migrate from v3 to v4.
v3 Workflow (Old)¶
# V3 Example (DO NOT RUN - for reference only)
v3_example = """
# DeepMIMO v3 workflow:
import DeepMIMOv3
# Load default parameters
params = DeepMIMOv3.default_params()
# Configure scenario
params["dataset_folder"] = "."
params["scenario"] = "asu_campus1"
params["active_BS"] = np.array([1])
params["user_rows"] = np.arange(321)
# Configure antennas
params["ue_antenna"]["shape"] = np.array([1, 1])
params["bs_antenna"]["shape"] = np.array([8, 1])
# Generate dataset
dataset = DeepMIMOv3.generate_data(params)
# Access data
channels = dataset[0]["user"]["channel"]
"""
print("DeepMIMO v3 workflow (deprecated):")
print(v3_example)
DeepMIMO v3 workflow (deprecated): # DeepMIMO v3 workflow: import DeepMIMOv3 # Load default parameters params = DeepMIMOv3.default_params() # Configure scenario params["dataset_folder"] = "." params["scenario"] = "asu_campus1" params["active_BS"] = np.array([1]) params["user_rows"] = np.arange(321) # Configure antennas params["ue_antenna"]["shape"] = np.array([1, 1]) params["bs_antenna"]["shape"] = np.array([8, 1]) # Generate dataset dataset = DeepMIMOv3.generate_data(params) # Access data channels = dataset[0]["user"]["channel"]
v4 Workflow (New)¶
# DeepMIMO v4 workflow:
# Download and load scenario
scen_name = "asu_campus_3p5"
dm.download(scen_name)
dataset = dm.load(scen_name)
# Configure channel parameters
ch_params = dm.ChannelParameters()
ch_params.bs_antenna.shape = [8, 1]
ch_params.ue_antenna.shape = [1, 1]
# Generate channels
dataset.compute_channels(ch_params)
channels = dataset.channel
print("v4 Dataset loaded successfully")
print(f"Channel shape: {channels.shape}")
Scenario "asu_campus_3p5" already exists in /home/joao/DeepMIMO/docs/tutorials/deepmimo_scenarios Loading TXRX PAIR: TXset 1 (tx_idx 0) & RXset 0 (rx_idxs 131931)
Generating channels: 0%| | 0/131931 [00:00<?, ?it/s]
Generating channels: 2%|▏ | 2588/131931 [00:00<00:05, 25858.08it/s]
Generating channels: 4%|▍ | 5174/131931 [00:00<00:06, 20283.42it/s]
Generating channels: 6%|▌ | 7276/131931 [00:00<00:07, 16161.42it/s]
Generating channels: 7%|▋ | 8987/131931 [00:00<00:08, 14522.52it/s]
Generating channels: 8%|▊ | 10495/131931 [00:00<00:08, 13728.58it/s]
Generating channels: 9%|▉ | 11895/131931 [00:00<00:09, 13123.49it/s]
Generating channels: 10%|█ | 13219/131931 [00:00<00:09, 12577.57it/s]
Generating channels: 11%|█ | 14480/131931 [00:01<00:09, 12104.12it/s]
Generating channels: 12%|█▏ | 15690/131931 [00:01<00:09, 11892.34it/s]
Generating channels: 13%|█▎ | 16877/131931 [00:01<00:09, 11661.75it/s]
Generating channels: 14%|█▎ | 18040/131931 [00:01<00:09, 11496.45it/s]
Generating channels: 15%|█▍ | 19187/131931 [00:01<00:09, 11426.89it/s]
Generating channels: 16%|█▌ | 20513/131931 [00:01<00:09, 11948.60it/s]
Generating channels: 17%|█▋ | 22020/131931 [00:01<00:08, 12851.48it/s]
Generating channels: 18%|█▊ | 23450/131931 [00:01<00:08, 13275.37it/s]
Generating channels: 19%|█▉ | 25297/131931 [00:01<00:07, 14805.80it/s]
Generating channels: 21%|██ | 27272/131931 [00:01<00:06, 16269.47it/s]
Generating channels: 22%|██▏ | 29231/131931 [00:02<00:05, 17255.55it/s]
Generating channels: 24%|██▎ | 31313/131931 [00:02<00:05, 18316.96it/s]
Generating channels: 26%|██▌ | 33974/131931 [00:02<00:04, 20793.72it/s]
Generating channels: 28%|██▊ | 36517/131931 [00:02<00:04, 22175.92it/s]
Generating channels: 30%|██▉ | 39018/131931 [00:02<00:04, 23024.12it/s]
Generating channels: 31%|███▏ | 41432/131931 [00:02<00:03, 23352.49it/s]
Generating channels: 33%|███▎ | 43770/131931 [00:02<00:03, 22308.86it/s]
Generating channels: 35%|███▍ | 46013/131931 [00:02<00:04, 21017.95it/s]
Generating channels: 36%|███▋ | 48136/131931 [00:02<00:04, 20864.59it/s]
Generating channels: 39%|███▊ | 50976/131931 [00:02<00:03, 23004.37it/s]
Generating channels: 41%|████ | 54107/131931 [00:03<00:03, 25398.40it/s]
Generating channels: 43%|████▎ | 56681/131931 [00:03<00:02, 25497.59it/s]
Generating channels: 45%|████▍ | 59249/131931 [00:03<00:02, 25043.66it/s]
Generating channels: 47%|████▋ | 61767/131931 [00:03<00:02, 23832.09it/s]
Generating channels: 49%|████▊ | 64170/131931 [00:03<00:03, 21352.24it/s]
Generating channels: 50%|█████ | 66361/131931 [00:03<00:03, 19406.87it/s]
Generating channels: 52%|█████▏ | 68362/131931 [00:03<00:03, 18078.53it/s]
Generating channels: 53%|█████▎ | 70217/131931 [00:03<00:03, 17785.66it/s]
Generating channels: 55%|█████▍ | 72026/131931 [00:04<00:03, 16804.88it/s]
Generating channels: 56%|█████▌ | 73729/131931 [00:04<00:03, 16112.83it/s]
Generating channels: 57%|█████▋ | 75354/131931 [00:04<00:03, 15995.75it/s]
Generating channels: 59%|█████▉ | 77694/131931 [00:04<00:03, 17994.37it/s]
Generating channels: 60%|██████ | 79522/131931 [00:04<00:03, 17295.93it/s]
Generating channels: 62%|██████▏ | 81334/131931 [00:04<00:02, 17521.65it/s]
Generating channels: 63%|██████▎ | 83117/131931 [00:04<00:02, 17608.56it/s]
Generating channels: 64%|██████▍ | 85088/131931 [00:04<00:02, 18209.42it/s]
Generating channels: 66%|██████▌ | 86921/131931 [00:04<00:02, 17979.03it/s]
Generating channels: 67%|██████▋ | 88727/131931 [00:05<00:02, 17650.52it/s]
Generating channels: 69%|██████▊ | 90499/131931 [00:05<00:02, 17119.50it/s]
Generating channels: 70%|██████▉ | 92218/131931 [00:05<00:02, 16391.58it/s]
Generating channels: 71%|███████ | 93866/131931 [00:05<00:02, 15810.97it/s]
Generating channels: 72%|███████▏ | 95455/131931 [00:05<00:02, 15303.18it/s]
Generating channels: 74%|███████▎ | 96991/131931 [00:05<00:02, 14606.81it/s]
Generating channels: 75%|███████▍ | 98459/131931 [00:05<00:02, 13503.38it/s]
Generating channels: 76%|███████▌ | 99824/131931 [00:05<00:02, 12791.36it/s]
Generating channels: 77%|███████▋ | 101115/131931 [00:05<00:02, 12256.48it/s]
Generating channels: 78%|███████▊ | 102349/131931 [00:06<00:02, 11739.34it/s]
Generating channels: 78%|███████▊ | 103528/131931 [00:06<00:02, 11517.18it/s]
Generating channels: 79%|███████▉ | 104682/131931 [00:06<00:02, 11450.97it/s]
Generating channels: 80%|████████ | 105828/131931 [00:06<00:02, 11355.44it/s]
Generating channels: 81%|████████ | 106964/131931 [00:06<00:02, 11310.74it/s]
Generating channels: 82%|████████▏ | 108370/131931 [00:06<00:01, 12095.87it/s]
Generating channels: 83%|████████▎ | 110035/131931 [00:06<00:01, 13416.06it/s]
Generating channels: 85%|████████▍ | 111899/131931 [00:06<00:01, 14947.71it/s]
Generating channels: 87%|████████▋ | 114227/131931 [00:06<00:01, 17405.09it/s]
Generating channels: 88%|████████▊ | 116450/131931 [00:06<00:00, 18832.74it/s]
Generating channels: 90%|█████████ | 118799/131931 [00:07<00:00, 20216.21it/s]
Generating channels: 92%|█████████▏| 120937/131931 [00:07<00:00, 20561.36it/s]
Generating channels: 93%|█████████▎| 122999/131931 [00:07<00:00, 20395.55it/s]
Generating channels: 95%|█████████▍| 125114/131931 [00:07<00:00, 20615.11it/s]
Generating channels: 96%|█████████▋| 127269/131931 [00:07<00:00, 20892.54it/s]
Generating channels: 98%|█████████▊| 129854/131931 [00:07<00:00, 22367.03it/s]
Generating channels: 100%|██████████| 131931/131931 [00:07<00:00, 17201.58it/s]
v4 Dataset loaded successfully Channel shape: (131931, 1, 8, 1)
# v3: pip install deepmimov3
# v4: pip install deepmimo
print("v3: pip install DeepMIMOv3")
print("v4: pip install deepmimo")
v3: pip install DeepMIMOv3 v4: pip install deepmimo
2. Import Statements¶
# v3: import DeepMIMOv3
# v4: import deepmimo as dm
print("v3: import DeepMIMOv3")
print("v4: import deepmimo as dm")
v3: import DeepMIMOv3 v4: import deepmimo as dm
3. Dataset Loading¶
comparison = """
# v3:
params = DeepMIMOv3.default_params()
params["dataset_folder"] = "."
params["scenario"] = "asu_campus1"
dataset = DeepMIMOv3.generate_data(params)
# v4:
dm.download("asu_campus_3p5")
dataset = dm.load("asu_campus_3p5")
"""
print("Dataset Loading:")
print(comparison)
Dataset Loading:
# v3:
params = DeepMIMOv3.default_params()
params["dataset_folder"] = "."
params["scenario"] = "asu_campus1"
dataset = DeepMIMOv3.generate_data(params)
# v4:
dm.download("asu_campus_3p5")
dataset = dm.load("asu_campus_3p5")
Channel Generation¶
Channel generation is now explicit and on-demand.
v3: Implicit Generation¶
v3_channel_gen = """
# v3: Channels generated during dataset loading
params["OFDM"]["subcarriers"] = 512
params["OFDM"]["bandwidth"] = 10e6
dataset = DeepMIMOv3.generate_data(params)
channels = dataset[0]["user"]["channel"]
"""
print("v3 channel generation (automatic):")
print(v3_channel_gen)
v3 channel generation (automatic): # v3: Channels generated during dataset loading params["OFDM"]["subcarriers"] = 512 params["OFDM"]["bandwidth"] = 10e6 dataset = DeepMIMOv3.generate_data(params) channels = dataset[0]["user"]["channel"]
v4: Explicit Generation¶
# v4: Channels generated on-demand
ch_params = dm.ChannelParameters()
ch_params.freq_domain = True # Frequency domain
ch_params.ofdm.subcarriers = 512
ch_params.ofdm.bandwidth = 10e6
dataset.compute_channels(ch_params)
channels = dataset.channel
print(f"v4 channel shape: {channels.shape}")
Generating channels: 0%| | 0/131931 [00:00<?, ?it/s]
Generating channels: 2%|▏ | 2723/131931 [00:00<00:04, 27216.53it/s]
Generating channels: 4%|▍ | 5445/131931 [00:00<00:06, 19833.71it/s]
Generating channels: 6%|▌ | 7547/131931 [00:00<00:07, 16260.93it/s]
Generating channels: 7%|▋ | 9270/131931 [00:00<00:08, 14621.58it/s]
Generating channels: 8%|▊ | 10787/131931 [00:00<00:08, 13755.71it/s]
Generating channels: 9%|▉ | 12189/131931 [00:00<00:09, 13138.53it/s]
Generating channels: 10%|█ | 13513/131931 [00:00<00:09, 12665.26it/s]
Generating channels: 11%|█ | 14782/131931 [00:01<00:09, 12297.55it/s]
Generating channels: 12%|█▏ | 16010/131931 [00:01<00:09, 12063.79it/s]
Generating channels: 13%|█▎ | 17213/131931 [00:01<00:09, 11885.36it/s]
Generating channels: 14%|█▍ | 18398/131931 [00:01<00:09, 11828.26it/s]
Generating channels: 15%|█▍ | 19596/131931 [00:01<00:09, 11870.62it/s]
Generating channels: 16%|█▌ | 21068/131931 [00:01<00:08, 12692.81it/s]
Generating channels: 17%|█▋ | 22490/131931 [00:01<00:08, 13138.14it/s]
Generating channels: 18%|█▊ | 24081/131931 [00:01<00:07, 13951.62it/s]
Generating channels: 20%|█▉ | 26052/131931 [00:01<00:06, 15654.78it/s]
Generating channels: 21%|██ | 27958/131931 [00:01<00:06, 16664.33it/s]
Generating channels: 23%|██▎ | 29950/131931 [00:02<00:05, 17632.58it/s]
Generating channels: 24%|██▍ | 32229/131931 [00:02<00:05, 19169.45it/s]
Generating channels: 26%|██▋ | 34913/131931 [00:02<00:04, 21461.14it/s]
Generating channels: 28%|██▊ | 37138/131931 [00:02<00:04, 21696.51it/s]
Generating channels: 30%|██▉ | 39433/131931 [00:02<00:04, 22069.75it/s]
Generating channels: 32%|███▏ | 41794/131931 [00:02<00:04, 22531.02it/s]
Generating channels: 33%|███▎ | 44049/131931 [00:02<00:04, 21225.08it/s]
Generating channels: 35%|███▌ | 46188/131931 [00:02<00:04, 20690.46it/s]
Generating channels: 37%|███▋ | 48270/131931 [00:02<00:04, 20698.96it/s]
Generating channels: 39%|███▉ | 51219/131931 [00:02<00:03, 23239.98it/s]
Generating channels: 41%|████ | 54274/131931 [00:03<00:03, 25376.56it/s]
Generating channels: 43%|████▎ | 56835/131931 [00:03<00:02, 25440.08it/s]
Generating channels: 45%|████▌ | 59391/131931 [00:03<00:02, 24685.95it/s]
Generating channels: 47%|████▋ | 61873/131931 [00:03<00:02, 23414.93it/s]
Generating channels: 49%|████▊ | 64235/131931 [00:03<00:03, 20811.77it/s]
Generating channels: 50%|█████ | 66376/131931 [00:03<00:03, 18997.69it/s]
Generating channels: 52%|█████▏ | 68336/131931 [00:03<00:03, 17734.96it/s]
Generating channels: 53%|█████▎ | 70155/131931 [00:03<00:03, 17262.98it/s]
Generating channels: 55%|█████▍ | 71910/131931 [00:04<00:03, 16547.40it/s]
Generating channels: 56%|█████▌ | 73583/131931 [00:04<00:03, 16120.25it/s]
Generating channels: 57%|█████▋ | 75375/131931 [00:04<00:03, 16596.27it/s]
Generating channels: 59%|█████▉ | 77734/131931 [00:04<00:02, 18515.19it/s]
Generating channels: 60%|██████ | 79612/131931 [00:04<00:02, 18246.09it/s]
Generating channels: 62%|██████▏ | 81455/131931 [00:04<00:02, 17907.63it/s]
Generating channels: 63%|██████▎ | 83271/131931 [00:04<00:02, 17976.38it/s]
Generating channels: 65%|██████▍ | 85186/131931 [00:04<00:02, 18314.53it/s]
Generating channels: 66%|██████▌ | 87077/131931 [00:04<00:02, 18486.65it/s]
Generating channels: 67%|██████▋ | 88932/131931 [00:05<00:02, 17985.21it/s]
Generating channels: 69%|██████▉ | 90759/131931 [00:05<00:02, 18064.34it/s]
Generating channels: 70%|███████ | 92571/131931 [00:05<00:02, 16802.08it/s]
Generating channels: 71%|███████▏ | 94271/131931 [00:05<00:02, 15583.68it/s]
Generating channels: 73%|███████▎ | 95856/131931 [00:05<00:02, 14876.70it/s]
Generating channels: 74%|███████▍ | 97364/131931 [00:05<00:02, 14261.84it/s]
Generating channels: 75%|███████▍ | 98805/131931 [00:05<00:02, 13340.20it/s]
Generating channels: 76%|███████▌ | 100154/131931 [00:05<00:02, 12789.42it/s]
Generating channels: 77%|███████▋ | 101443/131931 [00:05<00:02, 12394.33it/s]
Generating channels: 78%|███████▊ | 102688/131931 [00:06<00:02, 11927.77it/s]
Generating channels: 79%|███████▊ | 103884/131931 [00:06<00:02, 11731.33it/s]
Generating channels: 80%|███████▉ | 105058/131931 [00:06<00:02, 11351.66it/s]
Generating channels: 81%|████████ | 106205/131931 [00:06<00:02, 11381.63it/s]
Generating channels: 81%|████████▏ | 107347/131931 [00:06<00:02, 11390.10it/s]
Generating channels: 83%|████████▎ | 108855/131931 [00:06<00:01, 12448.31it/s]
Generating channels: 84%|████████▎ | 110491/131931 [00:06<00:01, 13585.20it/s]
Generating channels: 85%|████████▌ | 112356/131931 [00:06<00:01, 15070.60it/s]
Generating channels: 87%|████████▋ | 114699/131931 [00:06<00:00, 17539.18it/s]
Generating channels: 89%|████████▉ | 117148/131931 [00:06<00:00, 19597.31it/s]
Generating channels: 91%|█████████ | 119547/131931 [00:07<00:00, 20899.12it/s]
Generating channels: 92%|█████████▏| 121645/131931 [00:07<00:00, 20638.25it/s]
Generating channels: 94%|█████████▍| 123715/131931 [00:07<00:00, 20455.95it/s]
Generating channels: 95%|█████████▌| 125765/131931 [00:07<00:00, 20396.55it/s]
Generating channels: 97%|█████████▋| 127989/131931 [00:07<00:00, 20941.05it/s]
Generating channels: 99%|█████████▉| 130727/131931 [00:07<00:00, 22853.61it/s]
Generating channels: 100%|██████████| 131931/131931 [00:07<00:00, 17266.29it/s]
v4 channel shape: (131931, 1, 8, 1)
Data Access¶
Data access is simplified in v4.
v3: Nested Dictionary¶
v3_data_access = """
# v3: Nested dictionary access
power = dataset[bs_idx]["user"]["power"]
delay = dataset[bs_idx]["user"]["delay"]
aoa = dataset[bs_idx]["user"]["DoA_phi"]
aod = dataset[bs_idx]["user"]["DoD_phi"]
"""
print("v3 data access (nested):")
print(v3_data_access)
v3 data access (nested): # v3: Nested dictionary access power = dataset[bs_idx]["user"]["power"] delay = dataset[bs_idx]["user"]["delay"] aoa = dataset[bs_idx]["user"]["DoA_phi"] aod = dataset[bs_idx]["user"]["DoD_phi"]
v4: Direct Attributes¶
# v4: Direct attribute access
power = dataset.power
delay = dataset.delay
aoa_az = dataset.aoa_az
aod_az = dataset.aod_az
print("v4 data access (direct):")
print(f" Power shape: {power.shape}")
print(f" Delay shape: {delay.shape}")
print(f" AOA (az) shape: {aoa_az.shape}")
v4 data access (direct): Power shape: (131931, 10) Delay shape: (131931, 10) AOA (az) shape: (131931, 10)
User Selection¶
User selection methods have changed.
v3: Row/Column Selection¶
v3_user_selection = """
# v3: Use row indices during parameter setup
params["user_rows"] = np.arange(0, 100, 10) # Every 10th row
dataset = DeepMIMOv3.generate_data(params)
"""
print("v3 user selection (pre-generation):")
print(v3_user_selection)
v3 user selection (pre-generation): # v3: Use row indices during parameter setup params["user_rows"] = np.arange(0, 100, 10) # Every 10th row dataset = DeepMIMOv3.generate_data(params)
v4: Post-Loading Selection¶
# v4: Select users after loading
row_idxs = dataset.get_idxs(mode="row", row_idxs=list(range(0, 100, 10)))
subset = dataset.trim(idxs=row_idxs)
print("v4 user selection (post-loading):")
print(f" Selected {len(row_idxs)} users")
v4 user selection (post-loading): Selected 4110 users
Matching Legacy v3 Row/Column Results¶
DeepMIMO v4 keeps the native grid geometry of the scenario. In DeepMIMO v3,
some multi-grid scenarios behaved like one merged RX grid per transmitter, and
row/column indexing could change direction on non-primary RX grids. If you
need to reproduce those exact v3 selections during migration, load the
scenario with compat_v3=True.
When compat_v3=True in dm.load(...), DeepMIMO applies the old merged-grid
indexing view:
- RX grids are merged per transmitter
- the primary RX grid (rank 0) keeps normal row/column behavior
- non-primary RX grids (rank >= 1) swap row/column semantics
This is intended only for reproducing backward-compatible user selection
behavior during migration, including workflows where rx_sets is explicitly
provided for a non-primary grid.
legacy_v3_selection = """
# Migration-only: reproduce the old v3 merged-grid indexing behavior
dataset = dm.load("o1_3p4", tx_sets=[3], compat_v3=True)
# `compat_v3=True` merges RX grids per TX and restores v3-style row/col indexing
legacy_rows = dataset.get_idxs("row", row_idxs=[0, 10, 20])
legacy_cols = dataset.get_idxs("col", col_idxs=[0, 5, 10])
subset = dataset.trim(idxs=legacy_rows)
"""
print("v4 legacy v3 compatibility (migration-only):")
print(legacy_v3_selection)
v4 legacy v3 compatibility (migration-only):
# Migration-only: reproduce the old v3 merged-grid indexing behavior
dataset = dm.load("o1_3p4", tx_sets=[3], compat_v3=True)
# `compat_v3=True` merges RX grids per TX and restores v3-style row/col indexing
legacy_rows = dataset.get_idxs("row", row_idxs=[0, 10, 20])
legacy_cols = dataset.get_idxs("col", col_idxs=[0, 5, 10])
subset = dataset.trim(idxs=legacy_rows)
Parameter Names¶
Many parameter names have changed.
parameter_mapping = {
"DoA_phi / DoA_theta": "aoa_az / aoa_el",
"DoD_phi / DoD_theta": "aod_az / aod_el",
"active_BS": "tx_sets (in dm.load())",
"user_rows": "dataset.get_idxs(mode='row', row_idxs=...)",
"ue_antenna": "ant_ue (in ChannelParameters)",
"bs_antenna": "ant_bs (in ChannelParameters)",
}
print("Parameter name mapping (v3 -> v4):")
for v3_name, v4_name in parameter_mapping.items():
print(f" {v3_name:25s} -> {v4_name}")
Parameter name mapping (v3 -> v4): DoA_phi / DoA_theta -> aoa_az / aoa_el DoD_phi / DoD_theta -> aod_az / aod_el active_BS -> tx_sets (in dm.load()) user_rows -> dataset.get_idxs(mode='row', row_idxs=...) ue_antenna -> ant_ue (in ChannelParameters) bs_antenna -> ant_bs (in ChannelParameters)
Storage Format¶
v4 uses more efficient storage.
# v4 files are typically 50% smaller
print("Storage improvements:")
print(" - v3: Nested dictionaries in .mat files")
print(" - v4: Direct NumPy arrays in .npz files")
print(" - Average size reduction: ~50%")
Storage improvements: - v3: Nested dictionaries in .mat files - v4: Direct NumPy arrays in .npz files - Average size reduction: ~50%
Migration Checklist¶
Use this checklist when migrating your code:
- Update installation:
pip install deepmimo - Change import:
import deepmimo as dm - Replace
default_params()withdm.load() - Replace
generate_data()withdataset.compute_channels() - Update data access from
dataset[bs]["user"]["param"]todataset.param - Move user selection from params to
dataset.get_idxs()anddataset.trim() - Use
dm.load(..., compat_v3=True)only when reproducing exact old v3 indexing - Update parameter names (DoA/DoD -> aoa/aod, etc.)
- Update antenna configuration to ChannelParameters
- Test thoroughly with your existing workflows
Common Migration Patterns¶
Pattern 1: Basic Channel Generation¶
print("Pattern 1: Basic Channel Generation")
print("\nv3:")
print("""
params = DeepMIMOv3.default_params()
params["scenario"] = "O1_60"
params["bs_antenna"]["shape"] = [4, 4]
dataset = DeepMIMOv3.generate_data(params)
ch = dataset[0]["user"]["channel"]
""")
print("\nv4:")
print("""
dataset = dm.load("city_18_denver_3p5")
ch_params = dm.ChannelParameters()
ch_params.bs_antenna.shape = [4, 4]
dataset.compute_channels(ch_params)
ch = dataset.channel
""")
Pattern 1: Basic Channel Generation
v3:
params = DeepMIMOv3.default_params()
params["scenario"] = "O1_60"
params["bs_antenna"]["shape"] = [4, 4]
dataset = DeepMIMOv3.generate_data(params)
ch = dataset[0]["user"]["channel"]
v4:
dataset = dm.load("city_18_denver_3p5")
ch_params = dm.ChannelParameters()
ch_params.bs_antenna.shape = [4, 4]
dataset.compute_channels(ch_params)
ch = dataset.channel
Pattern 2: OFDM Channels¶
print("\nPattern 2: OFDM Channels")
print("\nv3:")
print("""
params["OFDM"]["subcarriers"] = 512
params["OFDM"]["bandwidth"] = 10e6
dataset = DeepMIMOv3.generate_data(params)
""")
print("\nv4:")
print("""
ch_params.freq_domain = True
ch_params.ofdm.subcarriers = 512
ch_params.ofdm.bandwidth = 10e6
dataset.compute_channels(ch_params)
ch = dataset.channel
""")
Pattern 2: OFDM Channels v3: params["OFDM"]["subcarriers"] = 512 params["OFDM"]["bandwidth"] = 10e6 dataset = DeepMIMOv3.generate_data(params) v4: ch_params.freq_domain = True ch_params.ofdm.subcarriers = 512 ch_params.ofdm.bandwidth = 10e6 dataset.compute_channels(ch_params) ch = dataset.channel
Pattern 3: User Sampling¶
print("\nPattern 3: User Sampling")
print("\nv3:")
print("""
params["user_rows"] = [0, 10, 20]
dataset = DeepMIMOv3.generate_data(params)
""")
print("\nv4:")
print("""
dataset = dm.load(scenario)
row_idxs = dataset.get_idxs(mode='row', row_idxs=[0, 10, 20])
subset = dataset.trim(idxs=row_idxs)
""")
Pattern 3: User Sampling v3: params["user_rows"] = [0, 10, 20] dataset = DeepMIMOv3.generate_data(params) v4: dataset = dm.load(scenario) row_idxs = dataset.get_idxs(mode='row', row_idxs=[0, 10, 20]) subset = dataset.trim(idxs=row_idxs)
Benefits of v4¶
- Performance: Faster loading and processing
- Storage: 50% smaller dataset files
- Flexibility: On-demand channel generation
- Simplicity: Cleaner API and data access
- Features: New visualization, sampling, and converter tools
- Documentation: Comprehensive tutorials and examples
Need Help?¶
- Check the documentation
- Ask questions on GitHub Discussions
- Report bugs on GitHub Issues
- Join the community at deepmimo.net
Next Steps¶
Now that you've migrated to v4, explore:
- Tutorial 1: Getting Started - Learn v4 basics
- Tutorial 2: Visualization - Use new visualization features
- Tutorial 3: Channel Generation - Master channel generation