Skip to content

Add a hologram simulator for testing reconstruction settings - #449

Closed
animmosmith wants to merge 4 commits into
mainfrom
synthetic-hologram
Closed

animmosmith wants to merge 4 commits into
mainfrom
synthetic-hologram

Conversation

@animmosmith

@animmosmith animmosmith commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Features

  • pyopia.simulator.holo simulates an in-line hologram of opaque disks at known x, y, depth and size (synthetic_hologram), with a helper for random test particle sets (random_particles), a writer for a folder of simulated holograms plus their true particles (write_synthetic_holograms), and a function that matches processed statistics to the truth (match_to_truth). Six fast tests (52c18eb). Refs Consider tests with synthetic data and statistical size distributions #199

Housekeeping

  • match_to_truth works on processed stats, whose index labels repeat across images (b31998e)
  • synthetic_hologram now propagates the scattered field with the correct phase relative to the incident wave, so the shadow behind an opaque particle is dark at any distance (cbde9bd)
  • Version bump to 2.20.0 (758e173)

Checks

  • CI green

pyopia.simulator.holo simulates in-line holograms of opaque disks at known position, depth and size with the band-limited angular spectrum method. It can write a folder of holograms with their true particles, and match processed statistics back to them. Adds tests and a docs entry.
@animmosmith animmosmith added this to the Autumn 26 Features milestone Oct 15, 2026
@animmosmith
animmosmith marked this pull request as draft October 15, 2026 20:55
Processed stats restart their index for each image, so claiming detections by index label blocked matches in other images. Reset the index first, and add a test with repeated labels.
… synthetic_hologram

The scattered field was propagated with the full carrier phase while the incident plane wave was not, so the interference term had an arbitrary phase that changed with distance. The transfer function is now relative to a normally incident plane wave. Adds a test that the shadow behind an opaque disk is dark at any distance, and corrects the expected mean level.
@animmosmith

Copy link
Copy Markdown
Collaborator Author

Superseded by #452, which includes the simulator and its fixes (as a single commit) together with the
hologram reconstruction speed-up and related fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant