pub struct ReconstructionResult {Show 14 fields
pub object: Array2<Complex64>,
pub amplitude: Array2<f64>,
pub phase: Array2<f64>,
pub object_spectrum: Array2<Complex64>,
pub recovered_pupil: Pupil,
pub calibrated_illumination: Option<Vec<(f64, f64)>>,
pub recovered_frame_gains: Option<Vec<f64>>,
pub recovered_background: Option<Vec<f64>>,
pub physical_illumination_calibration: Option<IlluminationCalibrationState>,
pub calibrated_model: Option<ImagePlaneModel>,
pub trace: ReconstructionTrace,
pub scalar_diagnostics: BTreeMap<String, f64>,
pub runtime: RuntimeInfo,
pub metadata: BTreeMap<String, String>,
}Expand description
Owned reconstructed fields, calibration values, trace, and runtime metadata.
Object-domain arrays and the centered object spectrum all have high-resolution
(height, width) shape and standard row-major storage. object is complex field,
amplitude is its magnitude, and phase is wrapped in radians in [-π, π].
Fields§
§object: Array2<Complex64>Reconstructed high-resolution complex sample transmission field.
amplitude: Array2<f64>Non-negative magnitude of Self::object.
phase: Array2<f64>Wrapped argument of Self::object, in radians in [-π, π].
object_spectrum: Array2<Complex64>Centered Fourier spectrum corresponding to Self::object.
recovered_pupil: PupilRecovered low-resolution complex pupil and binary aperture support.
Built-in blind-pupil algorithms report this field in the compiled pupil’s canonical scale and phase gauge. The corresponding object fields carry the reciprocal correction.
calibrated_illumination: Option<Vec<(f64, f64)>>Per-source (row, column) corrections in Fourier-grid pixels.
recovered_frame_gains: Option<Vec<f64>>Optional positive multiplicative gains in acquisition-frame order.
recovered_background: Option<Vec<f64>>Optional additive intensity background in acquisition-frame order.
physical_illumination_calibration: Option<IlluminationCalibrationState>Complete physical planar-array calibration state for joint runs.
calibrated_model: Option<ImagePlaneModel>Reusable model compiled from the final physical illumination.
trace: ReconstructionTraceUniversal and algorithm-specific iteration history.
scalar_diagnostics: BTreeMap<String, f64>Final named scalar diagnostics not represented by the trace.
runtime: RuntimeInfoTiming, iteration count, early-stop status, and algorithm name.
metadata: BTreeMap<String, String>User- and runner-supplied string metadata.
Implementations§
Source§impl ReconstructionResult
impl ReconstructionResult
Sourcepub fn save_amplitude(&self, path: impl AsRef<Path>) -> Result<()>
pub fn save_amplitude(&self, path: impl AsRef<Path>) -> Result<()>
Writes object amplitude as a linearly normalized 8-bit grayscale image.
Sourcepub fn save_phase(&self, path: impl AsRef<Path>) -> Result<()>
pub fn save_phase(&self, path: impl AsRef<Path>) -> Result<()>
Writes wrapped object phase as an 8-bit grayscale image mapping [-π, π] to [0, 255].
Sourcepub fn save_complex_object(&self, path: impl AsRef<Path>) -> Result<()>
pub fn save_complex_object(&self, path: impl AsRef<Path>) -> Result<()>
Serializes the complex object and its (height, width) shape as JSON.
Sourcepub fn save_pupil(&self, path: impl AsRef<Path>) -> Result<()>
pub fn save_pupil(&self, path: impl AsRef<Path>) -> Result<()>
Serializes recovered complex pupil values and binary support as JSON.
Sourcepub fn save_trace_csv(&self, path: impl AsRef<Path>) -> Result<()>
pub fn save_trace_csv(&self, path: impl AsRef<Path>) -> Result<()>
Writes one CSV row per iteration with objective and elapsed seconds.
Sourcepub fn write_bundle(
&self,
path: impl AsRef<Path>,
options: BundleExportOptions,
) -> Result<ResultBundle>
pub fn write_bundle( &self, path: impl AsRef<Path>, options: BundleExportOptions, ) -> Result<ResultBundle>
Writes a self-describing Parquet/NPY result bundle and reopens it lazily.
The returned crate::reconstruction::ResultBundle reads its manifest
immediately but does not load scientific arrays until an accessor is called.
Repeated access returns the same cached std::sync::Arc.
§Example
use fpm_rs::{
reconstruction::{BundleExportOptions, ReconstructionResult, read_bundle},
Result,
};
use std::sync::Arc;
let result = completed_reconstruction()?;
result.write_bundle("result-bundle", BundleExportOptions::default())?;
let bundle = read_bundle("result-bundle")?;
let first = bundle.object()?;
let second = bundle.object()?;
assert!(Arc::ptr_eq(&first, &second));Sourcepub fn write_bundle_with_context(
&self,
path: impl AsRef<Path>,
options: BundleExportOptions,
diagnostics: Option<&ReconstructionDiagnostics>,
evaluation: Option<&ReconstructionEvaluation>,
) -> Result<ResultBundle>
pub fn write_bundle_with_context( &self, path: impl AsRef<Path>, options: BundleExportOptions, diagnostics: Option<&ReconstructionDiagnostics>, evaluation: Option<&ReconstructionEvaluation>, ) -> Result<ResultBundle>
Writes a bundle including optional callback diagnostics and reference evaluation records.
Trait Implementations§
Source§impl Clone for ReconstructionResult
impl Clone for ReconstructionResult
Source§fn clone(&self) -> ReconstructionResult
fn clone(&self) -> ReconstructionResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReconstructionResult
impl Debug for ReconstructionResult
Source§impl<'de> Deserialize<'de> for ReconstructionResult
impl<'de> Deserialize<'de> for ReconstructionResult
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ReconstructionResult
impl RefUnwindSafe for ReconstructionResult
impl Send for ReconstructionResult
impl Sync for ReconstructionResult
impl Unpin for ReconstructionResult
impl UnsafeUnpin for ReconstructionResult
impl UnwindSafe for ReconstructionResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more