pub struct SimulationConfiguration {
pub format_version: u32,
pub true_experiment: ExperimentDescription,
pub reconstruction_experiment: ExperimentDescription,
pub image_shape: (usize, usize),
pub reconstruction_shape: (usize, usize),
pub compiled_models: CompiledModelPair,
pub camera: Option<CameraModel>,
pub illumination_acquisition_errors: Option<IlluminationAcquisitionErrors>,
pub random_seed: u64,
}Expand description
Complete, versioned configuration for simulation and reconstruction.
Fields§
§format_version: u32Must equal CONFIGURATION_FORMAT_VERSION.
true_experiment: ExperimentDescriptionPhysical description used to compile the true acquisition model.
reconstruction_experiment: ExperimentDescriptionPhysical description assumed by reconstruction.
image_shape: (usize, usize)Shared low-resolution shape as (height, width).
reconstruction_shape: (usize, usize)Shared high-resolution shape as (height, width).
compiled_models: CompiledModelPairStored true and reconstruction models compiled from the descriptions.
camera: Option<CameraModel>Optional detector-count response and noise model.
illumination_acquisition_errors: Option<IlluminationAcquisitionErrors>Optional non-geometric illumination errors injected during acquisition.
random_seed: u64Deterministic seed for simulation randomness.
Implementations§
Source§impl SimulationConfiguration
impl SimulationConfiguration
Sourcepub fn new(
true_experiment: ExperimentDescription,
reconstruction_experiment: ExperimentDescription,
image_shape: (usize, usize),
reconstruction_shape: ReconstructionShape,
) -> Result<Self>
pub fn new( true_experiment: ExperimentDescription, reconstruction_experiment: ExperimentDescription, image_shape: (usize, usize), reconstruction_shape: ReconstructionShape, ) -> Result<Self>
Compiles true and assumed descriptions on one explicit or automatically selected reconstruction grid and validates the complete configuration.
Sourcepub fn with_camera(self, camera: CameraModel) -> Result<Self>
pub fn with_camera(self, camera: CameraModel) -> Result<Self>
Adds a camera model after validating it for the configured frame shape.
Sourcepub fn with_illumination_acquisition_errors(
self,
errors: IlluminationAcquisitionErrors,
) -> Result<Self>
pub fn with_illumination_acquisition_errors( self, errors: IlluminationAcquisitionErrors, ) -> Result<Self>
Adds source gain variation, missing frames, or a source permutation and validates it.
Sourcepub fn with_random_seed(self, random_seed: u64) -> Self
pub fn with_random_seed(self, random_seed: u64) -> Self
Sets the deterministic random seed used for simulation.
Sourcepub fn reconstruction_model_for_counts(&self) -> Result<ImagePlaneModel>
pub fn reconstruction_model_for_counts(&self) -> Result<ImagePlaneModel>
Returns the assumed model with known linear camera response compiled in.
The serialized compiled_models.reconstruction_model remains the
strict optical model. Use this helper when constructing a
reconstruction problem from detector counts loaded through a saved
configuration.
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Checks format version; descriptions and compiled models; shape/frame agreement; camera constraints; and acquisition-error counts, indices, and permutations.
Trait Implementations§
Source§impl Clone for SimulationConfiguration
impl Clone for SimulationConfiguration
Source§fn clone(&self) -> SimulationConfiguration
fn clone(&self) -> SimulationConfiguration
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 SimulationConfiguration
impl Debug for SimulationConfiguration
Source§impl<'de> Deserialize<'de> for SimulationConfiguration
impl<'de> Deserialize<'de> for SimulationConfiguration
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 SimulationConfiguration
impl RefUnwindSafe for SimulationConfiguration
impl Send for SimulationConfiguration
impl Sync for SimulationConfiguration
impl Unpin for SimulationConfiguration
impl UnsafeUnpin for SimulationConfiguration
impl UnwindSafe for SimulationConfiguration
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