Experimental transmission and reflection matrices of a bent multimode fibre
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.
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 maskblare stored. - RM (
RM.mat): intensity-only (real-valued) reflection matrix for the same bend and the same 145 inputs. Only the pixels insidebl_pare 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.matholds 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.matin each bend folder for Experiment 1, orcalibration.matin 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.npzwithTM: 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 ofTMandRM(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
- Code, weights and splits (GitHub and Zenodo, DOI 10.5281/zenodo.24343908; source: GitHub) that use the TMs of this dataset. The order of
processed_dataset_paths.txtfixes the frozen train/validation/test split used there. - Simulated 1 m TMs (Hugging Face, DOI 10.57967/hf/11677) used to pretrain the autoencoder.
Licence and contact
Licence: CC BY 4.0.
- Callum J. Wilson: cw2011@cam.ac.uk
- Terry Wright: tw567@cam.ac.uk
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