Python API¶
The public package is fpm_rs. Configuration objects and arrays cross the
Python boundary while model compilation, simulation, and reconstruction run in
the Rust extension. The checked-in python/fpm_rs/__init__.pyi supplies the
typed public surface; private _core implementation objects are intentionally
not listed here.
fpm_rs
¶
open_dataset(id: str, *, registry_url: str | None = None, cache_dir: Path | None = None) -> Dataset
¶
suggest_reconstruction_shape(optics: Optics, illumination: Illumination, image_shape: Shape2D, reconstruction_shape: ReconstructionShapeSpec = 'smooth') -> Shape2D
¶
compile_model(optics: Optics, illumination: Illumination, image_shape: Shape2D, reconstruction_shape: ReconstructionShapeSpec = 'smooth') -> ImagePlaneModel
¶
compile_camera_model(model: ImagePlaneModel, camera: CameraModel) -> ImagePlaneModel
¶
simulate(true_model: ImagePlaneModel, object: ComplexArray | SyntheticObject, *, reconstruction_model: ImagePlaneModel | None = None, camera: CameraModel | None = None, illumination_errors: IlluminationAcquisitionErrors | None = None, seed: int = 0) -> SimulationResult
¶
Exceptions¶
All package-specific failures derive from FpmError. Shape, parameter, model,
measurement, length, frame-range, numerical, unsupported-operation, dataset,
I/O, and serialization failures have distinct subclasses.