Tutorial: Export CSI Movies¶

This notebook exports two MP4 files from the processed RF xarray:

  1. a phase movie on the antenna plane
  2. a power movie on the antenna plane

Each frame corresponds to one valid (experiment_id, cycle_id) pair. When you select multiple experiment IDs, the notebook merges them into one measurement sequence and can sample frames evenly to keep the video length manageable.

Use this notebook when you already have the processed .nc file and want a compact visual summary of how the CSI changes as the rover moves through the room.

# Optional: uncomment when this Jupyter kernel misses the plotting dependencies.
# import sys
# !{sys.executable} -m pip install matplotlib numpy requests xarray pyyaml
from pathlib import Path
import importlib.util
import sys

NOTEBOOK_DIR = Path.cwd().resolve()
for candidate_dir in (
    NOTEBOOK_DIR,
    NOTEBOOK_DIR / "tutorials",
    NOTEBOOK_DIR / "processing" / "tutorials",
):
    if (candidate_dir / "csi_plot_utils.py").exists():
        NOTEBOOK_DIR = candidate_dir.resolve()
        break
else:
    raise ImportError(f"Could not locate csi_plot_utils.py from {Path.cwd().resolve()}")

UTILS_PATH = NOTEBOOK_DIR / "csi_plot_utils.py"
PROCESSING_DIR = NOTEBOOK_DIR.parent
PROJECT_ROOT = PROCESSING_DIR.parent
REPO_ROOT = PROJECT_ROOT
spec = importlib.util.spec_from_file_location("csi_plot_utils", UTILS_PATH)
csi = importlib.util.module_from_spec(spec)
sys.modules[spec.name] = csi
spec.loader.exec_module(csi)
REQUESTED_EXPERIMENT_IDS = None  # Example: ["EXP003", "EXP005"]. None means: use all experiment IDs in the opened dataset.
DATASET_PATH = None  # Set this to a specific .nc file when you do not want the newest match.
MOVIE_OUTPUT_DIR = None  # None means: write into ./results/tutorial_movies.
PHASE_MOVIE_NAME = "phase_rover_merged.mp4"
POWER_MOVIE_NAME = "power_rover_merged.mp4"
MOVIE_MAX_FRAMES = csi.DEFAULT_MOVIE_MAX_FRAMES
MOVIE_FPS = csi.DEFAULT_MOVIE_FPS
if REQUESTED_EXPERIMENT_IDS is None:
    ds, dataset_path = csi.open_dataset(dataset_path=DATASET_PATH)
    EXPERIMENT_IDS = csi.available_experiment_ids(ds)
else:
    EXPERIMENT_IDS = csi.normalize_experiment_ids(REQUESTED_EXPERIMENT_IDS)
    ds, dataset_path = csi.open_dataset(experiment_id=EXPERIMENT_IDS, dataset_path=DATASET_PATH)

antenna_positions = csi.load_antenna_positions()
output_dir = REPO_ROOT / "results" / "tutorial_movies" if MOVIE_OUTPUT_DIR is None else Path(MOVIE_OUTPUT_DIR)
output_dir.mkdir(parents=True, exist_ok=True)
movie_frames = csi.movie_frame_table(ds, EXPERIMENT_IDS, max_frames=MOVIE_MAX_FRAMES)

print(f"Loaded dataset: {dataset_path}")
print(f"Selected experiment IDs: {EXPERIMENT_IDS}")
print(f"Movie output directory: {output_dir}")
print(
    f"Movie frames: {movie_frames.attrs['frame_count']} "
    f"(sampled={movie_frames.attrs['sampled']}, total_valid_positions={movie_frames.attrs['total_valid_positions']})"
)
print(f"Loaded {len(antenna_positions)} antenna positions from: {csi.POSITIONS_URL}")
Loaded dataset: C:\Users\Calle\OneDrive\Documenten\GitHub\ELLIIIT-dataset-26\results\csi_EXP003__EXP005__EXP006__EXP007__EXP008__EXP009__EXP010__EXP011__EXP012.nc
Selected experiment IDs: ['EXP003', 'EXP005', 'EXP006', 'EXP007', 'EXP008', 'EXP009', 'EXP010', 'EXP011', 'EXP012']
Movie output directory: C:\Users\Calle\OneDrive\Documenten\GitHub\ELLIIIT-dataset-26\results\tutorial_movies
Movie frames: 250 (sampled=True, total_valid_positions=5011)
Loaded 140 antenna positions from: https://raw.githubusercontent.com/techtile-by-dramco/techtile-description/refs/heads/main/geometry/techtile_antenna_locations.yml

Inspect The Export Plan¶

The table below shows which (experiment_id, cycle_id) pairs will become movie frames.

If the merged dataset contains more valid rover positions than MOVIE_MAX_FRAMES, the helper samples frames evenly across the full sequence. This keeps the MP4 readable while still covering the whole measurement set.

movie_frames
<xarray.Dataset> Size: 20kB
Dimensions:                   (measurement_index: 250)
Coordinates:
  * measurement_index         (measurement_index) int64 2kB 0 1 2 ... 248 249
Data variables:
    experiment_id             (measurement_index) <U6 6kB 'EXP003' ... 'EXP012'
    cycle_id                  (measurement_index) int64 2kB 1 21 41 ... 763 784
    rover_x                   (measurement_index) float64 2kB 1.918 ... 5.286
    rover_y                   (measurement_index) float64 2kB 2.865 ... 2.954
    rover_z                   (measurement_index) float64 2kB 0.7394 ... 0.7578
    csi_host_count            (measurement_index) int64 2kB 42 42 42 ... 41 41
    source_measurement_index  (measurement_index) int64 2kB 0 20 ... 4989 5010
Attributes:
    experiment_ids:         ['EXP003', 'EXP005', 'EXP006', 'EXP007', 'EXP008'...
    total_valid_positions:  5011
    frame_count:            250
    requested_max_frames:   250
    sampled:                True
xarray.Dataset
    • measurement_index: 250
    • measurement_index
      (measurement_index)
      int64
      0 1 2 3 4 5 ... 245 246 247 248 249
      array([  0,   1,   2, ..., 247, 248, 249])
    • experiment_id
      (measurement_index)
      <U6
      'EXP003' 'EXP003' ... 'EXP012'
      array(['EXP003', 'EXP003', 'EXP003', 'EXP003', 'EXP003', 'EXP003',
             'EXP003', 'EXP003', 'EXP003', 'EXP003', 'EXP003', 'EXP003',
             'EXP003', 'EXP003', 'EXP003', 'EXP003', 'EXP003', 'EXP003',
             'EXP003', 'EXP003', 'EXP003', 'EXP003', 'EXP003', 'EXP003',
             'EXP003', 'EXP003', 'EXP003', 'EXP005', 'EXP005', 'EXP005',
             'EXP005', 'EXP005', 'EXP005', 'EXP005', 'EXP005', 'EXP005',
             'EXP005', 'EXP005', 'EXP005', 'EXP005', 'EXP005', 'EXP005',
             'EXP005', 'EXP005', 'EXP005', 'EXP005', 'EXP005', 'EXP005',
             'EXP005', 'EXP005', 'EXP005', 'EXP005', 'EXP005', 'EXP005',
             'EXP005', 'EXP005', 'EXP005', 'EXP005', 'EXP005', 'EXP005',
             'EXP005', 'EXP005', 'EXP005', 'EXP005', 'EXP005', 'EXP006',
             'EXP006', 'EXP006', 'EXP006', 'EXP006', 'EXP006', 'EXP006',
             'EXP006', 'EXP006', 'EXP006', 'EXP006', 'EXP006', 'EXP007',
             'EXP007', 'EXP007', 'EXP007', 'EXP007', 'EXP007', 'EXP007',
             'EXP007', 'EXP007', 'EXP007', 'EXP007', 'EXP007', 'EXP007',
             'EXP007', 'EXP007', 'EXP007', 'EXP007', 'EXP007', 'EXP007',
             'EXP008', 'EXP008', 'EXP008', 'EXP008', 'EXP008', 'EXP008',
             'EXP008', 'EXP008', 'EXP008', 'EXP008', 'EXP009', 'EXP009',
             'EXP009', 'EXP009', 'EXP009', 'EXP009', 'EXP009', 'EXP009',
             'EXP009', 'EXP009', 'EXP009', 'EXP009', 'EXP009', 'EXP009',
      ...
             'EXP009', 'EXP009', 'EXP009', 'EXP009', 'EXP009', 'EXP009',
             'EXP009', 'EXP009', 'EXP009', 'EXP009', 'EXP009', 'EXP009',
             'EXP009', 'EXP009', 'EXP009', 'EXP009', 'EXP009', 'EXP009',
             'EXP009', 'EXP009', 'EXP009', 'EXP009', 'EXP009', 'EXP009',
             'EXP009', 'EXP009', 'EXP009', 'EXP009', 'EXP009', 'EXP009',
             'EXP009', 'EXP009', 'EXP009', 'EXP009', 'EXP009', 'EXP009',
             'EXP009', 'EXP009', 'EXP009', 'EXP009', 'EXP009', 'EXP010',
             'EXP010', 'EXP010', 'EXP010', 'EXP010', 'EXP010', 'EXP010',
             'EXP010', 'EXP010', 'EXP010', 'EXP010', 'EXP010', 'EXP010',
             'EXP010', 'EXP010', 'EXP010', 'EXP010', 'EXP010', 'EXP010',
             'EXP010', 'EXP010', 'EXP010', 'EXP010', 'EXP011', 'EXP011',
             'EXP011', 'EXP011', 'EXP011', 'EXP011', 'EXP011', 'EXP011',
             'EXP011', 'EXP011', 'EXP011', 'EXP011', 'EXP011', 'EXP011',
             'EXP011', 'EXP012', 'EXP012', 'EXP012', 'EXP012', 'EXP012',
             'EXP012', 'EXP012', 'EXP012', 'EXP012', 'EXP012', 'EXP012',
             'EXP012', 'EXP012', 'EXP012', 'EXP012', 'EXP012', 'EXP012',
             'EXP012', 'EXP012', 'EXP012', 'EXP012', 'EXP012', 'EXP012',
             'EXP012', 'EXP012', 'EXP012', 'EXP012', 'EXP012', 'EXP012',
             'EXP012', 'EXP012', 'EXP012', 'EXP012', 'EXP012', 'EXP012',
             'EXP012', 'EXP012', 'EXP012', 'EXP012'], dtype='<U6')
    • cycle_id
      (measurement_index)
      int64
      1 21 41 61 81 ... 723 743 763 784
      array([   1,   21,   41,   61,   81,  101,  121,  141,  161,  182,  202,
              222,  242,  262,  282,  302,  322,  343,  363,  383,  403,  423,
              443,  463,  483,  504,  524,   15,   35,   55,   75,   95,  115,
              135,  156,  176,  196,  216,  236,  256,  276,  296,  317,  337,
              357,  377,  397,  417,  437,  457,  478,  498,  518,  538,  558,
              578,  598,  618,  638,  659,  679,  699,  719,  739,  759,    2,
               22,   43,   63,   83,  103,  123,  143,  163,  183,  204,  224,
                6,   26,   46,   66,   86,  106,  127,  147,  167,  187,  207,
              227,  247,  267,  287,  308,  328,  348,  368,   10,   30,   50,
               70,   91,  111,  131,  151,  171,  191,   10,   30,   51,   71,
               91,  111,  131,  151,  171,  191,  211,  232,  252,  272,  292,
              312,  332,  352,  372,  393,  413,  433,  453,  473,  493,  513,
              533,  554,  574,  594,  614,  634,  654,  674,  694,  714,  735,
              755,  775,  795,  815,  835,  855,  875,  896,  916,  936,  956,
              976,  996, 1016, 1036, 1057, 1077, 1097, 1117, 1137, 1157, 1177,
             1197, 1218, 1238, 1258, 1279, 1299, 1319, 1339,    3,   23,   44,
               64,   84,  104,  124,  144,  164,  184,  205,  225,  245,  265,
              285,  305,  325,  345,  366,  386,  406,  426,  446,    8,   28,
               48,   68,   89,  109,  129,  149,  169,  189,  209,  229,  250,
              270,  290,   19,   39,   59,   79,   99,  120,  140,  160,  180,
              200,  220,  240,  260,  280,  301,  321,  341,  361,  381,  401,
              421,  441,  462,  482,  502,  522,  542,  562,  582,  602,  623,
              643,  663,  683,  703,  723,  743,  763,  784])
    • rover_x
      (measurement_index)
      float64
      1.918 2.415 2.177 ... 5.354 5.286
      array([1.91830371, 2.41461304, 2.17665649, 2.0556394 , 1.81759314,
             1.5788374 , 1.46007458, 1.6947832 , 2.17170972, 2.53462891,
             2.17908472, 1.70171301, 1.30904199, 2.48926904, 2.40043188,
             2.22127295, 2.13149878, 2.04145703, 1.86185449, 1.77299658,
             1.682745  , 1.50270618, 1.41381421, 1.3254137 , 1.64458557,
             1.64367554, 2.53555518, 2.70952588, 2.5897771 , 2.3466167 ,
             2.10607886, 1.98010059, 1.74459045, 2.69495947, 2.703448  ,
             2.2274231 , 1.75006287, 1.62021863, 2.10024316, 2.77446753,
             2.68711255, 2.6009353 , 2.41566479, 2.32638354, 2.24131885,
             2.05557959, 1.96766626, 1.8825752 , 1.69665125, 1.60860425,
             1.58481189, 2.45845068, 2.37472437, 1.58779871, 2.46109473,
             2.37525928, 1.59523364, 2.46189233, 2.37981836, 1.59930566,
             2.82029663, 2.7570603 , 2.68566895, 2.62213745, 2.55087598,
             3.42704004, 3.30767993, 3.07387158, 2.84193262, 2.72098022,
             2.47320605, 2.22528809, 2.33965747, 2.82975366, 3.30824854,
             3.31636938, 2.84214673, 4.253854  , 4.01793262, 3.89531665,
             3.64753442, 3.39689038, 3.28726294, 3.05351978, 3.06131421,
             3.17317627, 3.64762524, 4.1299751 , 4.01050854, 3.528698  ,
             4.19709229, 4.03216089, 3.93874658, 3.83643457, 3.67058545,
             3.57894629, 4.83941748, 4.59190039, 4.34311475, 4.22983936,
      ...
             3.57841479, 3.49619043, 3.44355518, 3.36190674, 3.30852393,
             3.22732739, 3.17428442, 3.0924812 , 4.1001123 , 3.23307153,
             4.1011499 , 3.23329126, 4.1024082 , 3.23454102, 4.1038125 ,
             3.2359668 , 4.03727612, 3.30801172, 4.04475586, 3.37319434,
             3.97308496, 3.37358813, 3.97540503, 5.712229  , 5.59313379,
             5.35641602, 5.1222666 , 5.0045249 , 4.75891895, 4.51385742,
             4.51406299, 4.98849023, 5.4725835 , 5.72154492, 5.24520703,
             4.76973828, 5.67666455, 5.48642432, 5.40292627, 5.31693652,
             5.12614941, 5.04204492, 4.95839307, 4.76791357, 4.68286084,
             4.59860205, 6.86153174, 6.62797412, 6.50788281, 6.26523242,
             6.02410156, 5.90266992, 5.66572168, 5.91359668, 5.6373374 ,
             6.0269082 , 6.50380322, 6.86287305, 6.50475244, 6.72610596,
             6.64141016, 5.50600684, 5.27627002, 5.15463428, 4.90350977,
             4.65353564, 4.53364209, 4.88731201, 5.37283154, 5.50211621,
             5.02870703, 4.55572949, 4.42679395, 5.57711182, 5.48104297,
             5.31900391, 5.21886377, 5.11886719, 4.95837891, 4.85889795,
             4.75910693, 4.5982373 , 4.49929639, 4.39844385, 4.62713184,
             4.89629199, 5.53001855, 4.63547607, 4.8972124 , 5.53760107,
             4.64369531, 4.81585498, 5.63513721, 4.74144531, 5.62382275,
             5.55735791, 5.4885835 , 5.42217139, 5.35365137, 5.28568262])
    • rover_y
      (measurement_index)
      float64
      2.865 2.733 3.211 ... 2.952 2.954
      array([2.86501685, 2.73331714, 3.21096338, 3.47870728, 3.08851636,
             2.60770581, 2.24785327, 2.30901587, 2.55210669, 2.7941062 ,
             2.91163159, 3.14774927, 3.38510767, 2.9726958 , 2.34442554,
             3.24044922, 2.97139087, 2.25051074, 3.1485957 , 3.0590188 ,
             2.24921704, 3.146479  , 3.05657422, 2.24704224, 2.38367676,
             2.47368945, 2.65956006, 3.44150464, 3.32019678, 2.84015161,
             2.35912305, 0.95674811, 1.43640894, 0.77490924, 0.89481488,
             1.13535742, 1.37666602, 1.496979  , 1.73507568, 0.89469592,
             1.34517529, 1.79355493, 0.98479584, 1.25599475, 1.88405591,
             0.98559912, 1.25698181, 1.88650281, 0.98661542, 1.25624084,
             0.76225269, 0.94003558, 1.03036829, 1.12257373, 1.29995581,
             1.3899762 , 1.48207019, 1.65946094, 1.74962817, 1.93263281,
             1.05293958, 1.65950525, 1.05282043, 1.65897144, 1.05251367,
             1.38730054, 1.74862244, 2.11161768, 2.59505908, 2.47543408,
             1.9987002 , 1.52228064, 1.46140295, 1.69476489, 1.92889636,
             2.04872046, 2.29371094, 1.92601501, 1.44090698, 1.79731616,
             2.27071875, 2.65496558, 2.38287549, 2.01826379, 1.5981615 ,
             1.72091052, 1.97156042, 2.22308887, 2.33999438, 2.56809692,
             2.61325269, 1.71030823, 1.88968823, 2.66446387, 1.79123767,
             1.879021  , 1.84334583, 1.36714685, 0.89055096, 1.25180713,
      ...
             3.06052808, 2.04910791, 3.06216626, 2.05089819, 3.06370361,
             2.05380469, 3.06531641, 2.05499878, 1.94122339, 2.01952747,
             2.07616235, 2.15456567, 2.21110132, 2.28917505, 2.34590576,
             2.42386621, 2.48123975, 2.55765405, 2.61619531, 2.6916665 ,
             2.75171021, 2.8263877 , 2.88646484, 1.4317644 , 1.55194739,
             1.91427588, 2.39545093, 2.51744092, 2.04037183, 1.56397083,
             1.38379382, 1.61825293, 1.85305457, 1.97051697, 2.21457349,
             2.4593728 , 2.29987427, 1.4028385 , 2.03378259, 2.30329321,
             1.40636292, 1.94636609, 2.39829004, 1.50028223, 1.95026404,
             2.40249805, 1.79833594, 1.31742126, 1.1940697 , 1.67183496,
             2.02859998, 2.29665479, 1.90610815, 1.24925183, 1.36716064,
             1.60942029, 1.85356738, 1.97775452, 2.21364331, 2.24557178,
             1.61566858, 3.06214771, 3.545698  , 3.42894751, 2.95446484,
             2.48046362, 2.48256543, 2.4149314 , 2.64481641, 2.76206323,
             3.01162085, 3.2618208 , 3.38494312, 2.88014502, 2.61311377,
             3.42653271, 2.97687012, 2.53077539, 3.43272827, 2.9843042 ,
             2.53883154, 3.44016406, 2.99243018, 2.4550354 , 2.49585474,
             2.57974463, 2.6565791 , 2.85538232, 2.93942505, 3.01607153,
             3.21484717, 3.30084155, 3.37454736, 3.57312085, 2.94734912,
             3.01580884, 2.94968286, 3.01864746, 2.95242529, 2.9538374 ])
    • rover_z
      (measurement_index)
      float64
      0.7394 0.7407 ... 0.7582 0.7578
      array([0.73942676, 0.74068866, 0.74187622, 0.74286237, 0.74037927,
             0.73773645, 0.73667065, 0.73687531, 0.73916064, 0.74132397,
             0.74092389, 0.74050757, 0.74022626, 0.74187592, 0.73977563,
             0.7424577 , 0.74086359, 0.73811365, 0.7406543 , 0.74006757,
             0.73708887, 0.73966351, 0.73910876, 0.73666156, 0.73767639,
             0.73826459, 0.74121112, 0.74502863, 0.74402643, 0.74110504,
             0.73856964, 0.73638898, 0.73567542, 0.73960437, 0.73994818,
             0.73747308, 0.73571893, 0.73496606, 0.73724695, 0.740289  ,
             0.73961823, 0.73961029, 0.7381604 , 0.73783057, 0.73815247,
             0.73634924, 0.7363399 , 0.73725409, 0.73494916, 0.73475159,
             0.73387268, 0.73836597, 0.73829749, 0.73430725, 0.7384538 ,
             0.73808594, 0.73506799, 0.73884998, 0.7389137 , 0.73642188,
             0.74039734, 0.7402323 , 0.73967096, 0.73976013, 0.73889465,
             0.74473193, 0.74396918, 0.74303088, 0.74282141, 0.74191187,
             0.73918011, 0.73672833, 0.73714215, 0.74086053, 0.74400214,
             0.7445498 , 0.74231262, 0.74864581, 0.74694086, 0.74639703,
             0.74547473, 0.74537335, 0.74417346, 0.74204999, 0.74126501,
             0.74189893, 0.74467004, 0.7479267 , 0.74744836, 0.74590601,
             0.74858496, 0.7471228 , 0.74637732, 0.74712781, 0.74484589,
             0.74442859, 0.75169543, 0.75109668, 0.7502395 , 0.74944678,
      ...
             0.74812476, 0.74460864, 0.74754987, 0.74387091, 0.7470484 ,
             0.74329639, 0.74681396, 0.74264349, 0.74790704, 0.74343903,
             0.74810211, 0.74366772, 0.74822662, 0.74400482, 0.74855005,
             0.74450842, 0.74847559, 0.74548114, 0.74911841, 0.74593182,
             0.74877826, 0.74660602, 0.7492132 , 0.75492395, 0.75457587,
             0.75404419, 0.75407208, 0.75397711, 0.75202655, 0.75097369,
             0.7509657 , 0.75207526, 0.75397003, 0.75566119, 0.75456299,
             0.75332666, 0.75633295, 0.75416522, 0.7544527 , 0.75473956,
             0.75260278, 0.753013  , 0.75369934, 0.7517337 , 0.75197266,
             0.75247815, 0.76055212, 0.76054956, 0.76020599, 0.75927686,
             0.75919434, 0.75933759, 0.757703  , 0.75806476, 0.75661023,
             0.75852075, 0.75999493, 0.76057825, 0.76003918, 0.76088745,
             0.7607572 , 0.76047052, 0.76243909, 0.76089917, 0.75579565,
             0.75191516, 0.75142987, 0.75228363, 0.75666296, 0.75842126,
             0.75696259, 0.75578601, 0.75500629, 0.75944427, 0.75710138,
             0.76141272, 0.75781769, 0.75435638, 0.75938519, 0.7554433 ,
             0.75254395, 0.75688916, 0.75325916, 0.75038525, 0.75178033,
             0.75341779, 0.75753723, 0.7535799 , 0.75498297, 0.76011676,
             0.75586957, 0.75701843, 0.76282538, 0.75885229, 0.7597746 ,
             0.75952881, 0.75918781, 0.75906   , 0.75824719, 0.75779053])
    • csi_host_count
      (measurement_index)
      int64
      42 42 42 42 42 ... 41 41 41 41 41
      array([42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
             42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
             42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
             42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
             42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
             42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
             42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
             42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
             42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
             42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
             42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
             42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
             42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
             42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 41, 41, 41, 41, 41, 41, 41,
             41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41])
    • source_measurement_index
      (measurement_index)
      int64
      0 20 40 60 ... 4949 4969 4989 5010
      array([   0,   20,   40,   60,   80,  100,  120,  140,  160,  181,  201,
              221,  241,  261,  281,  301,  321,  342,  362,  382,  402,  422,
              442,  462,  482,  503,  523,  543,  563,  583,  603,  623,  643,
              663,  684,  704,  724,  744,  764,  784,  804,  824,  845,  865,
              885,  905,  925,  945,  965,  985, 1006, 1026, 1046, 1066, 1086,
             1106, 1126, 1146, 1166, 1187, 1207, 1227, 1247, 1267, 1287, 1307,
             1327, 1348, 1368, 1388, 1408, 1428, 1448, 1468, 1488, 1509, 1529,
             1549, 1569, 1589, 1609, 1629, 1649, 1670, 1690, 1710, 1730, 1750,
             1770, 1790, 1810, 1830, 1851, 1871, 1891, 1911, 1931, 1951, 1971,
             1991, 2012, 2032, 2052, 2072, 2092, 2112, 2132, 2152, 2173, 2193,
             2213, 2233, 2253, 2273, 2293, 2313, 2333, 2354, 2374, 2394, 2414,
             2434, 2454, 2474, 2494, 2515, 2535, 2555, 2575, 2595, 2615, 2635,
             2655, 2676, 2696, 2716, 2736, 2756, 2776, 2796, 2816, 2836, 2857,
             2877, 2897, 2917, 2937, 2957, 2977, 2997, 3018, 3038, 3058, 3078,
             3098, 3118, 3138, 3158, 3179, 3199, 3219, 3239, 3259, 3279, 3299,
             3319, 3340, 3360, 3380, 3400, 3420, 3440, 3460, 3480, 3500, 3521,
             3541, 3561, 3581, 3601, 3621, 3641, 3661, 3682, 3702, 3722, 3742,
             3762, 3782, 3802, 3822, 3843, 3863, 3883, 3903, 3923, 3943, 3963,
             3983, 4003, 4024, 4044, 4064, 4084, 4104, 4124, 4144, 4164, 4185,
             4205, 4225, 4245, 4265, 4285, 4305, 4325, 4346, 4366, 4386, 4406,
             4426, 4446, 4466, 4486, 4506, 4527, 4547, 4567, 4587, 4607, 4627,
             4647, 4667, 4688, 4708, 4728, 4748, 4768, 4788, 4808, 4828, 4849,
             4869, 4889, 4909, 4929, 4949, 4969, 4989, 5010])
    • measurement_index
      PandasIndex
      PandasIndex(Index([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,
             ...
             240, 241, 242, 243, 244, 245, 246, 247, 248, 249],
            dtype='int64', name='measurement_index', length=250))
  • experiment_ids :
    ['EXP003', 'EXP005', 'EXP006', 'EXP007', 'EXP008', 'EXP009', 'EXP010', 'EXP011', 'EXP012']
    total_valid_positions :
    5011
    frame_count :
    250
    requested_max_frames :
    250
    sampled :
    True

Export The Phase Movie¶

This movie keeps the antenna layout fixed and updates the CSI phase value at every active receiver tile. The light gray dots show all valid rover positions in the selected dataset slice, the orange points show the already visited movie frames, and the red star marks the current rover position.

phase_movie_path = csi.export_spatial_phase_movie(
    ds,
    EXPERIMENT_IDS,
    output_dir / PHASE_MOVIE_NAME,
    antenna_positions=antenna_positions,
    max_frames=MOVIE_MAX_FRAMES,
    fps=MOVIE_FPS,
)
print(f"Saved phase movie: {phase_movie_path}")
Saved phase movie: C:\Users\Calle\OneDrive\Documenten\GitHub\ELLIIIT-dataset-26\results\tutorial_movies\phase_rover_merged.mp4

Export The Power Movie¶

This movie uses the same frame sequence, but colors the active antennas by CSI power in dB. The color scale is fixed across all exported frames so you can compare strong and weak regions over the whole movie.

power_movie_path = csi.export_spatial_power_movie(
    ds,
    EXPERIMENT_IDS,
    output_dir / POWER_MOVIE_NAME,
    antenna_positions=antenna_positions,
    max_frames=MOVIE_MAX_FRAMES,
    fps=MOVIE_FPS,
)
print(f"Saved power movie: {power_movie_path}")
Saved power movie: C:\Users\Calle\OneDrive\Documenten\GitHub\ELLIIIT-dataset-26\results\tutorial_movies\power_rover_merged.mp4

Notes¶

  • Default output goes to results/tutorial_movies/.
  • If you want to refresh the GitHub Pages media files, point MOVIE_OUTPUT_DIR at docs/public/media/.
  • The exported MP4s do not need access to the raw NAS logs. They only use the processed .nc file plus the Techtile antenna geometry map.
ds.close()