Data and reconstructions
Uncertainty-Aware Fourier Ptychography · project page
This page describes the measurements and reconstructions behind the comparisons on the project page. For each target you can download the raw frames and the reconstructions computed with Uncertainty-Aware Fourier Ptychography (UA-FP) and with the ptychographic iterative engine (PIE). The reconstruction code is not part of this release.
Overview
| Blood smear | Low-quality USAF target | Blood cells | |
|---|---|---|---|
| Measurements | original source | download (4.4 MB) | 6 parts (495 MB) |
| Reconstructions | download (6.4 MB) | download (26.8 MB) | download (17.8 MB) |
| Frames | 225 | 225 | 185 of 225 |
| Frame size and type | 128 × 128, float32 | 320 × 320, uint8 | 2048 × 2448, uint16 |
| Wavelength | 532 nm | 532 nm | 533 nm |
| Objective | 2×, NA 0.1 | 4×, NA 0.1 | 4.23×, NA 0.14 |
| Camera pixel | 3.69 µm | 3.45 µm | 3.45 µm |
| LED array | 15 × 15, 4 mm pitch, 90.88 mm from sample | 15 × 15, 3.3 mm pitch, 49.6 mm from sample | 15 × 15, 4 mm pitch, 102 mm from sample |
| Reconstruction pixel | 0.461 µm | 0.216 µm | 0.204 µm |
The reconstruction pixel is the camera pixel divided by the magnification and by the 4× upsampling, measured in the sample plane. Every folder under data/ also holds a README.txt with the same file list.
How the measurements are organised
- All three scans light one LED at a time on a 15 × 15 array, in a spiral that starts at the central LED. Frame k, counting from 0, was recorded with LED k of that scan.
- The Low-quality USAF and Blood cells frames are released exactly as recorded, in raw sensor counts, without normalisation, cropping or denoising. The Blood smear file is the processed low-resolution data of its original authors.
- The nominal coordinates of every LED, in frame order and in metres, are stored in each reconstruction file as
initial_led_positions. They also fix how the array is oriented relative to the camera. - Distances in this page and in the files are in metres unless a unit is given.
Blood smear
A blood smear imaged with a green LED. These measurements are the public dataset of Pengming Song and Guoan Zheng (University of Connecticut), file bloodsmear_green.mat, and are not redistributed here. Download them from the Data folder of the original repository. The reconstructions in this release were computed from that file without modifying it.
imlow_HDRholds the 225 frames as a 128 × 128 × 225 float32 array. We treat it as amplitude, the square root of intensity.- The other variables are
aberration,theta,wlength,xint,yintandz. The authors document them indata_description.txtof the same repository. - The authors used a 32 × 32 LED array and lit the central 15 × 15 block in a spiral-out order. The slide glass is 1 mm thick with refractive index 1.52.
- The reconstruction uses the whole 128 × 128 frame and produces a 512 × 512 object.
Reconstructions: bloodsmear_green_reconstruction.zip, 6.4 MB.
Low-quality USAF resolution target
A USAF-1951 resolution chart recorded with a low-cost setup: an Olympus BX43 microscope with a 4× objective, a DFK 33UX273 monochrome camera in 8-bit mode (1440 × 1080 pixels, 3.45 µm), and a 16 × 16 RGB LED array driven by a Raspberry Pi, of which a 15 × 15 block is used. The setup was not calibrated, so the frames contain both LED-array misalignment and optical aberration. The measurements were recorded by Yang Wu and Chao Tan at Sichuan University.
6.matholds the variableLRImg, a 320 × 320 × 225 uint8 array. The third index is the frame number k. The file is unmodified.- The central bright-field frames are saturated at 255 counts. Dark-field frames sit on a flat floor of 38 counts, not zero.
- The slide glass is modelled with refractive index 1.52 and thickness 2.3 mm.
- The reconstruction uses the whole 320 × 320 frame and produces a 1280 × 1280 object.
Measurements: usaf_low_quality_data.zip, 4.4 MB, unpacks to usaf_low_quality/6.mat.
Reconstructions: usaf_low_quality_reconstruction.zip, 26.8 MB.
Blood cells
Blood cells imaged with a green LED on our visible-light Fourier ptychography setup.
- The measurements are 185 TIFF files of 2048 × 2448 pixels, uint16, unmodified. The number before
.tiffin each file name is the acquisition index k, from 0 to 224. The other digits in the name are a time stamp. - 40 of the 225 positions were not recorded: k = 0–13, 15, 17–28, 30–36, 38, 42–45 and 48. All of them lie among the first 49 positions of the spiral, at the centre of the array.
- The brightest frames clip at 65406 counts. Dark-field frames sit on a floor of 53 counts.
- The reconstruction uses the central 256 × 256 pixel patch of every frame, rows 896–1151 and columns 1096–1351 counting from 0, and produces a 1024 × 1024 object.
- The slide glass is modelled with refractive index 1.52 and thickness 1 mm.
The measurements are split into six archives that each stay under 100 MB. Extract all of them into the same folder to get the 185 files.
| Part | Frames k | Files | Size |
|---|---|---|---|
| blood_cells_2_data_part1.zip | 14–58 | 19 | 84.4 MB |
| blood_cells_2_data_part2.zip | 59–79 | 21 | 86.9 MB |
| blood_cells_2_data_part3.zip | 80–110 | 31 | 84.6 MB |
| blood_cells_2_data_part4.zip | 111–146 | 36 | 85.2 MB |
| blood_cells_2_data_part5.zip | 147–187 | 41 | 84.2 MB |
| blood_cells_2_data_part6.zip | 188–224 | 37 | 70.2 MB |
Reconstructions: blood_cells_2_reconstruction.zip, 17.8 MB.
Reconstruction files
Each reconstruction archive unpacks to <name>_reconstruction/ with two folders, ad/ for UA-FP and pie/ for PIE. Each folder holds reconstruction.npz and summary.png, which is the figure shown on the project page. Solver settings are listed on the project page. The .npz files open with numpy.load and need no other software.
N is the number of frames, and H × W is the object size given above for each target.
| Array | Shape | Type | Contents |
|---|---|---|---|
object |
(H, W) | complex64 | Reconstructed complex object. Use the absolute value for amplitude and the angle for phase. The phase is wrapped to ±π, and the figure shows it unwrapped. The overall scale is arbitrary and differs between UA-FP and PIE, so compare structure, not absolute values. |
pupil |
UA-FP: (H, W); PIE: size of one frame or patch | complex64 | Recovered pupil: the aperture (1 inside, 0 outside) times the exponential of the aberration phase. It is the same pupil, sampled on the Fourier grid of the object for UA-FP and of the frames for PIE. |
zernike_coefficients |
(15,) | float32 | Pupil aberration in radians, as coefficients of 15 real Zernike polynomials up to fourth radial order, in Noll ordering and normalisation. Entries 0–2 (piston and tilt) are held at zero. Entry 3 is defocus. |
initial_led_positions |
(N, 3) | float32 | Nominal LED coordinates, one row per frame in frame order. Columns are y, x and the height above the sample, in metres. Axis directions follow the Fourier-plane convention of the reconstruction. |
led_positions |
(N, 3) | float32 | LED coordinates after the array-pose correction. For UA-FP they differ slightly from the nominal ones. For PIE they are identical. |
led_translation |
(3,) | float32 | UA-FP only. Translation of the whole array, in metres. |
led_rotation |
(3,) | float32 | UA-FP only. Three rotation angles of the whole array about its centre, in degrees. |
led_translation_history, led_rotation_history |
(500, 3) | float64 | UA-FP only. The two quantities above after every iteration. |
led_point_offsets |
(N, 3) | float32 | UA-FP only. Per-LED position offsets. They are all zero in these runs. |
loss |
(iterations,) | float64 | Total loss after every UA-FP iteration, or after every PIE sweep. |
data_loss, feature_loss, regularization_loss |
(iterations,) | float64 | The three terms of the UA-FP loss. Empty for PIE. |
Loading the files
import glob, re
import numpy as np
import tifffile
from scipy.io import loadmat
# Low-quality USAF target: 225 frames of 320 x 320, uint8
usaf = loadmat("usaf_low_quality/6.mat")["LRImg"]
frame = usaf[:, :, 0] # frame k = 0, recorded with the central LED
# Blood cells: frames in acquisition order, with their indices k
pattern = re.compile(r"-(\d+)\.tiff$")
files = sorted(glob.glob("blood_cells_2/*.tiff"), key=lambda f: int(pattern.search(f).group(1)))
k = [int(pattern.search(f).group(1)) for f in files]
first = tifffile.imread(files[0]) # 2048 x 2448, uint16; one frame is 10 MB
# Reconstruction: amplitude, phase and the recovered pupil aberration
rec = np.load("usaf_low_quality_reconstruction/ad/reconstruction.npz")
amplitude = np.abs(rec["object"])
phase = np.angle(rec["object"])
aberration = rec["zernike_coefficients"]
All 185 Blood cells frames together take about 1.9 GB in memory, so crop each frame as you read it if you only need a patch.
Checking your download
SHA256SUMS.txt lists the SHA-256 checksum of every archive. Download it together with the archives, keeping the folder layout of data/, and run sha256sum -c SHA256SUMS.txt.
License and citation
The measurements recorded by us and all reconstructions are released under CC BY 4.0. The Blood smear measurements are not part of this release and stay under the terms of their original repository.
If you use these data, please cite the paper:
Ni Chen, Yang Wu, Chao Tan, Liangcai Cao, Jun Wang and Edmund Y. Lam, Uncertainty-Aware Fourier Ptychography, Light: Science & Applications 14, 236 (2025), doi:10.1038/s41377-025-01915-w.
A BibTeX entry is at the end of the project page. Questions about the data: nichen.optics@gmail.com.