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: u32§true_experiment: ExperimentDescription§reconstruction_experiment: ExperimentDescription§image_shape: (usize, usize)§reconstruction_shape: (usize, usize)§compiled_models: CompiledModelPair§camera: Option<CameraModel>§illumination_acquisition_errors: Option<IlluminationAcquisitionErrors>§random_seed: u64Implementations§
Source§impl SimulationConfiguration
impl SimulationConfiguration
pub fn new( true_experiment: ExperimentDescription, reconstruction_experiment: ExperimentDescription, image_shape: (usize, usize), reconstruction_shape: ReconstructionShape, ) -> Result<Self>
pub fn with_camera(self, camera: CameraModel) -> Result<Self>
pub fn with_illumination_acquisition_errors( self, errors: IlluminationAcquisitionErrors, ) -> Result<Self>
pub fn with_random_seed(self, random_seed: u64) -> Self
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.
pub fn validate(&self) -> Result<()>
pub fn save(&self, path: impl AsRef<Path>) -> Result<()>
pub fn load(path: impl AsRef<Path>) -> Result<Self>
Trait Implementations§
Source§impl Clone for SimulationConfiguration
impl Clone for SimulationConfiguration
Source§fn clone(&self) -> SimulationConfiguration
fn clone(&self) -> SimulationConfiguration
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>,
Deserialize this value from the given Serde deserializer. Read more
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
Mutably borrows from an owned value. Read more