The Dataset Viewer has been disabled on this dataset.

Experimental transmission and reflection matrices of a bent multimode fibre

DOI

Citing: please use the BibTeX below, not the auto-generated Hugging Face entry (which names the organisation as author).

Paired experimental transmission matrices (TMs) and reflection matrices (RMs) of a 5 m step-index multimode fibre (50 Β΅m core, NA 0.22, 660 nm), measured for 204 different random bend states, together with a photograph and coordinates of each bend.

Experimental setup.

On this page: Overview Β· Repository layout Β· The matrices Β· Bend shape Β· Processing the data Β· Licence and contact Β· Citation

Overview

Experiment 1 Experiment 2 Experiment 3
Date 26 March 2026 30 March 2026 1 April 2026
Bends 45 (01-45) 139 (001-139) 20 (01-20)
TM grid (output pixels) 205 x 205 203 x 203 203 x 203
RM grid (output pixels) 369 x 369 371 x 371 371 x 371
Length of fibre available to bend shortest longer than Exp. 1 longer than Exp. 1 and 2

The three experiments can be combined. Import_and_Prepare_TMs.py pads the grids to a common size (see below).

Repository layout

mmf-tm-rm-experimental/
β”œβ”€β”€ Experiment1/                  45 bends, 26 March 2026
β”œβ”€β”€ Experiment2/                  139 bends, 30 March 2026
β”œβ”€β”€ Experiment3/                  20 bends, 1 April 2026
β”œβ”€β”€ images/
β”‚   └── Experimental_Setup_Diagram.png
β”œβ”€β”€ Import_and_Prepare_TMs.py     builds processed_dataset.npz (TM and RM) and processed_dataset_paths.txt
β”œβ”€β”€ Calculate_TM_RM_Stats.py      statistics of the TMs and RMs (needs processed_dataset.npz)
β”œβ”€β”€ Visualise_Raw_Experimental_Data.ipynb         works on the raw .mat files
β”œβ”€β”€ Visualise_Processed_Experimental_Data.ipynb   needs processed_dataset.npz
β”œβ”€β”€ processed_dataset_paths.txt   bend order of the processed arrays
└── README.md

Inside each experiment folder:

ExperimentN/
β”œβ”€β”€ pupils.mat                    masks: 'bl' (TM) and 'bl_p' (RM) mark the pixels that were recorded
β”œβ”€β”€ calibration.mat               pixels per cm for the whole experiment (Experiments 2 and 3)
β”œβ”€β”€ notes.txt                     experiment notes (where present)
β”œβ”€β”€ full_fibre_image.jpeg         photograph of the whole fibre (Experiment 1)
β”œβ”€β”€ full_fibre_shape.png          outline of the whole fibre (Experiment 1)
└── <bend number>/
    β”œβ”€β”€ TM.mat                    transmission matrix, complex valued
    β”œβ”€β”€ RM.mat                    reflection matrix, intensity only, real valued
    β”œβ”€β”€ spline_path.mat           coordinates of the bend (see "Bend shape")
    β”œβ”€β”€ fibre_outline.png         line drawing of the bend
    β”œβ”€β”€ shape.jpeg / shape.mat    photograph of the bend (.jpeg in Experiment 1, .mat in Experiments 2 and 3)
    β”œβ”€β”€ calibration.mat           pixels per cm for this bend (Experiment 1 only)
    β”œβ”€β”€ spot.mat                  focus created with the measured TM (Experiments 2 and 3)
    └── analysis/
        β”œβ”€β”€ metrics.json          condition numbers and ranks
        β”œβ”€β”€ singular_values_TM.csv
        β”œβ”€β”€ singular_values_RM.csv
        └── singular_values_overlay.png

TM.mat, RM.mat, the shape files and all images are stored with Git LFS.

The matrices

  • TM (TM.mat): complex-valued, pixel basis. Each of the 145 columns is the complex output field (amplitude and phase, measured by off-axis holography) for one orthogonal input pattern. Only the pixels inside the pupil mask bl are stored.
  • RM (RM.mat): intensity-only (real-valued) reflection matrix for the same bend and the same 145 inputs. Only the pixels inside bl_p are stored.
  • Bend states: the fibre ends were fixed and the bend of the fibre between them was changed at random for every measurement.

Bend shape

  • spline_path.mat holds 200 values: the first 100 are the y coordinates and the second 100 are the x coordinates of a spline fitted to the bend, in image pixels. Every bend has 100 points, whatever the length of fibre that was bent.
  • Convert to length with the pixels-per-cm value: calibration.mat in each bend folder for Experiment 1, or calibration.mat in the experiment folder for Experiments 2 and 3.
  • Experiment 1: the bend photographs were taken by hand, so the camera angle and height differ from bend to bend, and every bend has its own calibration.
  • Experiments 2 and 3: all photographs were taken from one fixed camera position. The pixels-per-cm value is therefore the same within an experiment, but differs between Experiments 2 and 3. In Experiment 2 coordinates and line drawings run from right to left as seen by the camera (see its notes.txt).
  • The coordinates describe the bent section only. The ends of the fibre outside that section are not included.

Processing the data

git clone https://huggingface.co/datasets/OPTIMlab/mmf-tm-rm-experimental
cd mmf-tm-rm-experimental
python Import_and_Prepare_TMs.py

This writes (the large .npz is not part of the repository):

  • processed_dataset.npz with
    • TM: shape (204, 42025, 145), complex, the 205 x 205 output pixels flattened;
    • RM: shape (204, 137641, 145), real, the 371 x 371 output pixels flattened.
  • processed_dataset_paths.txt: one path per bend, in the same order as the first axis of TM and RM (Experiment 1, then 2, then 3, each in numerical order).

The script puts the recorded pixels back into the full grid using pupils.mat, pads the Experiment 1 RMs (369 -> 371) and the Experiment 2 and 3 TMs (203 -> 205) with zeros, and divides every TM and every RM by its own largest singular value. It needs a lot of memory: peak use was about 52 GB of RAM (51.4 GB measured), because every matrix is held twice, once as a list entry and once in the final array. The resulting processed_dataset.npz is about 25 GB on disk (TM about 10 GB, RM about 16 GB), so make sure you have the disk space as well.

import numpy as np

data = np.load("processed_dataset.npz")
TM, RM = data["TM"], data["RM"]        # bend i, input pattern k:

i, k = 0, 10
tm_speckle = TM[i, :, k].reshape(205, 205)   # complex field
rm_speckle = RM[i, :, k].reshape(371, 371)   # intensity
tm_intensity = np.abs(tm_speckle) ** 2

Visualise_Raw_Experimental_Data.ipynb works on the raw .mat files. Visualise_Processed_Experimental_Data.ipynb and Calculate_TM_RM_Stats.py need processed_dataset.npz.

Related

Licence and contact

Licence: CC BY 4.0.

Citation

If you use this dataset, please cite it.

@dataset{wilson2026mmftmrmexperimental,
  author    = {Wilson, Callum J. and Wright, Terry and Gordon, George S.D.},
  title     = {Experimental transmission and reflection matrices of a bent multimode fibre},
  year      = {2026},
  publisher = {Hugging Face},
  version   = {v1.0.0},
  doi       = {10.57967/hf/11679},
  url       = {https://huggingface.co/datasets/OPTIMlab/mmf-tm-rm-experimental}
}
Downloads last month
47