API Reference¶
These pages are generated from PtyLab's docstrings. Each class is listed with its methods, equations and source code. For how the pieces fit together, start with the User Guide or the Examples.
How the main classes connect¶
flowchart LR
io["Input and Output<br/>read HDF5, example data"] --> exp[ExperimentalData]
exp --> rec[Reconstruction]
exp & rec & par[Params] --> eng["Engines<br/>ePIE, mPIE, ..."]
ops["Operators<br/>propagators"] --> eng
eng -.->|updates| rec
eng -.-> mon[Monitor]
Pages¶
| Page | What it documents |
|---|---|
| Core | easyInitialize() and the top-level PtyLab package |
| Experimental Data | ExperimentalData: the measured ptychogram, scan positions and geometry |
| Reconstruction | Reconstruction: object, probe and positions, initialization and saving; FPM IlluminationCalibration |
| Parameters | Params: the switches shared by all engines |
| Engines | BaseEngine and every engine: ePIE, mPIE, purityPIE, zPIE, aPIE, e3PIE, OPR, qNewton, mqNewton |
| Gradient Engine | GradientEngine (optional PyTorch): model, propagation, losses, regularizers, constraints, phases and batching |
| Operators | Propagation between the sample and the detector (Fraunhofer, Fresnel, ASP, scaled ASP) |
| Probe Engines | Probe representations (standard, OPR) |
| Regularizers | Focus metrics and total variation (TV) helpers |
| Monitoring | Monitor and DummyMonitor: live plots during the reconstruction |
| Grid Generation | Fermat spiral scan grids and scan path ordering |
| Input and Output | Reading HDF5 data, example datasets and the simulated dataset |
| Utilities | GPU helpers, scan grids, initial guesses, visualization and the ptylab command line |