Skip to main content

Simulator

Struct Simulator 

Source
pub struct Simulator { /* private fields */ }

Implementations§

Source§

impl Simulator

Source

pub fn new(true_model: ImagePlaneModel) -> Self

Creates a simulator whose input model describes the true experiment.

Use Self::reconstruction_model with a separately compiled assumed optical model to simulate geometry or pupil mismatch.

Source

pub fn ideal(model: ImagePlaneModel) -> Self

Source

pub fn object(self, object: impl Into<SyntheticObject>) -> Self

Source

pub fn camera(self, camera: CameraModel) -> Self

Source

pub fn illumination_acquisition_errors( self, errors: IlluminationAcquisitionErrors, ) -> Self

Adds non-geometric illumination acquisition errors.

Source

pub fn reconstruction_model(self, model: ImagePlaneModel) -> Self

Sets the optical model supplied to reconstruction after simulation.

For an optical mismatch, compile this model and the true model from separate experiment descriptions. When a camera model is present, Self::simulate compiles the known linear camera response into this returned reconstruction model.

Source

pub fn seed(self, seed: u64) -> Self

Source

pub fn simulate(self) -> Result<SimulationResult>

Simulates measurements and returns detector counts plus a count-space reconstruction model.

This differs from serialized crate::configuration::SimulationConfiguration, which stores a strict optical reconstruction model and exposes reconstruction_model_for_counts() for callers that load detector counts later.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,